linux-stable/drivers/target
Mike Christie e2f4ea4013 scsi: target: Allow userspace to request direct submissions
This allows userspace to request the fabric drivers do direct submissions
if they support it. With the new device file, submit_type, users can
write 0 - 2 to control how commands are submitted to the backend:

 0 - TARGET_FABRIC_DEFAULT_SUBMIT - LIO will use the fabric's default
     submission type. This is the default for compat.

 1 - TARGET_DIRECT_SUBMIT - LIO will submit the cmd to the backend from the
     calling context if the fabric the cmd was received on supports it,
     else it will use the fabric's default type.

 2 - TARGET_QUEUE_SUBMIT - LIO will queue the cmd to the LIO submission
     workqueue which will pass it to the backend.

When using an NVMe drive and vhost-scsi with direct submission we see
around a 20% improvement in 4K I/Os:

fio jobs        1       2       4       8       10
--------------------------------------------------
defer           94K     190K    394K    770K    890K
direct          128K    252K    488K    950K    -

And when using the queueing mode, we now no longer see issues like where
the iSCSI tx thread is blocked in the block layer waiting on a tag so it
can't respond to a nop or perform I/Os for other LUs.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
Link: https://lore.kernel.org/r/20230928020907.5730-6-michael.christie@oracle.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2023-10-13 15:53:58 -04:00
..
iscsi scsi: target: core: Kill transport_handle_cdb_direct() 2023-10-13 15:53:58 -04:00
loopback scsi: target: Allow userspace to request direct submissions 2023-10-13 15:53:58 -04:00
sbp scsi: target: Have drivers report if they support direct submissions 2023-10-13 15:53:57 -04:00
tcm_fc scsi: target: Have drivers report if they support direct submissions 2023-10-13 15:53:57 -04:00
tcm_remote scsi: target: Add virtual remote target 2023-03-16 23:36:37 -04:00
Kconfig scsi: target: Add virtual remote target 2023-03-16 23:36:37 -04:00
Makefile scsi: target: Add virtual remote target 2023-03-16 23:36:37 -04:00
target_core_alua.c scsi: target: core: Move core_alua_check_nonop_delay() call 2023-10-13 15:53:57 -04:00
target_core_alua.h
target_core_configfs.c scsi: target: Allow userspace to request direct submissions 2023-10-13 15:53:58 -04:00
target_core_device.c scsi: target: Allow userspace to request direct submissions 2023-10-13 15:53:58 -04:00
target_core_fabric_configfs.c scsi: target: core: Fix invalid memory access 2023-04-11 20:49:43 -04:00
target_core_fabric_lib.c
target_core_file.c scsi: target: Rename sbc_ops to exec_cmd_ops 2023-04-11 21:55:36 -04:00
target_core_file.h
target_core_hba.c
target_core_iblock.c SCSI misc on 20230902 2023-09-02 12:02:41 -07:00
target_core_iblock.h
target_core_internal.h Merge patch series "target: TMF and recovery fixes" 2023-03-24 17:39:15 -04:00
target_core_pr.c Merge patch series "Use block pr_ops in LIO" 2023-05-22 16:35:02 -04:00
target_core_pr.h
target_core_pscsi.c block: replace fmode_t with a block-specific type for block open flags 2023-06-12 08:04:05 -06:00
target_core_pscsi.h scsi: target: pscsi: Remove struct pscsi_plugin_task 2022-03-01 22:21:49 -05:00
target_core_rd.c scsi: target: Rename sbc_ops to exec_cmd_ops 2023-04-11 21:55:36 -04:00
target_core_rd.h
target_core_sbc.c scsi: target: Rename sbc_ops to exec_cmd_ops 2023-04-11 21:55:36 -04:00
target_core_spc.c Merge patch series "Use block pr_ops in LIO" 2023-05-22 16:35:02 -04:00
target_core_stat.c scsi: target: core: Use RTPI from target port 2023-03-09 21:29:23 -05:00
target_core_tmr.c scsi: target: Fix multiple LUN_RESET handling 2023-03-24 17:32:23 -04:00
target_core_tpg.c Merge patch series "target: TMF and recovery fixes" 2023-03-24 17:39:15 -04:00
target_core_transport.c scsi: target: Allow userspace to request direct submissions 2023-10-13 15:53:58 -04:00
target_core_ua.c
target_core_ua.h
target_core_user.c scsi: target: tcmu: Replace strlcpy() with strscpy() 2023-06-21 21:13:00 -04:00
target_core_xcopy.c scsi: target: Pass in cmd counter to use during cmd setup 2023-03-24 17:32:23 -04:00
target_core_xcopy.h scsi: target: core: Change the way target_xcopy_do_work() sets restiction on max I/O 2022-11-24 02:16:19 +00:00