guest->host throughput with 05-drop-mutex

guest->host host->guest || cpu utilization throughput vmexits || 01-tx-notifies-disabled-for-longer 02-flush-in-io-thread 03-catch-more-io 04-no-tx-timer 05-drop-mutex

From: Mark McLoughlin 
Subject: [PATCH] kvm: qemu: virtio-net: drop mutex during tx tapfd write

This allows the guest vcpu thread to exit while the I/O thread is
churning away.

Signed-off-by: Mark McLoughlin 
---
 qemu/hw/virtio-net.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c
index 8a7efd9..a326127 100644
--- a/qemu/hw/virtio-net.c
+++ b/qemu/hw/virtio-net.c
@@ -251,7 +251,9 @@ static int virtio_net_flush_tx(VirtIONet *n, VirtQueue *vq, int enable_notify)
 	    len += sizeof(struct virtio_net_hdr);
 	}
 
+	kvm_sleep_begin();
 	len += qemu_sendv_packet(n->vc, out_sg, out_num);
+	kvm_sleep_end();
 
 	virtqueue_push(vq, &elem, len);
 	virtio_notify(&n->vdev, vq);
-- 
1.6.0.1

If you're interested, the nasty scripts I used to generate these are here