summaryrefslogtreecommitdiffstats
path: root/fs/block_dev.c
diff options
context:
space:
mode:
authorMike Christie <michael.christie@oracle.com>2020-11-09 23:33:20 -0600
committerMichael S. Tsirkin <mst@redhat.com>2020-11-15 17:30:55 -0500
commit25b98b64e28423b0769313dcaf96423836b1f93d (patch)
tree4131375a8c84042a75c7b86efbe9c5ec604b5d5c /fs/block_dev.c
parent6bcf34224ac1e94103797fd68b9836061762f2b2 (diff)
downloadlinux-stable-25b98b64e28423b0769313dcaf96423836b1f93d.tar.gz
linux-stable-25b98b64e28423b0769313dcaf96423836b1f93d.tar.bz2
linux-stable-25b98b64e28423b0769313dcaf96423836b1f93d.zip
vhost scsi: alloc cmds per vq instead of session
We currently are limited to 256 cmds per session. This leads to problems where if the user has increased virtqueue_size to more than 2 or cmd_per_lun to more than 256 vhost_scsi_get_tag can fail and the guest will get IO errors. This patch moves the cmd allocation to per vq so we can easily match whatever the user has specified for num_queues and virtqueue_size/cmd_per_lun. It also makes it easier to control how much memory we preallocate. For cases, where perf is not as important and we can use the current defaults (1 vq and 128 cmds per vq) memory use from preallocate cmds is cut in half. For cases, where we are willing to use more memory for higher perf, cmd mem use will now increase as the num queues and queue depth increases. Signed-off-by: Mike Christie <michael.christie@oracle.com> Link: https://lore.kernel.org/r/1604986403-4931-3-git-send-email-michael.christie@oracle.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Maurizio Lombardi <mlombard@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'fs/block_dev.c')
0 files changed, 0 insertions, 0 deletions