Eric Dumazet 230140cffa [INET]: Remove per bucket rwlock in tcp/dccp ehash table.
As done two years ago on IP route cache table (commit
22c047ccbc68fa8f3fa57f0e8f906479a062c426) , we can avoid using one
lock per hash bucket for the huge TCP/DCCP hash tables.

On a typical x86_64 platform, this saves about 2MB or 4MB of ram, for
litle performance differences. (we hit a different cache line for the
rwlock, but then the bucket cache line have a better sharing factor
among cpus, since we dirty it less often). For netstat or ss commands
that want a full scan of hash table, we perform fewer memory accesses.

Using a 'small' table of hashed rwlocks should be more than enough to
provide correct SMP concurrency between different buckets, without
using too much memory. Sizing of this table depends on
num_possible_cpus() and various CONFIG settings.

This patch provides some locking abstraction that may ease a future
work using a different model for TCP/DCCP table.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-11-07 04:15:11 -08:00
..
2007-10-26 03:56:43 -07:00
2007-10-10 16:53:11 -07:00
2007-07-31 02:28:27 -07:00
2006-12-02 21:22:55 -08:00
2007-10-10 16:53:56 -07:00
2005-08-29 15:32:25 -07:00
2007-11-02 08:47:06 +01:00
2007-07-10 22:15:41 -07:00
2005-04-16 15:20:36 -07:00
2007-10-10 16:51:28 -07:00
2005-04-16 15:20:36 -07:00
2007-10-15 12:26:42 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-09-22 07:57:21 -03:00
2006-03-20 22:59:36 -08:00
2005-08-29 16:01:32 -07:00
2005-08-29 15:32:25 -07:00
2007-10-07 23:44:17 -07:00
2007-07-10 22:19:04 -07:00
2007-10-10 16:51:28 -07:00
2007-06-07 13:40:50 -07:00
2007-10-10 16:47:46 -07:00