linux_dsm_epyc7002/net
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
..
802
8021q
appletalk
atm
ax25
bluetooth [BLUETOOTH] lockdep: annotate sk_lock nesting in AF_BLUETOOTH 2006-12-02 21:21:35 -08:00
bridge [NET]: Turn nfmark into generic mark 2006-12-02 21:21:38 -08:00
core [NET]: Size listen hash tables using backlog hint 2006-12-02 21:21:44 -08:00
dccp [NET]: Size listen hash tables using backlog hint 2006-12-02 21:21:44 -08:00
decnet [NET] rules: Share common attribute validation policy 2006-12-02 21:21:41 -08:00
econet
ethernet
ieee80211
ipv4 [NET]: Size listen hash tables using backlog hint 2006-12-02 21:21:44 -08:00
ipv6 [NET]: Size listen hash tables using backlog hint 2006-12-02 21:21:44 -08:00
ipx
irda
key [XFRM]: annotate ->new_mapping() 2006-12-02 21:21:18 -08:00
lapb
llc [LLC]: anotations 2006-12-02 21:21:23 -08:00
netfilter [NET]: Turn nfmark into generic mark 2006-12-02 21:21:38 -08:00
netlabel
netlink
netrom
packet [AF_PACKET]: annotate 2006-12-02 21:21:24 -08:00
rose
rxrpc
sched [PKT_SCHED]: Make sch_fifo.o available when CONFIG_NET_SCHED is not set. 2006-12-02 21:21:43 -08:00
sctp
sunrpc [SUNRPC]: annotate hash_ip() 2006-12-02 21:21:16 -08:00
tipc
unix
wanrouter
x25
xfrm [XFRM]: uninline xfrm_selector_match() 2006-12-02 21:21:36 -08:00
compat.c
Kconfig
Makefile
nonet.c
socket.c
sysctl_net.c
TUNABLE