android_kernel_google_msm/net
Eric Dumazet c8628155ec tcp: reduce out_of_order memory use
With increasing receive window sizes, but speed of light not improved
that much, out of order queue can contain a huge number of skbs, waiting
to be moved to receive_queue when missing packets can fill the holes.

Some devices happen to use fat skbs (truesize of 4096 + sizeof(struct
sk_buff)) to store regular (MTU <= 1500) frames. This makes highly
probable sk_rmem_alloc hits sk_rcvbuf limit, which can be 4Mbytes in
many cases.

When limit is hit, tcp stack calls tcp_collapse_ofo_queue(), a true
latency killer and cpu cache blower.

Doing the coalescing attempt each time we add a frame in ofo queue
permits to keep memory use tight and in many cases avoid the
tcp_collapse() thing later.

Tested on various wireless setups (b43, ath9k, ...) known to use big skb
truesize, this patch removed the "packets collapsed in receive queue due
to low socket buffer" I had before.

This also reduced average memory used by tcp sockets.

With help from Neal Cardwell.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Neal Cardwell <ncardwell@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: H.K. Jerry Chu <hkchu@google.com>
Cc: Tom Herbert <therbert@google.com>
Cc: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-03-19 16:53:08 -04:00
..
9p
802
8021q
appletalk
atm
ax25
batman-adv Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge 2012-03-11 15:36:34 -07:00
bluetooth Bluetooth: Set security level on incoming pairing request 2012-03-08 02:26:04 -03:00
bridge Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-03-09 14:34:20 -08:00
caif caif: make zero a legal caif connetion id. 2012-03-11 15:38:16 -07:00
can
ceph
core net: get rid of some pointless casts to sockaddr 2012-03-11 19:11:22 -07:00
dcb
dccp
decnet
dns_resolver
dsa
econet
ethernet
ieee802154
ipv4 tcp: reduce out_of_order memory use 2012-03-19 16:53:08 -04:00
ipv6 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-03-18 23:29:41 -04:00
ipx
irda
iucv af_iucv: add shutdown for HS transport 2012-03-07 22:52:24 -08:00
key
l2tp
lapb
llc
mac80211 mac80211: make uapsd_* keys per-vif 2012-03-15 13:43:12 -04:00
netfilter Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-03-18 23:29:41 -04:00
netlabel
netlink
netrom
nfc NFC: NCI code identation fixes 2012-03-06 15:16:25 -05:00
openvswitch Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-03-09 14:34:20 -08:00
packet
phonet
rds
rfkill
rose
rxrpc
sched Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-03-18 23:29:41 -04:00
sctp sctp: Export sctp_do_peeloff 2012-03-08 13:52:08 -08:00
sunrpc
tipc
unix
wanrouter
wimax
wireless cfg80211: clarify timestamp in cfg80211_inform_bss 2012-03-13 14:54:20 -04:00
x25
xfrm
compat.c net: get rid of some pointless casts to sockaddr 2012-03-11 19:11:22 -07:00
Kconfig
Makefile
nonet.c
socket.c net: get rid of some pointless casts to sockaddr 2012-03-11 19:11:22 -07:00
sysctl_net.c