linux/net/core
Eric Dumazet 72a3effaf6 [NET]: Size listen hash tables using backlog hint
We currently allocate a fixed size (TCP_SYNQ_HSIZE=512) slots hash table for
each LISTEN socket, regardless of various parameters (listen backlog for
example)

On x86_64, this means order-1 allocations (might fail), even for 'small'
sockets, expecting few connections. On the contrary, a huge server wanting a
backlog of 50000 is slowed down a bit because of this fixed limit.

This patch makes the sizing of listen hash table a dynamic parameter,
depending of :
- net.core.somaxconn tunable (default is 128)
- net.ipv4.tcp_max_syn_backlog tunable (default : 256, 1024 or 128)
- backlog value given by user application  (2nd parameter of listen())

For large allocations (bigger than PAGE_SIZE), we use vmalloc() instead of
kmalloc().

We still limit memory allocation with the two existing tunables (somaxconn &
tcp_max_syn_backlog). So for standard setups, this patch actually reduce RAM
usage.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-12-02 21:21:44 -08:00
..
datagram.c [NET]: Replace CHECKSUM_HW by CHECKSUM_PARTIAL/CHECKSUM_COMPLETE 2006-09-22 14:53:53 -07:00
dev.c [PATCH] netdev: don't allow register_netdev with blank name 2006-12-02 00:16:37 -05:00
dev_mcast.c [NET]: Remove unnecessary config.h includes from net/ 2006-09-22 14:54:21 -07:00
dst.c [NET]: add_timer -> mod_timer() in dst_run_gc() 2006-08-09 02:25:54 -07:00
dv.c [NET]: More kzalloc conversions. 2006-04-09 22:25:48 -07:00
ethtool.c [ETHTOOL]: Remove some entries from non-root command list. 2006-09-28 18:03:12 -07:00
fib_rules.c [NET] rules: Add support to invert selectors 2006-12-02 21:21:42 -08:00
filter.c [NET]: Fix sk->sk_filter field access 2006-09-22 15:18:47 -07:00
flow.c IPsec: propagate security module errors up from flow_cache_lookup 2006-10-11 23:59:34 -07:00
gen_estimator.c [NET]: More kzalloc conversions. 2006-04-09 22:25:48 -07:00
gen_stats.c
iovec.c
link_watch.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
Makefile [NET]: Protocol Independant Policy Routing Rules Framework 2006-09-22 14:53:40 -07:00
neighbour.c [NEIGH]: always use hash_mask under tbl lock 2006-10-04 00:31:01 -07:00
net-sysfs.c [PATCH] WE-21 support (core API) 2006-09-25 16:52:14 -04:00
netevent.c [NET]: Network Event Notifier Mechanism. 2006-08-02 13:38:20 -07:00
netpoll.c [NETPOLL]: Compute checksum properly in netpoll_send_udp(). 2006-11-07 15:10:13 -08:00
pktgen.c [PKTGEN]: TCI endianness fixes 2006-11-05 14:11:31 -08:00
request_sock.c [NET]: Size listen hash tables using backlog hint 2006-12-02 21:21:44 -08:00
rtnetlink.c [RTNETLINK]: Fix use of wrong skb in do_getlink() 2006-10-12 01:50:30 -07:00
scm.c [NET]: File descriptor loss while receiving SCM_RIGHTS 2006-10-11 23:59:48 -07:00
skbuff.c [NET]: Turn nfmark into generic mark 2006-12-02 21:21:38 -08:00
sock.c [BLUETOOTH] lockdep: annotate sk_lock nesting in AF_BLUETOOTH 2006-12-02 21:21:35 -08:00
stream.c [NET]: fix __sk_stream_mem_reclaim 2006-07-12 17:58:53 -07:00
sysctl_net_core.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
user_dma.c [I/OAT]: net/core/user_dma.c should #include <net/netdma.h> 2006-07-21 14:49:49 -07:00
utils.c [PATCH] rename net_random to random32 2006-10-17 08:18:43 -07:00
wireless.c [PATCH] wireless: WE-20 compatibility for ESSID and NICKN ioctls 2006-10-19 17:08:19 -04:00