Skip to contentSkip to conversation

Revert "net: group sk_backlog and sk_receive_queue"

PATCH Applied Eric Dumazet 2 participants 2 messages Sep 29, 2025 – Sep 30, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Revert "net: group sk_backlog and sk_receive_queue"

This reverts commit 4effb335b5dab08cb6e2c38d038910f8b527cfc9.

This was a benefit for UDP flood case, which was later greatly improved with commits 6471658dc66c ("udp: use skb_attempt_defer_free()") and b650bf0977d3 ("udp: remove busylock and add per NUMA queues").

Apparently blamed commit added a regression for RAW sockets, possibly because they do not use the dual RX queue strategy that UDP has.

sock_queue_rcv_skb_reason() and RAW recvmsg() compete for sk_receive_buf and sk_rmem_alloc changes, and them being in the same
cache line reduce performance.

Fixes 4effb335b5da ("net: group sk_backlog and sk_receive_queue")
Cc Willem de Bruijn <[email protected]>
Cc David Ahern <[email protected]>
Cc Kuniyuki Iwashima <[email protected]>

---
v2: added missing SOB (Simon feedback)

 include/net/sock.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/net/sock.h +1 -1
index 8c5b64f41ab72d2a28c066c2a5698eaff7973918..60bcb13f045c3144609908a36960528b33e4f71c 100644
@@ -395,6 +395,7 @@ struct sock {
 
 	atomic_t		sk_drops;
 	__s32			sk_peek_off;
+	struct sk_buff_head	sk_error_queue;
 	struct sk_buff_head	sk_receive_queue;
 	/*
 	 * The backlog queue is special, it is always used with
@@ -412,7 +413,6 @@ struct sock {
 	} sk_backlog;
 #define sk_rmem_alloc sk_backlog.rmem_alloc
 
-	struct sk_buff_head	sk_error_queue;
 	__cacheline_group_end(sock_write_rx);
 
 	__cacheline_group_begin(sock_read_rx);
Signature · 1 line
2.51.0.570.gb178f27e6d-goog
#1 lore raw
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 10 lines · On Mon, 29 Sep 2025 18:21:12 +0000 you wrote:

This reverts commit 4effb335b5dab08cb6e2c38d038910f8b527cfc9.

This was a benefit for UDP flood case, which was later greatly improved with commits 6471658dc66c ("udp: use skb_attempt_defer_free()") and b650bf0977d3 ("udp: remove busylock and add per NUMA queues").

Apparently blamed commit added a regression for RAW sockets, possibly because they do not use the dual RX queue strategy that UDP has.

[...]

Here is the summary with links:
- [v2,net-next] Revert "net: group sk_backlog and sk_receive_queue"

    https://git.kernel.org/netdev/net-next/c/7d452516b67a

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html