remarkable-linux/net/ipv4
Eric Dumazet b49960a05e tcp: change tcp_adv_win_scale and tcp_rmem[2]
tcp_adv_win_scale default value is 2, meaning we expect a good citizen
skb to have skb->len / skb->truesize ratio of 75% (3/4)

In 2.6 kernels we (mis)accounted for typical MSS=1460 frame :
1536 + 64 + 256 = 1856 'estimated truesize', and 1856 * 3/4 = 1392.
So these skbs were considered as not bloated.

With recent truesize fixes, a typical MSS=1460 frame truesize is now the
more precise :
2048 + 256 = 2304. But 2304 * 3/4 = 1728.
So these skb are not good citizen anymore, because 1460 < 1728

(GRO can escape this problem because it build skbs with a too low
truesize.)

This also means tcp advertises a too optimistic window for a given
allocated rcvspace : When receiving frames, sk_rmem_alloc can hit
sk_rcvbuf limit and we call tcp_prune_queue()/tcp_collapse() too often,
especially when application is slow to drain its receive queue or in
case of losses (netperf is fast, scp is slow). This is a major latency
source.

We should adjust the len/truesize ratio to 50% instead of 75%

This patch :

1) changes tcp_adv_win_scale default to 1 instead of 2

2) increase tcp_rmem[2] limit from 4MB to 6MB to take into account
better truesize tracking and to allow autotuning tcp receive window to
reach same value than before. Note that same amount of kernel memory is
consumed compared to 2.6 kernels.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Cc: Tom Herbert <therbert@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-02 21:08:58 -04:00
..
netfilter netfilter: nf_ct_ipv4: packets with wrong ihl are invalid 2012-04-10 12:50:49 +02:00
af_inet.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
ah4.c net: ipv4: Standardize prefixes for message logging 2012-03-12 17:05:21 -07:00
arp.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
cipso_ipv4.c ipv4: Convert call_rcu() to kfree_rcu(), drop opt_kfree_rcu() 2012-02-21 09:03:31 -08:00
datagram.c
devinet.c Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
esp4.c net: ipv4: Standardize prefixes for message logging 2012-03-12 17:05:21 -07:00
fib_frontend.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
fib_lookup.h
fib_rules.c
fib_semantics.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
fib_trie.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
gre.c net: ipv4: Standardize prefixes for message logging 2012-03-12 17:05:21 -07:00
icmp.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
igmp.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
inet_connection_sock.c tcp: bind() optimize port allocation 2012-01-25 21:50:43 -05:00
inet_diag.c udp_diag: implement idiag_get_info for udp/udplite to get queue information 2012-04-25 20:43:01 -04:00
inet_fragment.c
inet_hashtables.c
inet_lro.c
inet_timewait_sock.c
inetpeer.c route: Remove redirect_genid 2012-03-08 00:30:32 -08:00
ip_forward.c
ip_fragment.c net: ipv4: Standardize prefixes for message logging 2012-03-12 17:05:21 -07:00
ip_gre.c net: ipv4: Standardize prefixes for message logging 2012-03-12 17:05:21 -07:00
ip_input.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
ip_options.c net: ipv4: Standardize prefixes for message logging 2012-03-12 17:05:21 -07:00
ip_output.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
ip_sockglue.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-03-20 21:04:47 -07:00
ipcomp.c net: Convert printks to pr_<level> 2012-03-11 23:42:51 -07:00
ipconfig.c net: Convert printks to pr_<level> 2012-03-11 23:42:51 -07:00
ipip.c net: Convert printks to pr_<level> 2012-03-11 23:42:51 -07:00
ipmr.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
Kconfig net: Fix build regression when INET_UDP_DIAG=y and IPV6=m 2012-02-07 13:35:28 -05:00
Makefile
netfilter.c
ping.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
proc.c tcp: reduce out_of_order memory use 2012-03-19 16:53:08 -04:00
protocol.c
raw.c net: Convert printks to pr_<level> 2012-03-11 23:42:51 -07:00
route.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-04-02 17:53:39 -07:00
syncookies.c tcp: fix syncookie regression 2012-03-11 15:52:12 -07:00
sysctl_net_ipv4.c tcp: properly initialize tcp memory limits 2012-02-02 14:34:41 -05:00
tcp.c tcp: change tcp_adv_win_scale and tcp_rmem[2] 2012-05-02 21:08:58 -04:00
tcp_bic.c tcp: fix undo after RTO for BIC 2012-01-20 14:17:26 -05:00
tcp_cong.c net: ipv4: Standardize prefixes for message logging 2012-03-12 17:05:21 -07:00
tcp_cubic.c tcp: fix undo after RTO for CUBIC 2012-01-20 14:17:26 -05:00
tcp_diag.c inet_diag: Rename inet_diag_req into inet_diag_req_v2 2012-01-11 12:56:06 -08:00
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_illinois.c
tcp_input.c tcp: change tcp_adv_win_scale and tcp_rmem[2] 2012-05-02 21:08:58 -04:00
tcp_ipv4.c dmaengine-fixes for 3.4-rc3 2012-04-10 15:30:16 -07:00
tcp_lp.c
tcp_memcontrol.c Merge branch 'for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup 2012-03-20 18:11:21 -07:00
tcp_minisocks.c tcp: md5: rcu conversion 2012-01-31 12:14:00 -05:00
tcp_output.c tcp: fix retransmit of partially acked frames 2012-04-18 16:52:45 -04:00
tcp_probe.c net: ipv4: Standardize prefixes for message logging 2012-03-12 17:05:21 -07:00
tcp_scalable.c
tcp_timer.c net: ipv4: Standardize prefixes for message logging 2012-03-12 17:05:21 -07:00
tcp_vegas.c
tcp_vegas.h
tcp_veno.c
tcp_westwood.c
tcp_yeah.c
tunnel4.c net: Convert printks to pr_<level> 2012-03-11 23:42:51 -07:00
udp.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
udp_diag.c udp_diag: implement idiag_get_info for udp/udplite to get queue information 2012-04-25 20:43:01 -04:00
udp_impl.h
udplite.c net: ipv4: Standardize prefixes for message logging 2012-03-12 17:05:21 -07:00
xfrm4_input.c
xfrm4_mode_beet.c ipsec: be careful of non existing mac headers 2012-02-23 16:50:45 -05:00
xfrm4_mode_transport.c
xfrm4_mode_tunnel.c ipsec: be careful of non existing mac headers 2012-02-23 16:50:45 -05:00
xfrm4_output.c
xfrm4_policy.c
xfrm4_state.c
xfrm4_tunnel.c net: ipv4: Standardize prefixes for message logging 2012-03-12 17:05:21 -07:00