From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark McLoughlin Subject: [PATCH 6/6] kvm: qemu: virtio-net: drop mutex during tx tapfd write Date: Thu, 30 Oct 2008 17:51:53 +0000 Message-ID: <1225389113-28332-7-git-send-email-markmc@redhat.com> References: <> <1225389113-28332-1-git-send-email-markmc@redhat.com> <1225389113-28332-2-git-send-email-markmc@redhat.com> <1225389113-28332-3-git-send-email-markmc@redhat.com> <1225389113-28332-4-git-send-email-markmc@redhat.com> <1225389113-28332-5-git-send-email-markmc@redhat.com> <1225389113-28332-6-git-send-email-markmc@redhat.com> Cc: kvm@vger.kernel.org, Mark McLoughlin To: Avi Kivity Return-path: Received: from mail21.svc.cra.dublin.eircom.net ([159.134.118.222]:33845 "HELO mail21.svc.cra.dublin.eircom.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753882AbYJ3RxY (ORCPT ); Thu, 30 Oct 2008 13:53:24 -0400 In-Reply-To: <1225389113-28332-6-git-send-email-markmc@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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 0612f5f..aa1c107 100644 --- a/qemu/hw/virtio-net.c +++ b/qemu/hw/virtio-net.c @@ -252,7 +252,9 @@ static int virtio_net_flush_tx(VirtIONet *n, VirtQueue *vq) 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.5.4.3