Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <edumazet@google.com>
To: "David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	 Paolo Abeni <pabeni@redhat.com>
Cc: Simon Horman <horms@kernel.org>,
	Neal Cardwell <ncardwell@google.com>,
	 Kuniyuki Iwashima <kuniyu@google.com>,
	Matthieu Baerts <matttbe@kernel.org>,
	 Mat Martineau <martineau@kernel.org>,
	Geliang Tang <geliang@kernel.org>,
	netdev@vger.kernel.org,  eric.dumazet@gmail.com,
	Eric Dumazet <edumazet@google.com>
Subject: [PATCH net-next 0/4] tcp: provide better locality for retransmit timer
Date: Mon, 24 Nov 2025 17:50:09 +0000	[thread overview]
Message-ID: <20251124175013.1473655-1-edumazet@google.com> (raw)

TCP stack uses three timers per flow, currently spread this way:

- sk->sk_timer : keepalive timer
- icsk->icsk_retransmit_timer : retransmit timer
- icsk->icsk_delack_timer : delayed ack timer

This series moves the retransmit timer to sk->sk_timer location,
to increase data locality in TX paths.

keepalive timers are not often used, this change should be neutral for them.

After the series we have following fields:

- sk->tcp_retransmit_timer : retransmit timer, in sock_write_tx group
- icsk->icsk_delack_timer : delayed ack timer
- icsk->icsk_keepalive_timer : keepalive timer

Moving icsk_delack_timer in a beter location would also be welcomed.

Eric Dumazet (4):
  tcp: rename icsk_timeout() to tcp_timeout_expires()
  net: move sk_dst_pending_confirm and sk_pacing_status to sock_read_tx
    group
  tcp: introduce icsk->icsk_keepalive_timer
  tcp: remove icsk->icsk_retransmit_timer

 .../net_cachelines/inet_connection_sock.rst   |  2 +-
 include/net/inet_connection_sock.h            | 20 ++++++++------
 include/net/sock.h                            | 13 ++++++---
 net/core/sock.c                               |  4 +--
 net/ipv4/inet_connection_sock.c               | 12 ++++-----
 net/ipv4/inet_diag.c                          |  8 +++---
 net/ipv4/tcp_ipv4.c                           |  8 +++---
 net/ipv4/tcp_timer.c                          | 23 ++++++++--------
 net/ipv6/tcp_ipv6.c                           |  8 +++---
 net/mptcp/protocol.c                          | 27 +++++++++----------
 net/mptcp/protocol.h                          |  2 +-
 .../selftests/bpf/progs/bpf_iter_tcp4.c       |  8 +++---
 .../selftests/bpf/progs/bpf_iter_tcp6.c       |  8 +++---
 13 files changed, 74 insertions(+), 69 deletions(-)

-- 
2.52.0.460.gd25c4c69ec-goog


             reply	other threads:[~2025-11-24 17:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-24 17:50 Eric Dumazet [this message]
2025-11-24 17:50 ` [PATCH net-next 1/4] tcp: rename icsk_timeout() to tcp_timeout_expires() Eric Dumazet
2025-11-25 23:59   ` Kuniyuki Iwashima
2025-11-24 17:50 ` [PATCH net-next 2/4] net: move sk_dst_pending_confirm and sk_pacing_status to sock_read_tx group Eric Dumazet
2025-11-26  0:02   ` Kuniyuki Iwashima
2025-11-24 17:50 ` [PATCH net-next 3/4] tcp: introduce icsk->icsk_keepalive_timer Eric Dumazet
2025-11-26  0:06   ` Kuniyuki Iwashima
2025-11-24 17:50 ` [PATCH net-next 4/4] tcp: remove icsk->icsk_retransmit_timer Eric Dumazet
2025-11-26  0:10   ` Kuniyuki Iwashima
2025-11-26  4:00 ` [PATCH net-next 0/4] tcp: provide better locality for retransmit timer patchwork-bot+netdevbpf
2025-11-26 11:23 ` Matthieu Baerts
2025-11-26 11:27   ` Eric Dumazet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251124175013.1473655-1-edumazet@google.com \
    --to=edumazet@google.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=geliang@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=martineau@kernel.org \
    --cc=matttbe@kernel.org \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox