Revision 6e474083f3daf3a3546737f5d7d502ad12eb257c authored by Wei Xu on 01 December 2017, 10:10:36 UTC, committed by David S. Miller on 03 December 2017, 02:31:03 UTC
Matthew found a roughly 40% tcp throughput regression with commit
c67df11f(vhost_net: try batch dequing from skb array) as discussed
in the following thread:
https://www.mail-archive.com/netdev@vger.kernel.org/msg187936.html

Eventually we figured out that it was a skb leak in handle_rx()
when sending packets to the VM. This usually happens when a guest
can not drain out vq as fast as vhost fills in, afterwards it sets
off the traffic jam and leaks skb(s) which occurs as no headcount
to send on the vq from vhost side.

This can be avoided by making sure we have got enough headcount
before actually consuming a skb from the batched rx array while
transmitting, which is simply done by moving checking the zero
headcount a bit ahead.

Signed-off-by: Wei Xu <wexu@redhat.com>
Reported-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent fa935ca
History
File Mode Size
appletalk
arcnet
bonding
caif
can
cris
dsa
ethernet
fddi
fjes
hamradio
hippi
hyperv
ieee802154
ipvlan
phy
plip
ppp
slip
team
usb
vmxnet3
wan
wimax
wireless
xen-netback
Kconfig -rw-r--r-- 16.5 KB
LICENSE.SRC -rw-r--r-- 891 bytes
Makefile -rw-r--r-- 2.2 KB
Space.c -rw-r--r-- 4.1 KB
dummy.c -rw-r--r-- 10.4 KB
eql.c -rw-r--r-- 14.6 KB
geneve.c -rw-r--r-- 44.2 KB
gtp.c -rw-r--r-- 31.0 KB
ifb.c -rw-r--r-- 8.5 KB
loopback.c -rw-r--r-- 5.9 KB
macsec.c -rw-r--r-- 84.8 KB
macvlan.c -rw-r--r-- 43.3 KB
macvtap.c -rw-r--r-- 6.1 KB
mdio.c -rw-r--r-- 17.4 KB
mii.c -rw-r--r-- 18.0 KB
netconsole.c -rw-r--r-- 24.8 KB
nlmon.c -rw-r--r-- 3.5 KB
ntb_netdev.c -rw-r--r-- 12.5 KB
rionet.c -rw-r--r-- 18.6 KB
sb1000.c -rw-r--r-- 31.2 KB
sungem_phy.c -rw-r--r-- 29.8 KB
tap.c -rw-r--r-- 28.6 KB
thunderbolt.c -rw-r--r-- 34.3 KB
tun.c -rw-r--r-- 71.7 KB
veth.c -rw-r--r-- 12.0 KB
virtio_net.c -rw-r--r-- 72.9 KB
vrf.c -rw-r--r-- 33.1 KB
vsockmon.c -rw-r--r-- 3.6 KB
vxlan.c -rw-r--r-- 95.1 KB
xen-netfront.c -rw-r--r-- 54.5 KB

back to top