linux/net
Eric Dumazet f86dcc5aa8 udp: dynamically size hash tables at boot time
UDP_HTABLE_SIZE was initialy defined to 128, which is a bit small for
several setups.

4000 active UDP sockets -> 32 sockets per chain in average. An
incoming frame has to lookup all sockets to find best match, so long
chains hurt latency.

Instead of a fixed size hash table that cant be perfect for every
needs, let UDP stack choose its table size at boot time like tcp/ip
route, using alloc_large_system_hash() helper

Add an optional boot parameter, uhash_entries=x so that an admin can
force a size between 256 and 65536 if needed, like thash_entries and
rhash_entries.

dmesg logs two new lines :
[    0.647039] UDP hash table entries: 512 (order: 0, 4096 bytes)
[    0.647099] UDP Lite hash table entries: 512 (order: 0, 4096 bytes)

Maximal size on 64bit arches would be 65536 slots, ie 1 MBytes for non
debugging spinlocks.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-07 22:00:22 -07:00
..
9p virtio: add virtio IDs file 2009-09-23 22:26:32 +09:30
802 net: remove COMPAT_NET_DEV_OPS 2009-05-25 01:53:53 -07:00
8021q net: fix vlan_get_size to include vlan_flags size 2009-09-26 20:16:07 -07:00
appletalk net: mark net_proto_ops as const 2009-10-07 01:10:46 -07:00
atm net: mark net_proto_ops as const 2009-10-07 01:10:46 -07:00
ax25 net: mark net_proto_ops as const 2009-10-07 01:10:46 -07:00
bluetooth net: mark net_proto_ops as const 2009-10-07 01:10:46 -07:00
bridge bridge: Fix double-free in br_add_if. 2009-09-28 12:54:25 -07:00
can net: mark net_proto_ops as const 2009-10-07 01:10:46 -07:00
core ethtool: Add reset operation 2009-10-07 01:10:44 -07:00
dcb net: fix double skb free in dcbnl 2009-09-26 20:16:15 -07:00
dccp IPv6: use ipv6_addr_set_v4mapped() 2009-10-07 13:58:25 -07:00
decnet net: mark net_proto_ops as const 2009-10-07 01:10:46 -07:00
dsa netdev: convert pseudo-devices to netdev_tx_t 2009-09-01 01:13:07 -07:00
econet econet: Fix redeclaration of symbol len 2009-10-07 14:43:04 -07:00
ethernet net: remove COMPAT_NET_DEV_OPS 2009-05-25 01:53:53 -07:00
ieee802154 net: mark net_proto_ops as const 2009-10-07 01:10:46 -07:00
ipv4 udp: dynamically size hash tables at boot time 2009-10-07 22:00:22 -07:00
ipv6 udp: dynamically size hash tables at boot time 2009-10-07 22:00:22 -07:00
ipx net: mark net_proto_ops as const 2009-10-07 01:10:46 -07:00
irda net: mark net_proto_ops as const 2009-10-07 01:10:46 -07:00
iucv net: mark net_proto_ops as const 2009-10-07 01:10:46 -07:00
key net: mark net_proto_ops as const 2009-10-07 01:10:46 -07:00
lapb net: remove NET_RX_BAD and NET_RX_CN* defines 2009-07-05 19:15:35 -07:00
llc net: mark net_proto_ops as const 2009-10-07 01:10:46 -07:00
mac80211 cfg80211: assign device type in netdev notifier callback 2009-10-05 00:43:34 -07:00
netfilter net: Make setsockopt() optlen be unsigned. 2009-09-30 16:12:20 -07:00
netlabel Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-07-30 19:22:43 -07:00
netlink net: mark net_proto_ops as const 2009-10-07 01:10:46 -07:00
netrom net: mark net_proto_ops as const 2009-10-07 01:10:46 -07:00
packet net: mark net_proto_ops as const 2009-10-07 01:10:46 -07:00
phonet net: mark net_proto_ops as const 2009-10-07 01:10:46 -07:00
rds net: mark net_proto_ops as const 2009-10-07 01:10:46 -07:00
rfkill headers: remove sched.h from poll.h 2009-10-04 15:05:10 -07:00
rose net: mark net_proto_ops as const 2009-10-07 01:10:46 -07:00
rxrpc net: mark net_proto_ops as const 2009-10-07 01:10:46 -07:00
sched pkt_sched: gen_estimator: Dont report fake rate estimators 2009-10-07 01:07:42 -07:00
sctp net: Make setsockopt() optlen be unsigned. 2009-09-30 16:12:20 -07:00
sunrpc IPv6: use ipv6_addr_set_v4mapped() 2009-10-07 13:58:25 -07:00
tipc net: Make setsockopt() optlen be unsigned. 2009-09-30 16:12:20 -07:00
unix net: mark net_proto_ops as const 2009-10-07 01:10:46 -07:00
wanrouter headers: smp_lock.h redux 2009-07-12 12:22:34 -07:00
wimax wimax: fix warning caused by not checking retval of rfkill_set_hw_state() 2009-06-11 11:12:48 -07:00
wireless cfg80211: assign device type in netdev notifier callback 2009-10-05 00:43:34 -07:00
x25 net: mark net_proto_ops as const 2009-10-07 01:10:46 -07:00
xfrm net: file_operations should be const 2009-09-02 01:03:53 -07:00
compat.c net: Make setsockopt() optlen be unsigned. 2009-09-30 16:12:20 -07:00
Kconfig net/compat/wext: send different messages to compat tasks 2009-07-15 08:53:39 -07:00
Makefile net: remove redundant sched/ in net/Makefile 2009-07-12 20:11:14 -07:00
nonet.c
socket.c net: speedup sk_wake_async() 2009-10-06 17:28:29 -07:00
sysctl_net.c net: sysctl_net - use net_eq to compare nets 2009-03-16 16:23:30 +01:00
TUNABLE