Skip to content

tcp: better smp listener behavior

Eric Dumazet netdev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 5 repliesIn review
  2. v24 patches 2 repliesSuperseded
  3. v14 patches 18 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4net: SO_INCOMING_CPU setsockopt() supportinclude/net/sock.h net/core/sock.c net/ipv4/inet_hashtables.c +3 more+25 -112 replies
2/4net: align sk_refcnt on 128 bytes boundaryinclude/net/inet_timewait_sock.h include/net/request_sock.h include/net/sock.h+16 -50 replies
3/4net: shrink struct sock and request_sock by 8 bytesinclude/net/request_sock.h include/net/sock.h net/ipv4/syncookies.c +6 more+28 -250 replies
4/4tcp: shrink tcp_timewait_sock by 8 bytesinclude/linux/tcp.h include/net/sock.h+4 -20 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 net-next 0/4] tcp: better smp listener behavior

As promised in last patch series, we implement a better SO_REUSEPORT strategy, based on cpu affinities if selected by the application.

We also moved sk_refcnt out of the cache line containing the lookup keys, as it was considerably slowing down smp operations because of false sharing. This was simpler than converting listen sockets to conventional RCU (to avoid sk_refcnt dirtying)

Could process 6.0 Mpps SYN instead of 4.2 Mpps on my test server.

Eric Dumazet (4):
net: SO_INCOMING_CPU setsockopt() support
net: align sk_refcnt on 128 bytes boundary
net: shrink struct sock and request_sock by 8 bytes
tcp: shrink tcp_timewait_sock by 8 bytes

 include/linux/tcp.h              |  4 ++--
 include/net/inet_timewait_sock.h |  2 +-
 include/net/request_sock.h       |  7 +++----
 include/net/sock.h               | 41 +++++++++++++++++++++++++++-------------
 net/core/sock.c                  |  5 +++++
 net/ipv4/inet_hashtables.c       |  2 ++
 net/ipv4/syncookies.c            |  4 ++--
 net/ipv4/tcp_input.c             |  2 +-
 net/ipv4/tcp_ipv4.c              |  2 +-
 net/ipv4/tcp_minisocks.c         | 18 +++++++++---------
 net/ipv4/tcp_output.c            |  2 +-
 net/ipv4/udp.c                   |  6 +++++-
 net/ipv6/inet6_hashtables.c      |  2 ++
 net/ipv6/syncookies.c            |  4 ++--
 net/ipv6/tcp_ipv6.c              |  2 +-
 net/ipv6/udp.c                   | 11 +++++++----
 16 files changed, 72 insertions(+), 42 deletions(-)
Signature · 1 line
2.6.0.rc2.230.g3dd15c0