aboutsummaryrefslogtreecommitdiff
path: root/sys/cam/ctl/ctl_frontend.h
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2021-02-19 03:07:32 +0000
committerAlexander Motin <mav@FreeBSD.org>2021-02-19 03:29:38 +0000
commit812c9f48a2b7bccc31b2a6077b299822357832e4 (patch)
tree010235d080cc84effb1ee127a2b3dfd3f7f21e66 /sys/cam/ctl/ctl_frontend.h
parent4621c4f2fd179eff0923140da9af122c42dbe78b (diff)
downloadsrc-812c9f48a2b7bccc31b2a6077b299822357832e4.tar.gz
src-812c9f48a2b7bccc31b2a6077b299822357832e4.zip
Save context switch per I/O for iSCSI and IOCTL frontends.
Introduce new CTL core KPI ctl_run(), preprocessing I/Os in the caller context instead of scheduling another thread just for that. This call may sleep, that is not acceptable for some frontends like the original CAM/FC one, but iSCSI already has separate sleepable per-connection RX threads, and another thread scheduling is mostly just a waste of time. IOCTL frontend actually waits for the I/O completion in the caller thread, so the use of another thread for this has even less sense. With this change I can measure ~5% IOPS improvement on 4KB iSCSI I/Os to ZFS. MFC after: 1 month
Diffstat (limited to 'sys/cam/ctl/ctl_frontend.h')
-rw-r--r--sys/cam/ctl/ctl_frontend.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/cam/ctl/ctl_frontend.h b/sys/cam/ctl/ctl_frontend.h
index bdcb7a2e1abd..c9ab255cdde4 100644
--- a/sys/cam/ctl/ctl_frontend.h
+++ b/sys/cam/ctl/ctl_frontend.h
@@ -311,6 +311,13 @@ void ctl_port_offline(struct ctl_port *fe);
int ctl_queue(union ctl_io *io);
/*
+ * This routine starts execution of I/O and task management requests from
+ * the FETD to the CTL layer. May sleep. Returns 0 for success, non-zero
+ * for failure.
+ */
+int ctl_run(union ctl_io *io);
+
+/*
* This routine is used if the front end interface doesn't support
* autosense (e.g. non-packetized parallel SCSI). This will queue the
* scsiio structure back to a per-lun pending sense queue. This MUST be