android_kernel_xiaomi_sm8350/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 [TR]: endiannness annotations 2006-09-28 17:53:59 -07:00
8021q [PATCH] Finish annotations of struct vlan_ethhdr 2006-10-10 16:15:34 -07:00
appletalk [APPLETALK]: Fix potential OOPS in atalk_sendmsg(). 2006-10-30 15:24:34 -08:00
atm [ATM]: handle sysfs errors 2006-10-21 19:55:22 -07:00
ax25 [NET]: Conversions from kmalloc+memset to k(z|c)alloc. 2006-07-21 14:51:30 -07:00
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 [NET]: Conversions from kmalloc+memset to k(z|c)alloc. 2006-07-21 14:51:30 -07:00
ethernet [NET]: Annotate dst_ops protocol 2006-09-28 18:02:58 -07:00
ieee80211 [PATCH] softmac: reduce scan debug output 2006-12-02 00:12:06 -05:00
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 [IPX]: Annotate and fix IPX checksum 2006-11-05 14:11:25 -08:00
irda [IRDA]: Lockdep fix. 2006-11-21 17:33:01 -08:00
key [XFRM]: annotate ->new_mapping() 2006-12-02 21:21:18 -08:00
lapb [LAPB]: Fix windowsize check 2006-08-05 21:15:58 -07:00
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 [NETLABEL]: Fix build failure. 2006-11-05 16:44:06 -08:00
netlink [NET]: fix uaccess handling 2006-10-30 15:24:41 -08:00
netrom [NETROM] lockdep: fix false positive 2006-07-12 13:59:02 -07:00
packet [AF_PACKET]: annotate 2006-12-02 21:21:24 -08:00
rose [ROSE] lockdep: fix false positive 2006-07-12 13:58:59 -07:00
rxrpc [PATCH] kmemdup: some users 2006-10-01 00:39:19 -07:00
sched [PKT_SCHED]: Make sch_fifo.o available when CONFIG_NET_SCHED is not set. 2006-12-02 21:21:43 -08:00
sctp [IPV6]: 'info' argument of ipv6 ->err_handler() is net-endian 2006-12-02 21:21:12 -08:00
sunrpc [SUNRPC]: annotate hash_ip() 2006-12-02 21:21:16 -08:00
tipc [TIPC]: endianness annotations 2006-12-02 21:21:08 -08:00
unix [AF_UNIX]: Change max_dgram_qlen sysctl to __read_mostly 2006-09-22 15:18:42 -07:00
wanrouter Fix misc .c/.h comment typos 2006-11-30 05:24:39 +01:00
x25 Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
xfrm [XFRM]: uninline xfrm_selector_match() 2006-12-02 21:21:36 -08:00
compat.c [NET]: File descriptor loss while receiving SCM_RIGHTS 2006-10-11 23:59:48 -07:00
Kconfig [NETLABEL]: Fix build failure. 2006-11-05 16:44:06 -08:00
Makefile [NetLabel]: core NetLabel subsystem 2006-09-22 14:53:34 -07:00
nonet.c
socket.c [PATCH] file: modify struct fown_struct to use a struct pid 2006-10-02 07:57:14 -07:00
sysctl_net.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
TUNABLE