]> www.infradead.org Git - users/jedix/linux-maple.git/commit
tcp: cache RTAX_QUICKACK metric in a hot cache line
authorEric Dumazet <edumazet@google.com>
Wed, 12 Mar 2025 08:39:07 +0000 (08:39 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 18 Mar 2025 12:44:59 +0000 (13:44 +0100)
commit15492700ac41459b54a6683490adcee350ab11e3
tree647a127cb5c0e71727b4fdfee02830fb4353edc2
parent3c6b97a9d52031804b40e956a63994ea5513aae8
tcp: cache RTAX_QUICKACK metric in a hot cache line

tcp_in_quickack_mode() is called from input path for small packets.

It calls __sk_dst_get() which reads sk->sk_dst_cache which has been
put in sock_read_tx group (for good reasons).

Then dst_metric(dst, RTAX_QUICKACK) also needs extra cache line misses.

Cache RTAX_QUICKACK in icsk->icsk_ack.dst_quick_ack to no longer pull
these cache lines for the cases a delayed ACK is scheduled.

After this patch TCP receive path does not longer access sock_read_tx
group.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
Reviewed-by: Neal Cardwell <ncardwell@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://patch.msgid.link/20250312083907.1931644-1-edumazet@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
include/net/inet_connection_sock.h
net/core/sock.c
net/ipv4/tcp_input.c