OSDN Git Service

scsi: virtio_scsi: implement request batching
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 30 May 2019 11:28:11 +0000 (13:28 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 22 Jul 2019 20:44:07 +0000 (16:44 -0400)
commit9e5470fe2d61bd87c27c7722099bafab277f81ec
tree9cbca4e9d938b301a778d2bf5349ac68d10a5fc4
parent8930a6c207918d5a5675eedab06a71096b1a3d47
scsi: virtio_scsi: implement request batching

Adding the command and kicking the virtqueue so far was done one after
another.  Make the kick optional, so that we can take into account
SCMD_LAST.  We also need a commit_rqs callback to kick the device if
blk-mq aborts the submission before the last request is reached.

Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/virtio_scsi.c