-
- Downloads
net: Convert TCP & DCCP hash tables to use RCU / hlist_nulls
RCU was added to UDP lookups, using a fast infrastructure : - sockets kmem_cache use SLAB_DESTROY_BY_RCU and dont pay the price of call_rcu() at freeing time. - hlist_nulls permits to use few memory barriers. This patch uses same infrastructure for TCP/DCCP established and timewait sockets. Thanks to SLAB_DESTROY_BY_RCU, no slowdown for applications using short lived TCP connections. A followup patch, converting rwlocks to spinlocks will even speedup this case. __inet_lookup_established() is pretty fast now we dont have to dirty a contended cache line (read_lock/read_unlock) Only established and timewait hashtable are converted to RCU (bind table and listen table are still using traditional locking) Signed-off-by:Eric Dumazet <dada1@cosmosbay.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- include/net/inet_hashtables.h 2 additions, 2 deletionsinclude/net/inet_hashtables.h
- include/net/inet_timewait_sock.h 5 additions, 5 deletionsinclude/net/inet_timewait_sock.h
- net/core/sock.c 3 additions, 1 deletionnet/core/sock.c
- net/dccp/ipv4.c 1 addition, 0 deletionsnet/dccp/ipv4.c
- net/dccp/ipv6.c 1 addition, 0 deletionsnet/dccp/ipv6.c
- net/dccp/proto.c 2 additions, 2 deletionsnet/dccp/proto.c
- net/ipv4/inet_diag.c 4 additions, 3 deletionsnet/ipv4/inet_diag.c
- net/ipv4/inet_hashtables.c 55 additions, 23 deletionsnet/ipv4/inet_hashtables.c
- net/ipv4/inet_timewait_sock.c 15 additions, 11 deletionsnet/ipv4/inet_timewait_sock.c
- net/ipv4/tcp.c 2 additions, 2 deletionsnet/ipv4/tcp.c
- net/ipv4/tcp_ipv4.c 13 additions, 12 deletionsnet/ipv4/tcp_ipv4.c
- net/ipv6/inet6_hashtables.c 47 additions, 23 deletionsnet/ipv6/inet6_hashtables.c
- net/ipv6/tcp_ipv6.c 1 addition, 0 deletionsnet/ipv6/tcp_ipv6.c
Loading
Please register or sign in to comment