summaryrefslogtreecommitdiff
path: root/include/linux/debugobjects.h
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2026-10-05 16:05:02 -0700
committerJakub Kicinski <kuba@kernel.org>2026-10-05 16:05:03 -0700
commit4022ea9c421179edfab4bc2d6fe1ef19f688d651 (patch)
tree205ac2137dc019eb6df6d16a52f5e66e1aaf4413 /include/linux/debugobjects.h
parent4f07f0bf11aefca661e3413ab4b9b2bd3a1b7b5e (diff)
parent4eee6d58ad1497518b59f8f2c0eb42e258d9cc82 (diff)
Merge branch 'tcp-avoid-struct-socket-cache-line-miss-in-tcp_check_space'
Eric Dumazet says: ==================== tcp: avoid struct socket cache line miss in tcp_check_space() tcp_check_space() is called on every incoming ACK and every transmitted packet, and tests SOCK_NOSPACE in sk->sk_socket->flags. Because struct socket lives in its own cache line and the TCP fast paths do not touch it for anything else, that test pulls in an extra cache line that is cold when the working set of active sockets is large. This series mirrors SOCK_NOSPACE into a new u8 field, tp->tcp_nospace, placed right after tp->chrono_type in the tcp_sock_write_tx cache line group (fitting in an existing 3-byte hole before chrono_start, so no other field moves and sizeof(struct tcp_sock) is unchanged). Both the transmit and ACK fast paths already touch that cache line, making the fast-path test in tcp_check_space() free of extra cache misses while keeping __tcp_check_space() authoritative on SOCK_NOSPACE. To maintain the invariant (SOCK_NOSPACE set => tp->tcp_nospace set) from a single choke point: - Patch 1 fixes a long-standing bug in dlm where SOCKWQ_ASYNC_NOSPACE was tested and cleared on con->sock->flags instead of SOCK_NOSPACE. - Patch 2 introduces sk_set_nospace() and sk_clear_nospace() and converts the core networking setters and clearers. - Patches 3-8 convert the remaining in-kernel callers (sunrpc, rds, dlm, drbd, nvme-tcp, libceph) so that no open-coded set_bit() or clear_bit() of SOCK_NOSPACE remains in the tree. - Patch 9 adds tp->tcp_nospace, wires it into sk_set_nospace() and sk_clear_nospace(), and switches tcp_check_space() to test it. ==================== Link: https://patch.msgid.link/20260929071743.23624-1-edumazet@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions