Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tcp: move recvmsg_inq to tcp_sock_read_txrx

Fill a hole in tcp_sock_read_txrx, instead of possibly wasting
a cache line.

Note that tcp_recvmsg_locked() is also reading tp->repair,
so this removes one cache line miss in tcp recvmsg().

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20250919204856.2977245-6-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Eric Dumazet and committed by
Jakub Kicinski
969904dc 1b44d700

+3 -3
+1 -1
Documentation/networking/net_cachelines/tcp_sock.rst
··· 57 57 u8:2 fastopen_client_fail 58 58 u8:4 nonagle read_write tcp_skb_entail,tcp_push_pending_frames 59 59 u8:1 thin_lto 60 - u8:1 recvmsg_inq 60 + u8:1 recvmsg_inq read_mostly tcp_recvmsg 61 61 u8:1 repair read_mostly tcp_write_xmit 62 62 u8:1 frto 63 63 u8 repair_queue
+2 -2
include/linux/tcp.h
··· 232 232 repair : 1, 233 233 tcp_usec_ts : 1, /* TSval values in usec */ 234 234 is_sack_reneg:1, /* in recovery from loss with SACK reneg? */ 235 - is_cwnd_limited:1;/* forward progress limited by snd_cwnd? */ 235 + is_cwnd_limited:1,/* forward progress limited by snd_cwnd? */ 236 + recvmsg_inq : 1;/* Indicate # of bytes in queue upon recvmsg */ 236 237 __cacheline_group_end(tcp_sock_read_txrx); 237 238 238 239 /* RX read-mostly hotpath cache lines */ ··· 253 252 #if defined(CONFIG_TLS_DEVICE) 254 253 void (*tcp_clean_acked)(struct sock *sk, u32 acked_seq); 255 254 #endif 256 - u8 recvmsg_inq : 1;/* Indicate # of bytes in queue upon recvmsg */ 257 255 __cacheline_group_end(tcp_sock_read_rx); 258 256 259 257 /* TX read-write hotpath cache lines */