android_kernel_xiaomi_sm8350/net/dccp
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
..
ccids [DCCP]: fix printk format warnings 2006-10-30 15:24:37 -08:00
ackvec.c [DCCP]: Update documentation references. 2006-10-24 16:17:51 -07:00
ackvec.h [DCCP]: Update documentation references. 2006-10-24 16:17:51 -07:00
ccid.c
ccid.h
dccp.h [DCCP]: Update documentation references. 2006-10-24 16:17:51 -07:00
diag.c
feat.c
feat.h [DCCP]: Shift sysctls into feat.h 2006-09-22 15:18:16 -07:00
input.c [DCCP]: Update documentation references. 2006-10-24 16:17:51 -07:00
ipv4.c [NET]: Size listen hash tables using backlog hint 2006-12-02 21:21:44 -08:00
ipv6.c [IPV6]: Fix address/interface handling in UDP and DCCP, according to the scoping architecture. 2006-11-21 17:41:56 -08:00
ipv6.h
Kconfig [DCCP]: Update documentation references. 2006-10-24 16:17:51 -07:00
Makefile [DCCP]: Introduce dccp_probe 2006-09-24 18:08:17 -03:00
minisocks.c
options.c [DCCP]: Update documentation references. 2006-10-24 16:17:51 -07:00
output.c [DCCP]: Introduce tx buffering 2006-09-22 15:18:17 -07:00
probe.c [NET]: Fix kfifo_alloc() error check. 2006-11-25 15:16:49 -08:00
proto.c [NET]: Size listen hash tables using backlog hint 2006-12-02 21:21:44 -08:00
sysctl.c [DCCP]: Shift sysctls into feat.h 2006-09-22 15:18:16 -07:00
timer.c