Skip to content
Commit 582b0ab2 authored by Richard W.M. Jones's avatar Richard W.M. Jones Committed by Martin K. Petersen
Browse files

scsi: virtio: virtio_scsi: Set can_queue to the length of the virtqueue.

Since switching to blk-mq as the default in commit 5c279bd9


("scsi: default to scsi-mq"), virtio-scsi LUNs consume about 10x as
much kernel memory.

qemu currently allocates a fixed 128 entry virtqueue.  can_queue
currently is set to 1024.  But with indirect descriptors, each command
in the queue takes 1 virtqueue entry, so the number of commands which
can be queued is equal to the length of the virtqueue.

Note I intend to send a patch to qemu to allow the virtqueue size to be
configured from the qemu command line.

Signed-off-by: default avatarRichard W.M. Jones <rjones@redhat.com>
Acked-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 44ed8089
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment