]> git.baikalelectronics.ru Git - kernel.git/commit
vhost_net: flush batched heads before trying to busy polling
authorJason Wang <jasowang@redhat.com>
Tue, 29 May 2018 06:18:19 +0000 (14:18 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 May 2018 17:29:03 +0000 (13:29 -0400)
commit56f530162483709f286e229e9a17f35087e6f524
treec40fee18c8d0dff90a7c1efb37a0af2ee9bf0750
parent84edf14e88a7daff8a758d84ecf7822d52b49a10
vhost_net: flush batched heads before trying to busy polling

After commit c5c6fa6154ba ("vhost_net: batch used ring update in rx"),
we tend to batch updating used heads. But it doesn't flush batched
heads before trying to do busy polling, this will cause vhost to wait
for guest TX which waits for the used RX. Fixing by flush batched
heads before busy loop.

1 byte TCP_RR performance recovers from 13107.83 to 50402.65.

Fixes: c5c6fa6154ba ("vhost_net: batch used ring update in rx")
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/vhost/net.c