Skip to content

tcp: add fast path in timer handlers

Eric Dumazet netdev 1 version Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesApplied 3/3

Patches in v1 All 3 applied

#Subject and filesSizeRepliesApplied
1/3tcp: annotate data-races around icsk->icsk_pendinginclude/net/inet_connection_sock.h net/ipv4/inet_connection_sock.c net/ipv4/inet_diag.c +4 more+28 -200 repliesApplied
2/3tcp: add a fast path in tcp_write_timer()net/ipv4/tcp_timer.c+5 -00 repliesApplied
3/3tcp: add a fast path in tcp_delack_timer()include/net/inet_connection_sock.h net/ipv4/inet_connection_sock.c net/ipv4/tcp_output.c +2 more+18 -63 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 0/3] tcp: add fast path in timer handlers

As mentioned in Netconf 2024:

TCP retransmit and delack timers are not stopped from inet_csk_clear_xmit_timer() because we do not define INET_CSK_CLEAR_TIMERS.

Enabling INET_CSK_CLEAR_TIMERS leads to lower performance, mainly because del_timer() and mod_timer() happen from different cpus quite often.

What we can do instead is to add fast paths to tcp_write_timer() and tcp_delack_timer() to avoid socket spinlock acquisition.

Eric Dumazet (3):
tcp: annotate data-races around icsk->icsk_pending
tcp: add a fast path in tcp_write_timer()
tcp: add a fast path in tcp_delack_timer()

 include/net/inet_connection_sock.h |  9 +++++----
 net/ipv4/inet_connection_sock.c    |  6 ++++--
 net/ipv4/inet_diag.c               | 10 ++++++----
 net/ipv4/tcp_ipv4.c                | 10 ++++++----
 net/ipv4/tcp_output.c              |  7 ++++---
 net/ipv4/tcp_timer.c               | 18 ++++++++++++++++--
 net/ipv6/tcp_ipv6.c                | 10 ++++++----
 net/mptcp/protocol.c               |  3 ++-
 8 files changed, 49 insertions(+), 24 deletions(-)
Signature · 1 line
2.47.0.rc0.187.ge670bccf7e-goog