diff options
author | David S. Miller <davem@davemloft.net> | 2015-10-12 19:28:32 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-12 19:28:32 -0700 |
commit | 76973dd79fd52f187ba3df018bca65792a3d942d (patch) | |
tree | be81e7d131616b46257c3d2006a4cfd45b94e490 /net/ipv4/udp.c | |
parent | c7d39e32632e5db9dc4da51198b76d8c315946ff (diff) | |
parent | d475f090bf1c0dc2999e98bbf2e7cb2243358849 (diff) |
Merge branch 'setsockopt_incoming_cpu'
Eric Dumazet says:
====================
tcp: better smp listener behavior
As promised in last patch series, we implement a better SO_REUSEPORT
strategy, based on cpu hints if given 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.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r-- | net/ipv4/udp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index e1fc129099ea..24ec14f9825c 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -375,7 +375,8 @@ static inline int compute_score(struct sock *sk, struct net *net, return -1; score += 4; } - + if (sk->sk_incoming_cpu == raw_smp_processor_id()) + score++; return score; } @@ -419,6 +420,9 @@ static inline int compute_score2(struct sock *sk, struct net *net, score += 4; } + if (sk->sk_incoming_cpu == raw_smp_processor_id()) + score++; + return score; } |