net: listening_hash get a spinlock per bucket
authorEric Dumazet <dada1@cosmosbay.com>
Thu, 20 Nov 2008 08:40:07 +0000 (00:40 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Nov 2008 08:40:07 +0000 (00:40 -0800)
commit5caea4ea7088e80ac5410d04660346094608b909
treefad95133683c002d24ff5de7fb756dad806b41ed
parentd8b83c57a7e497cba9b5cb156e63176323035785
net: listening_hash get a spinlock per bucket

This patch prepares RCU migration of listening_hash table for
TCP/DCCP protocols.

listening_hash table being small (32 slots per protocol), we add
a spinlock for each slot, instead of a single rwlock for whole table.

This should reduce hold time of readers, and writers concurrency.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/inet_hashtables.h
net/dccp/proto.c
net/ipv4/inet_diag.c
net/ipv4/inet_hashtables.c
net/ipv4/tcp_ipv4.c
net/ipv6/inet6_hashtables.c