]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
scsi: vhost-scsi: Report direction completion support
authorMike Christie <michael.christie@oracle.com>
Sun, 22 Feb 2026 23:27:04 +0000 (17:27 -0600)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sun, 1 Mar 2026 02:04:03 +0000 (21:04 -0500)
This has vhost-scsi report that it supports direct completions.

When using a worker task per queue or group of queues with fast backends
then enabling direct completion and submissions increases performance
20-30% with workloads like:

  fio --filename=/dev/sdb  --direct=1 --rw=randrw --bs=8K \
      --ioengine=libaio --iodepth=128  --numjobs=$jobs

As jobs matches and passes the number of vCPUs in the VM then the
benefit increases.

However, when using a single worker then queueing completions and
submissions is best as the worker is busy handling mapping data and
setting/tearing down commands.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
Link: https://patch.msgid.link/20260222232946.7637-5-michael.christie@oracle.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/vhost/scsi.c

index 903d4c5be2b26b24903d43ce95c129e26a8c49b0..9a1253b9d8c50ebcffd06289d0e8aff4d7dc879e 100644 (file)
@@ -2951,6 +2951,7 @@ static const struct target_core_fabric_ops vhost_scsi_ops = {
        .tfc_tpg_attrib_attrs           = vhost_scsi_tpg_attrib_attrs,
 
        .default_compl_type             = TARGET_QUEUE_COMPL,
+       .direct_compl_supp              = 1,
        .default_submit_type            = TARGET_QUEUE_SUBMIT,
        .direct_submit_supp             = 1,
 };