public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Grant Zhang <gzhang@fastly•com>
To: Eric Dumazet <edumazet@google•com>,
	"David S . Miller" <davem@davemloft•net>
Cc: netdev <netdev@vger•kernel.org>, Eric Dumazet <eric.dumazet@gmail•com>
Subject: Re: [PATCH v3 net-next 0/4] tcp: better smp listener behavior
Date: Thu, 8 Oct 2015 21:16:38 -0700	[thread overview]
Message-ID: <56173FA6.70701@fastly.com> (raw)
In-Reply-To: <1444358004-26483-1-git-send-email-edumazet@google.com>



On 08/10/2015 19:33, Eric Dumazet wrote:
> 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(-)
>
Eric,

Does it make sense to make the listener hash table percpu? Socket with 
SO_INCOMING_CPU set could just be add to the hashtable for that specific 
cpu.

Thanks,

Grant

  parent reply	other threads:[~2015-10-09  4:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-09  2:33 [PATCH v3 net-next 0/4] tcp: better smp listener behavior Eric Dumazet
2015-10-09  2:33 ` [PATCH v3 net-next 1/4] net: SO_INCOMING_CPU setsockopt() support Eric Dumazet
2015-10-09  3:40   ` Tom Herbert
2015-10-09  9:45     ` Eric Dumazet
2015-10-09  2:33 ` [PATCH v3 net-next 2/4] net: align sk_refcnt on 128 bytes boundary Eric Dumazet
2015-10-09  2:33 ` [PATCH v3 net-next 3/4] net: shrink struct sock and request_sock by 8 bytes Eric Dumazet
2015-10-09  2:33 ` [PATCH v3 net-next 4/4] tcp: shrink tcp_timewait_sock " Eric Dumazet
2015-10-09  4:16 ` Grant Zhang [this message]
2015-10-09 10:53   ` [PATCH v3 net-next 0/4] tcp: better smp listener behavior Eric Dumazet
2015-10-13  2:29 ` David Miller

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=56173FA6.70701@fastly.com \
    --to=gzhang@fastly$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=edumazet@google$(echo .)com \
    --cc=eric.dumazet@gmail$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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