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)
commitf5a4941aa6d190e676065e8f4ed35999f52a01c3
treec40fee18c8d0dff90a7c1efb37a0af2ee9bf0750
parent6547e387d7f52f2ba681a229de3c13e5b9e01ee1
vhost_net: flush batched heads before trying to busy polling

After commit e2b3b35eb989 ("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: e2b3b35eb989 ("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