Eric Dumazet a4298e4522 net: add SOCK_RCU_FREE socket flag
We want a generic way to insert an RCU grace period before socket
freeing for cases where RCU_SLAB_DESTROY_BY_RCU is adding too
much overhead.

SLAB_DESTROY_BY_RCU strict rules force us to take a reference
on the socket sk_refcnt, and it is a performance problem for UDP
encapsulation, or TCP synflood behavior, as many CPUs might
attempt the atomic operations on a shared sk_refcnt

UDP sockets and TCP listeners can set SOCK_RCU_FREE so that their
lookup can use traditional RCU rules, without refcount changes.
They can set the flag only once hashed and visible by other cpus.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Tom Herbert <tom@herbertland.com>
Tested-by: Tom Herbert <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-04-04 22:11:19 -04:00
..
2016-03-01 16:07:29 -05:00
2016-02-16 20:21:48 -05:00
2015-04-02 14:04:59 -04:00
2016-02-21 22:00:28 -05:00
2015-05-17 23:41:11 -04:00
2015-11-22 11:54:10 -05:00
2016-04-04 22:11:19 -04:00
2016-02-09 04:28:06 -05:00
2015-10-26 22:24:22 -07:00
2015-10-08 05:26:35 -07:00