linux-kernel-test/include
Eric Dumazet 645ca708f9 udp: introduce struct udp_table and multiple spinlocks
UDP sockets are hashed in a 128 slots hash table.

This hash table is protected by *one* rwlock.

This rwlock is readlocked each time an incoming UDP message is handled.

This rwlock is writelocked each time a socket must be inserted in
hash table (bind time), or deleted from this table (close time)

This is not scalable on SMP machines :

1) Even in read mode, lock() and unlock() are atomic operations and
 must dirty a contended cache line, shared by all cpus.

2) A writer might be starved if many readers are 'in flight'. This can
 happen on a machine with some NIC receiving many UDP messages. User
 process can be delayed a long time at socket creation/dismantle time.

This patch prepares RCU migration, by introducing 'struct udp_table
and struct udp_hslot', and using one spinlock per chain, to reduce
contention on central rwlock.

Introducing one spinlock per chain reduces latencies, for port
randomization on heavily loaded UDP servers. This also speedup
bindings to specific ports.

udp_lib_unhash() was uninlined, becoming to big.

Some cleanups were done to ease review of following patch
(RCUification of UDP Unicast lookups)

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-29 01:41:45 -07:00
..
acpi Merge branch 'linus' into test 2008-10-23 00:11:07 -04:00
asm-arm
asm-cris container freezer: add TIF_FREEZE flag to all architectures 2008-10-20 08:52:33 -07:00
asm-frv ide: fix support for IDE PCI controllers using MMIO on frv 2008-10-17 18:09:14 +02:00
asm-generic mutex: speed up generic mutex implementations 2008-10-23 09:18:20 -07:00
asm-h8300 h8300: update timer handler - new files 2008-10-16 11:21:29 -07:00
asm-m32r
asm-m68k proc: move /proc/hardware to m68k-specific code 2008-10-23 14:24:03 +04:00
asm-mn10300
asm-xtensa Merge git://git.kernel.org/pub/scm/linux/kernel/git/czankel/xtensa-2.6 2008-10-23 09:16:56 -07:00
crypto
drm radeon: fix PCI bus mastering support enables. 2008-10-18 07:10:54 +10:00
keys
linux net: remove NIP6(), NIP6_FMT, NIP6_SEQFMT and final users 2008-10-28 23:02:38 -07:00
math-emu math-emu: Fix thinko in _FP_DIV 2008-10-22 22:09:59 -07:00
media V4L/DVB (9335): videobuf: split unregister bus creating self-contained frontend de-allocator 2008-10-21 14:32:08 -02:00
mtd
net udp: introduce struct udp_table and multiple spinlocks 2008-10-29 01:41:45 -07:00
pcmcia
rdma
rxrpc
scsi [PATCH] don't mess with file in scsi_nonblockable_ioctl() 2008-10-21 07:47:28 -04:00
sound
trace
video video: add sh_mobile_lcdc platform flags 2008-10-20 11:38:50 +09:00
xen
Kbuild