virtio: Report real progress in VQ aio poll handler
In virtio_queue_host_notifier_aio_poll, not all "!virtio_queue_empty()" cases are making true progress. Currently the offending one is virtio-scsi event queue, whose handler does nothing if no event is pending. As a result aio_poll() will spin on the "non-empty" VQ and take 100% host CPU. Fix this by reporting actual progress from virtio queue aio handlers. Reported-by:Ed Swierk <eswierk@skyportsystems.com> Signed-off-by:
Fam Zheng <famz@redhat.com> Tested-by:
Ed Swierk <eswierk@skyportsystems.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
Showing
- hw/block/dataplane/virtio-blk.c 2 additions, 2 deletionshw/block/dataplane/virtio-blk.c
- hw/block/virtio-blk.c 10 additions, 2 deletionshw/block/virtio-blk.c
- hw/scsi/virtio-scsi-dataplane.c 7 additions, 7 deletionshw/scsi/virtio-scsi-dataplane.c
- hw/scsi/virtio-scsi.c 11 additions, 3 deletionshw/scsi/virtio-scsi.c
- hw/virtio/virtio.c 9 additions, 6 deletionshw/virtio/virtio.c
- include/hw/virtio/virtio-blk.h 1 addition, 1 deletioninclude/hw/virtio/virtio-blk.h
- include/hw/virtio/virtio-scsi.h 3 additions, 3 deletionsinclude/hw/virtio/virtio-scsi.h
- include/hw/virtio/virtio.h 2 additions, 2 deletionsinclude/hw/virtio/virtio.h
Loading
Please register or sign in to comment