[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 2/4] virtio-pci: Use ioeventfd for virtqueue
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH v5 2/4] virtio-pci: Use ioeventfd for virtqueue notify |
Date: |
Mon, 24 Jan 2011 19:54:20 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.0.10-1.fc12 Thunderbird/3.0.10 |
Am 12.12.2010 16:02, schrieb Stefan Hajnoczi:
> Virtqueue notify is currently handled synchronously in userspace virtio. This
> prevents the vcpu from executing guest code while hardware emulation code
> handles the notify.
>
> On systems that support KVM, the ioeventfd mechanism can be used to make
> virtqueue notify a lightweight exit by deferring hardware emulation to the
> iothread and allowing the VM to continue execution. This model is similar to
> how vhost receives virtqueue notifies.
>
> The result of this change is improved performance for userspace virtio
> devices.
> Virtio-blk throughput increases especially for multithreaded scenarios and
> virtio-net transmit throughput increases substantially.
>
> Some virtio devices are known to have guest drivers which expect a notify to
> be
> processed synchronously and spin waiting for completion. Only enable
> ioeventfd
> for virtio-blk and virtio-net for now.
>
> Care must be taken not to interfere with vhost-net, which uses host
> notifiers. If the set_host_notifier() API is used by a device
> virtio-pci will disable virtio-ioeventfd and let the device deal with
> host notifiers as it wishes.
>
> After migration and on VM change state (running/paused) virtio-ioeventfd
> will enable/disable itself.
>
> * VIRTIO_CONFIG_S_DRIVER_OK -> enable virtio-ioeventfd
> * !VIRTIO_CONFIG_S_DRIVER_OK -> disable virtio-ioeventfd
> * virtio_pci_set_host_notifier() -> disable virtio-ioeventfd
> * vm_change_state(running=0) -> disable virtio-ioeventfd
> * vm_change_state(running=1) -> enable virtio-ioeventfd
>
> Signed-off-by: Stefan Hajnoczi <address@hidden>
On current git master I'm getting hangs when running iozone on a
virtio-blk disk. "Hang" means that it's not responsive any more and has
100% CPU consumption.
I bisected the problem to this patch. Any ideas?
Kevin
- Re: [Qemu-devel] [PATCH v5 2/4] virtio-pci: Use ioeventfd for virtqueue notify,
Kevin Wolf <=
- Re: [Qemu-devel] [PATCH v5 2/4] virtio-pci: Use ioeventfd for virtqueue notify, Michael S. Tsirkin, 2011/01/24
- Re: [Qemu-devel] [PATCH v5 2/4] virtio-pci: Use ioeventfd for virtqueue notify, Kevin Wolf, 2011/01/24
- Re: [Qemu-devel] [PATCH v5 2/4] virtio-pci: Use ioeventfd for virtqueue notify, Michael S. Tsirkin, 2011/01/24
- Re: [Qemu-devel] [PATCH v5 2/4] virtio-pci: Use ioeventfd for virtqueue notify, Kevin Wolf, 2011/01/24
- Re: [Qemu-devel] [PATCH v5 2/4] virtio-pci: Use ioeventfd for virtqueue notify, Stefan Hajnoczi, 2011/01/25
- Re: [Qemu-devel] [PATCH v5 2/4] virtio-pci: Use ioeventfd for virtqueue notify, Stefan Hajnoczi, 2011/01/25
- Re: [Qemu-devel] [PATCH v5 2/4] virtio-pci: Use ioeventfd for virtqueue notify, Stefan Hajnoczi, 2011/01/25
- Re: [Qemu-devel] [PATCH v5 2/4] virtio-pci: Use ioeventfd for virtqueue notify, Michael S. Tsirkin, 2011/01/25
- Re: [Qemu-devel] [PATCH v5 2/4] virtio-pci: Use ioeventfd for virtqueue notify, Stefan Hajnoczi, 2011/01/25
- Re: [Qemu-devel] [PATCH v5 2/4] virtio-pci: Use ioeventfd for virtqueue notify, Stefan Hajnoczi, 2011/01/25