qemu-e2k/include/hw/virtio
Richard W.M. Jones 5c0919d020 virtio-scsi: Add virtqueue_size parameter allowing virtqueue size to be set.
Since Linux switched to blk-mq as the default in Linux commit
5c279bd9e406 ("scsi: default to scsi-mq"), virtio-scsi LUNs consume
about 10x as much guest kernel memory.

This commit allows you to choose the virtqueue size for each
virtio-scsi-pci controller like this:

  -device virtio-scsi-pci,id=scsi,virtqueue_size=16

The default is still 128 as before.  Using smaller virtqueue_size
allows many more disks to be added to small memory virtual machines.
For a 1 vCPU, 500 MB, no swap VM I observed:

  With scsi-mq enabled (upstream kernel):              175 disks
    -"- ditto -"-   virtqueue_size=64:                 318 disks
    -"- ditto -"-   virtqueue_size=16:                 775 disks
  With scsi-mq disabled (kernel before 5c279bd9e406): 1755 disks

Note that to have any effect, this requires a kernel patch:

  https://lkml.org/lkml/2017/8/10/689

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Message-Id: <20170810165255.20865-1-rjones@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-09-19 14:09:11 +02:00
..
vhost-backend.h vhost: rework IOTLB messaging 2017-06-02 18:57:17 +03:00
vhost-scsi-common.h vhost-scsi: create a vhost-scsi-common abstraction 2017-05-05 12:10:00 +02:00
vhost-scsi.h vhost-scsi: create a vhost-scsi-common abstraction 2017-05-05 12:10:00 +02:00
vhost-user-scsi.h vhost-user-scsi: Introduce vhost-user-scsi host device 2017-06-15 11:18:40 +02:00
vhost-vsock.h
vhost.h vhost: propagate errors in vhost_device_iotlb_miss() 2017-06-02 18:57:17 +03:00
virtio-access.h virtio: add virtio_*_phys_cached 2017-02-17 21:52:30 +02:00
virtio-balloon.h
virtio-blk.h
virtio-bus.h
virtio-crypto.h
virtio-gpu.h virtio-gpu: move virtio_gpu_gl_block 2017-05-12 12:02:48 +02:00
virtio-input.h virtio-input: fix eventq batching 2017-03-27 12:14:45 +02:00
virtio-net.h virtio-net: enable configurable tx queue size 2017-07-03 22:29:48 +03:00
virtio-rng.h virtio-rng: stop virtqueue while the CPU is stopped 2017-04-21 12:25:40 +02:00
virtio-scsi.h virtio-scsi: Add virtqueue_size parameter allowing virtqueue size to be set. 2017-09-19 14:09:11 +02:00
virtio-serial.h
virtio.h virtio_net: Bypass backends for MTU feature negotiation 2017-05-25 21:25:28 +03:00