linux/net
Willy Tarreau bad115cfe5 tcp: do_tcp_sendpages() must try to push data out on oom conditions
Since recent changes on TCP splicing (starting with commits 2f533844
"tcp: allow splice() to build full TSO packets" and 35f9c09f "tcp:
tcp_sendpages() should call tcp_push() once"), I started seeing
massive stalls when forwarding traffic between two sockets using
splice() when pipe buffers were larger than socket buffers.

Latest changes (net: netdev_alloc_skb() use build_skb()) made the
problem even more apparent.

The reason seems to be that if do_tcp_sendpages() fails on out of memory
condition without being able to send at least one byte, tcp_push() is not
called and the buffers cannot be flushed.

After applying the attached patch, I cannot reproduce the stalls at all
and the data rate it perfectly stable and steady under any condition
which previously caused the problem to be permanent.

The issue seems to have been there since before the kernel migrated to
git, which makes me think that the stalls I occasionally experienced
with tux during stress-tests years ago were probably related to the
same issue.

This issue was first encountered on 3.0.31 and 3.2.17, so please backport
to -stable.

Signed-off-by: Willy Tarreau <w@1wt.eu>
Acked-by: Eric Dumazet <edumazet@google.com>
Cc: <stable@vger.kernel.org>
2012-05-17 18:31:43 -04:00
..
9p
802
8021q Revert "net: maintain namespace isolation between vlan and real device" 2012-05-10 23:03:34 -04:00
appletalk
atm
ax25 net ax25: Reorder ax25_exit to remove races. 2012-04-19 15:37:48 -04:00
batman-adv
bluetooth Bluetooth: mgmt: Fix device_connected sending order 2012-05-14 13:56:15 -04:00
bridge set fake_rtable's dst to NULL to avoid kernel Oops 2012-04-24 00:16:24 -04:00
caif caif: Fix memory leakage in the chnl_net.c. 2012-04-13 11:01:44 -04:00
can
ceph
core pktgen: fix crash at module unload 2012-05-10 23:10:24 -04:00
dcb
dccp
decnet
dns_resolver
dsa
econet
ethernet
ieee802154 6lowpan: add missing spin_lock_init() 2012-04-26 05:32:55 -04:00
ipv4 tcp: do_tcp_sendpages() must try to push data out on oom conditions 2012-05-17 18:31:43 -04:00
ipv6 tcp: fix TCP_MAXSEG for established IPv6 passive sockets 2012-04-22 17:09:35 -04:00
ipx
irda
iucv
key net/key/af_key.c: add missing kfree_skb 2012-04-13 11:01:44 -04:00
l2tp net: l2tp: unlock socket lock before returning from l2tp_ip_sendmsg 2012-05-02 21:04:33 -04:00
lapb
llc
mac80211 mac80211: fix AP mode EAP tx for VLAN stations 2012-04-30 14:40:05 -04:00
netfilter netfilter: ipset: fix hash size checking in kernel 2012-05-16 15:38:49 -04:00
netlabel
netlink
netrom
nfc NFC: Fix the LLCP Tx fragmentation loop 2012-04-11 15:09:33 -04:00
openvswitch openvswitch: checking wrong variable in queue_userspace_packet() 2012-05-13 15:47:34 -04:00
packet
phonet phonet: Sort out initiailziation and cleanup code. 2012-04-13 11:01:43 -04:00
rds
rfkill
rose
rxrpc
sched netem: fix possible skb leak 2012-05-01 13:40:48 -04:00
sctp sctp: check cached dst before using it 2012-05-10 23:15:47 -04:00
sunrpc auth_gss: the list of pseudoflavors not being parsed correctly 2012-05-03 12:35:33 -04:00
tipc
unix
wanrouter
wimax
wireless cfg80211: fix interface combinations check. 2012-04-13 14:05:35 -04:00
x25
xfrm
compat.c
Kconfig
Makefile
nonet.c
socket.c
sysctl_net.c