tcp: optimizations for linux-5.17
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest20 patches 19 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/20 | tcp: minor optimization in tcp_add_backlog()net/ | +2 | 0 replies | |
| 2/20 | tcp: remove dead code in __tcp_v6_send_check()include/ | +3 | 2 replies | |
| 3/20 | tcp: small optimization in tcp_v6_send_check()net/ | +1 | 0 replies | |
| 4/20 | net: use sk_is_tcp() in more placesinclude/ include/ net/ +1 more | +9 | 0 replies | |
| 5/20 | net: remove sk_route_forced_capsinclude/ net/ net/ | +3 | 0 replies | |
| 6/20 | net: remove sk_route_nocapsinclude/ net/ net/ +2 more | +11 | 0 replies | |
| 7/20 | ipv6: shrink struct ipcm6_cookieinclude/ | +2 | 0 replies | |
| 8/20 | net: shrink struct sock by 8 bytesinclude/ | +1 | 0 replies | |
| 9/20 | net: forward_alloc_get depends on CONFIG_MPTCPinclude/ | +7 | 0 replies | |
| 10/20 | net: cache align tcp_memory_allocated, tcp_sockets_allocatednet/ net/ net/ | +4 | 0 replies | |
| 11/20 | tcp: small optimization in tcp recvmsg()net/ | +1 | 0 replies | |
| 12/20 | tcp: add RETPOLINE mitigation to sk_backlog_rcvinclude/ net/ net/ | +14 | 0 replies | |
| 13/20 | tcp: annotate data-races on tp->segs_in and tp->data_segs_ininclude/ net/ | +10 | 0 replies | |
| 14/20 | tcp: annotate races around tp->urg_datanet/ net/ | +11 | 0 replies | |
| 15/20 | tcp: tp->urg_data is unlikely to be setnet/ net/ | +7 | 0 replies | |
| 16/20 | tcp: avoid indirect calls to sock_rfreenet/ | +15 | 1 reply | |
| 17/20 | tcp: defer skb freeing after socket lock is releasedinclude/ include/ include/ +3 more | +42 | 9 replies | |
| 18/20 | tcp: check local var (timeo) before socket fields in one testnet/ | +2 | 0 replies | |
| 19/20 | tcp: do not call tcp_cleanup_rbuf() if we have a backlognet/ | +1 | 0 replies | |
| 20/20 | net: move early demux fields close to sk_refcntinclude/ | +5 | 0 replies |
Reviews trailers per patch
None of the 20 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Soheil Hassas Yeganeh | Arjun Roy |
|---|---|---|
| Series | A-b | A-b |
| 1/20 | ||
| 2/20 | ||
| 3/20 | ||
| 4/20 | ||
| 5/20 | ||
| 6/20 | ||
| 7/20 | ||
| 8/20 | ||
| 9/20 | ||
| 10/20 | ||
| 11/20 | ||
| 12/20 | ||
| 13/20 | ||
| 14/20 | ||
| 15/20 | ||
| 16/20 | ||
| 17/20 | ||
| 18/20 | ||
| 19/20 | ||
| 20/20 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH net-next 00/20] tcp: optimizations for linux-5.17
From: Eric Dumazet <[email protected]>
Mostly small improvements in this series.
The notable change is in "defer skb freeing after socket lock is released" in recvmsg() (and RX zerocopy)
The idea is to try to let skb freeing to BH handler, whenever possible, or at least perform the freeing outside of the socket lock section, for much improved performance. This idea can probably be extended to other protocols.
Tests on a 100Gbit NIC
Max throughput for one TCP_STREAM flow, over 10 runs.
MTU : 1500 (1428 bytes of TCP payload per MSS)
Before: 55 Gbit
After: 66 Gbit
MTU : 4096+ (4096 bytes of TCP payload, plus TCP/IPv6 headers)
Before: 82 Gbit
After: 95 Gbit
Eric Dumazet (20):
tcp: minor optimization in tcp_add_backlog()
tcp: remove dead code in __tcp_v6_send_check()
tcp: small optimization in tcp_v6_send_check()
net: use sk_is_tcp() in more places
net: remove sk_route_forced_caps
net: remove sk_route_nocaps
ipv6: shrink struct ipcm6_cookie
net: shrink struct sock by 8 bytes
net: forward_alloc_get depends on CONFIG_MPTCP
net: cache align tcp_memory_allocated, tcp_sockets_allocated
tcp: small optimization in tcp recvmsg()
tcp: add RETPOLINE mitigation to sk_backlog_rcv
tcp: annotate data-races on tp->segs_in and tp->data_segs_in
tcp: annotate races around tp->urg_data
tcp: tp->urg_data is unlikely to be set
tcp: avoid indirect calls to sock_rfree
tcp: defer skb freeing after socket lock is released
tcp: check local var (timeo) before socket fields in one test
tcp: do not call tcp_cleanup_rbuf() if we have a backlog
net: move early demux fields close to sk_refcnt
include/linux/skbuff.h | 2 + include/linux/skmsg.h | 6 --- include/net/ip6_checksum.h | 12 ++--- include/net/ipv6.h | 4 +- include/net/sock.h | 51 +++++++++++++-------- include/net/tcp.h | 18 +++++++- net/core/skbuff.c | 6 +-- net/core/sock.c | 18 +++++--- net/ipv4/tcp.c | 91 ++++++++++++++++++++++++++------------ net/ipv4/tcp_input.c | 8 ++-- net/ipv4/tcp_ipv4.c | 10 ++--- net/ipv4/tcp_output.c | 2 +- net/ipv4/udp.c | 2 +- net/ipv6/ip6_output.c | 2 +- net/ipv6/tcp_ipv6.c | 10 ++--- net/mptcp/protocol.c | 2 +- 16 files changed, 149 insertions(+), 95 deletions(-)
Signature · 1 line
2.34.0.rc1.387.gb447b232ab-goog