* [PATCH bpf] Revert "xsk: Do not sleep in poll() when need_wakeup set"
@ 2021-12-17 14:56 Magnus Karlsson
2021-12-17 22:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Magnus Karlsson @ 2021-12-17 14:56 UTC (permalink / raw)
To: magnus.karlsson, bjorn, ast, daniel, netdev, maciej.fijalkowski
Cc: jonathan.lemon, bpf
From: Magnus Karlsson <magnus.karlsson@intel.com>
This reverts commit bd0687c18e635b63233dc87f38058cd728802ab4.
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: bd0687c18e63 ("xsk: Do not sleep in poll() when need_wakeup set")
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
---
net/xdp/xsk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c
index 7a466ea962c5..f16074eb53c7 100644
--- a/net/xdp/xsk.c
+++ b/net/xdp/xsk.c
@@ -677,6 +677,8 @@ static __poll_t xsk_poll(struct file *file, struct socket *sock,
struct xdp_sock *xs = xdp_sk(sk);
struct xsk_buff_pool *pool;
+ sock_poll_wait(file, sock, wait);
+
if (unlikely(!xsk_is_bound(xs)))
return mask;
@@ -688,8 +690,6 @@ static __poll_t xsk_poll(struct file *file, struct socket *sock,
else
/* Poll needs to drive Tx also in copy mode */
__xsk_sendmsg(sk);
- } else {
- sock_poll_wait(file, sock, wait);
}
if (xs->rx && !xskq_prod_is_empty(xs->rx))
base-commit: 0c3e2474605581375d808bb3b9ce0927ed3eef70
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH bpf] Revert "xsk: Do not sleep in poll() when need_wakeup set"
2021-12-17 14:56 [PATCH bpf] Revert "xsk: Do not sleep in poll() when need_wakeup set" Magnus Karlsson
@ 2021-12-17 22:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-12-17 22:10 UTC (permalink / raw)
To: Magnus Karlsson
Cc: magnus.karlsson, bjorn, ast, daniel, netdev, maciej.fijalkowski,
jonathan.lemon, bpf
Hello:
This patch was applied to bpf/bpf.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:
On Fri, 17 Dec 2021 15:56:46 +0100 you wrote:
> From: Magnus Karlsson <magnus.karlsson@intel.com>
>
> This reverts commit bd0687c18e635b63233dc87f38058cd728802ab4.
>
> 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.
>
> [...]
Here is the summary with links:
- [bpf] Revert "xsk: Do not sleep in poll() when need_wakeup set"
https://git.kernel.org/bpf/bpf/c/0706a78f31c4
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-17 22:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-17 14:56 [PATCH bpf] Revert "xsk: Do not sleep in poll() when need_wakeup set" Magnus Karlsson
2021-12-17 22:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).