Skip to content

Commit 0706a78

Browse files
magnus-karlssonborkmann
authored andcommitted
Revert "xsk: Do not sleep in poll() when need_wakeup set"
This reverts commit bd0687c. This patch causes a Tx only workload to go to sleep even when it does not have to, leading to misserable performance in skb mode. It fixed one rare problem but created a much worse one, so this need to be reverted while I try to craft a proper solution to the original problem. Fixes: bd0687c ("xsk: Do not sleep in poll() when need_wakeup set") Signed-off-by: Magnus Karlsson <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
1 parent 8ca4090 commit 0706a78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/xdp/xsk.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,8 @@ static __poll_t xsk_poll(struct file *file, struct socket *sock,
677677
struct xdp_sock *xs = xdp_sk(sk);
678678
struct xsk_buff_pool *pool;
679679

680+
sock_poll_wait(file, sock, wait);
681+
680682
if (unlikely(!xsk_is_bound(xs)))
681683
return mask;
682684

@@ -688,8 +690,6 @@ static __poll_t xsk_poll(struct file *file, struct socket *sock,
688690
else
689691
/* Poll needs to drive Tx also in copy mode */
690692
__xsk_sendmsg(sk);
691-
} else {
692-
sock_poll_wait(file, sock, wait);
693693
}
694694

695695
if (xs->rx && !xskq_prod_is_empty(xs->rx))

0 commit comments

Comments
 (0)