qemu/include/hw/virtio
Stefan Hajnoczi d0435bc513 virtio: don't enable notifications during polling
Virtqueue notifications are not necessary during polling, so we disable
them.  This allows the guest driver to avoid MMIO vmexits.
Unfortunately the virtio-blk and virtio-scsi handler functions re-enable
notifications, defeating this optimization.

Fix virtio-blk and virtio-scsi emulation so they leave notifications
disabled.  The key thing to remember for correctness is that polling
always checks one last time after ending its loop, therefore it's safe
to lose the race when re-enabling notifications at the end of polling.

There is a measurable performance improvement of 5-10% with the null-co
block driver.  Real-life storage configurations will see a smaller
improvement because the MMIO vmexit overhead contributes less to
latency.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20191209210957.65087-1-stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2020-01-05 07:03:03 -05:00
..
vhost-backend.h vhost-user: add vhost_user_gpu_set_socket() 2019-05-29 06:29:07 +02:00
vhost-scsi-common.h Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
vhost-scsi.h Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
vhost-user-blk.h Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
vhost-user-fs.h vhost-user-fs: remove "vhostfd" property 2019-12-13 10:38:58 +00:00
vhost-user-scsi.h Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
vhost-user.h vhost-user: simplify vhost_user_init/vhost_user_cleanup 2019-03-12 21:22:31 -04:00
vhost-vsock.h Clean up ill-advised or unusual header guards 2019-05-13 08:58:55 +02:00
vhost.h Include hw/hw.h exactly where needed 2019-08-16 13:31:52 +02:00
virtio-access.h include: Make headers more self-contained 2019-08-16 13:31:51 +02:00
virtio-balloon.h virtio-balloon: Use temporary PBP only 2019-07-25 07:58:03 -04:00
virtio-blk.h virtio-blk: advertise F_WCE (F_FLUSH) if F_CONFIG_WCE is advertised 2019-12-13 11:22:06 +00:00
virtio-bus.h Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
virtio-crypto.h Clean up ill-advised or unusual header guards 2019-05-13 08:58:55 +02:00
virtio-gpu-bswap.h include: Make headers more self-contained 2019-08-16 13:31:51 +02:00
virtio-gpu-pci.h hw/display: add vhost-user-vga & gpu-pci 2019-05-29 06:30:45 +02:00
virtio-gpu-pixman.h virtio-gpu: add a pixman helper header 2019-05-29 06:29:07 +02:00
virtio-gpu.h edid: flip the default to enabled 2019-06-13 09:34:50 +02:00
virtio-input.h Add vhost-user-input-pci 2019-05-10 14:52:47 +02:00
virtio-mmio.h hw/virtio: Factorize virtio-mmio headers 2019-10-22 09:38:42 +02:00
virtio-net.h net/virtio: add failover support 2019-10-29 18:55:26 -04:00
virtio-pmem.h Include sysemu/hostmem.h less 2019-08-16 13:31:53 +02:00
virtio-rng.h virtio-rng: Keep the default backend out of VirtIORNGConf 2019-09-04 06:32:51 -04:00
virtio-scsi.h virtio-scsi: remove unused argument to virtio_scsi_common_realize 2019-07-19 19:04:38 +02:00
virtio-serial.h Include hw/qdev-properties.h less 2019-08-16 13:31:53 +02:00
virtio.h virtio: don't enable notifications during polling 2020-01-05 07:03:03 -05:00