[PATCH 0/6] virtio-scsi: fix 100% CPU consumption in IOThread

Stefan Hajnoczi posted 6 patches 1 year, 11 months ago
include/hw/virtio/virtio-scsi.h |  43 --------------
include/hw/virtio/virtio.h      |   1 +
hw/scsi/virtio-scsi-dataplane.c |   2 +-
hw/scsi/virtio-scsi.c           | 101 ++++++++++++++++++++++----------
hw/virtio/virtio.c              |  13 ++++
5 files changed, 86 insertions(+), 74 deletions(-)
[PATCH 0/6] virtio-scsi: fix 100% CPU consumption in IOThread
Posted by Stefan Hajnoczi 1 year, 11 months ago
Nir Soffer reported that virtio-scsi,iothread=... consumes 100% CPU in QEMU
7.0. This patch series addresses two bugs in hw/scsi/virtio-scsi.c (see patches
1 & 2) and follows up with code cleanups.

Stefan Hajnoczi (6):
  virtio-scsi: fix ctrl and event handler functions in dataplane mode
  virtio-scsi: don't waste CPU polling the event virtqueue
  virtio-scsi: clean up virtio_scsi_handle_event_vq()
  virtio-scsi: clean up virtio_scsi_handle_ctrl_vq()
  virtio-scsi: clean up virtio_scsi_handle_cmd_vq()
  virtio-scsi: move request-related items from .h to .c

 include/hw/virtio/virtio-scsi.h |  43 --------------
 include/hw/virtio/virtio.h      |   1 +
 hw/scsi/virtio-scsi-dataplane.c |   2 +-
 hw/scsi/virtio-scsi.c           | 101 ++++++++++++++++++++++----------
 hw/virtio/virtio.c              |  13 ++++
 5 files changed, 86 insertions(+), 74 deletions(-)

-- 
2.35.1
Re: [PATCH 0/6] virtio-scsi: fix 100% CPU consumption in IOThread
Posted by Stefan Hajnoczi 1 year, 11 months ago
On Wed, Apr 27, 2022 at 03:35:35PM +0100, Stefan Hajnoczi wrote:
> Nir Soffer reported that virtio-scsi,iothread=... consumes 100% CPU in QEMU
> 7.0. This patch series addresses two bugs in hw/scsi/virtio-scsi.c (see patches
> 1 & 2) and follows up with code cleanups.
> 
> Stefan Hajnoczi (6):
>   virtio-scsi: fix ctrl and event handler functions in dataplane mode
>   virtio-scsi: don't waste CPU polling the event virtqueue
>   virtio-scsi: clean up virtio_scsi_handle_event_vq()
>   virtio-scsi: clean up virtio_scsi_handle_ctrl_vq()
>   virtio-scsi: clean up virtio_scsi_handle_cmd_vq()
>   virtio-scsi: move request-related items from .h to .c
> 
>  include/hw/virtio/virtio-scsi.h |  43 --------------
>  include/hw/virtio/virtio.h      |   1 +
>  hw/scsi/virtio-scsi-dataplane.c |   2 +-
>  hw/scsi/virtio-scsi.c           | 101 ++++++++++++++++++++++----------
>  hw/virtio/virtio.c              |  13 ++++
>  5 files changed, 86 insertions(+), 74 deletions(-)
> 
> -- 
> 2.35.1
> 

Thanks, applied to my block tree:
https://gitlab.com/stefanha/qemu/commits/block

Stefan