]> git.ipfire.org Git - thirdparty/qemu.git/commit
virtio-scsi: add iothread-vq-mapping parameter
authorStefan Hajnoczi <stefanha@redhat.com>
Tue, 11 Mar 2025 13:26:14 +0000 (21:26 +0800)
committerKevin Wolf <kwolf@redhat.com>
Thu, 13 Mar 2025 16:57:23 +0000 (17:57 +0100)
commit2e8e18c2e46307a355e547129b5a7a7000a0cf0d
tree1a8bd7a36fb921fc9c7b1f7422296bdbdaef5167
parentb50629c335804e193b51936867d6cb7ea3735d72
virtio-scsi: add iothread-vq-mapping parameter

Allow virtio-scsi virtqueues to be assigned to different IOThreads. This
makes it possible to take advantage of host multi-queue block layer
scalability by assigning virtqueues that have affinity with vCPUs to
different IOThreads that have affinity with host CPUs. The same feature
was introduced for virtio-blk in the past:
https://developers.redhat.com/articles/2024/09/05/scaling-virtio-blk-disk-io-iothread-virtqueue-mapping

Here are fio randread 4k iodepth=64 results from a 4 vCPU guest with an
Intel P4800X SSD:
iothreads IOPS
------------------------------
1         189576
2         312698
4         346744

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-ID: <20250311132616.1049687-12-stefanha@redhat.com>
Tested-by: Peter Krempa <pkrempa@redhat.com>
[kwolf: Updated 051 output, virtio-scsi can now use any iothread]
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/scsi/virtio-scsi-dataplane.c
hw/scsi/virtio-scsi.c
include/hw/virtio/virtio-scsi.h
tests/qemu-iotests/051.pc.out