WSL2-Linux-Kernel/net/ipv6
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
..
netfilter [NET]: Turn nfmark into generic mark 2006-12-02 21:21:38 -08:00
Kconfig [NET]: Rethink mark field in struct flowi 2006-12-02 21:21:39 -08:00
Makefile [IPV6]: Seperate sit driver to extra module 2006-10-11 23:59:50 -07:00
addrconf.c [IPV6]: Seperate sit driver to extra module (addrconf.c changes) 2006-10-11 23:59:52 -07:00
af_inet6.c [IPV6]: flowlabels are net-endian 2006-12-02 21:21:21 -08:00
ah6.c [IPV6]: 'info' argument of ipv6 ->err_handler() is net-endian 2006-12-02 21:21:12 -08:00
anycast.c [IPV6] ADDRCONF: Convert addrconf_lock to RCU. 2006-09-22 15:20:26 -07:00
datagram.c [IPV6]: flowlabels are net-endian 2006-12-02 21:21:21 -08:00
esp6.c [IPV6]: 'info' argument of ipv6 ->err_handler() is net-endian 2006-12-02 21:21:12 -08:00
exthdrs.c [IPV6] MIP6: Fix to update IP6CB when cloned skbuff is received at HAO. 2006-09-22 15:18:46 -07:00
exthdrs_core.c [SELINUX]: Fix ipv6_skip_exthdr() invocation causing OOPS. 2005-04-24 20:16:19 -07:00
fib6_rules.c [NET] rules: Share common attribute validation policy 2006-12-02 21:21:41 -08:00
icmp.c [IPV6]: 'info' argument of ipv6 ->err_handler() is net-endian 2006-12-02 21:21:12 -08:00
inet6_connection_sock.c [IPV6]: annotate inet6_csk_search_req() 2006-12-02 21:21:22 -08:00
inet6_hashtables.c [IPV6]: annotate inet6_hashtables 2006-12-02 21:21:10 -08:00
ip6_fib.c [IPv6] fib: initialize tb6_lock in common place to give lockdep a key 2006-10-21 20:20:54 -07:00
ip6_flowlabel.c [IPV6]: flowlabels are net-endian 2006-12-02 21:21:21 -08:00
ip6_input.c [IPV6]: Allow to replace skbuff by TLV parser. 2006-09-22 15:06:51 -07:00
ip6_output.c [NET]: Turn nfmark into generic mark 2006-12-02 21:21:38 -08:00
ip6_tunnel.c [IPV6]: flowlabels are net-endian 2006-12-02 21:21:21 -08:00
ipcomp6.c [IPV6]: 'info' argument of ipv6 ->err_handler() is net-endian 2006-12-02 21:21:12 -08:00
ipv6_sockglue.c [IPV6]: Disable SG for GSO unless we have checksum 2006-09-28 18:02:45 -07:00
ipv6_syms.c [IPV6] ADDRCONF: Convert addrconf_lock to RCU. 2006-09-22 15:20:26 -07:00
mcast.c [IPV6]: annotate ipv6 mcast 2006-12-02 21:21:15 -08:00
mip6.c Remove all inclusions of <linux/config.h> 2006-10-04 03:38:54 -04:00
ndisc.c [IPV6] NDISC: Calculate packet length correctly for allocation. 2006-12-02 21:06:31 -08:00
netfilter.c [NET]: Replace CHECKSUM_HW by CHECKSUM_PARTIAL/CHECKSUM_COMPLETE 2006-09-22 14:53:53 -07:00
proc.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
protocol.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
raw.c [IPV6]: 'info' argument of ipv6 ->err_handler() is net-endian 2006-12-02 21:21:12 -08:00
reassembly.c [NET/IPV4/IPV6]: Change some sysctl variables to __read_mostly 2006-09-22 14:55:03 -07:00
route.c [NET]: Rethink mark field in struct flowi 2006-12-02 21:21:39 -08:00
sit.c [IPV6]: Give sit driver an appropriate module alias. 2006-11-05 15:47:04 -08:00
sysctl_net_ipv6.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
tcp_ipv6.c [NET]: Size listen hash tables using backlog hint 2006-12-02 21:21:44 -08:00
tunnel6.c [IPV6]: 'info' argument of ipv6 ->err_handler() is net-endian 2006-12-02 21:21:12 -08:00
udp.c [IPV6]: 'info' argument of ipv6 ->err_handler() is net-endian 2006-12-02 21:21:12 -08:00
xfrm6_input.c [XFRM]: xrfm_replay_check() annotations 2006-09-28 18:02:40 -07:00
xfrm6_mode_beet.c [XFRM]: BEET mode 2006-10-04 00:31:09 -07:00
xfrm6_mode_ro.c [IPSEC]: output mode to take an xfrm state as input param 2006-09-22 15:18:48 -07:00
xfrm6_mode_transport.c [IPSEC]: output mode to take an xfrm state as input param 2006-09-22 15:18:48 -07:00
xfrm6_mode_tunnel.c [IPSEC]: output mode to take an xfrm state as input param 2006-09-22 15:18:48 -07:00
xfrm6_output.c [IPSEC]: output mode to take an xfrm state as input param 2006-09-22 15:18:48 -07:00
xfrm6_policy.c [XFRM]: misc annotations 2006-12-02 21:21:11 -08:00
xfrm6_state.c [XFRM]: ports in struct xfrm_selector annotated 2006-09-28 18:02:33 -07:00
xfrm6_tunnel.c [IPV6]: 'info' argument of ipv6 ->err_handler() is net-endian 2006-12-02 21:21:12 -08:00