]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Save context switch per I/O for iSCSI and IOCTL frontends.
authorAlexander Motin <mav@FreeBSD.org>
Fri, 19 Feb 2021 03:07:32 +0000 (22:07 -0500)
committerAlexander Motin <mav@FreeBSD.org>
Mon, 15 Mar 2021 02:42:02 +0000 (22:42 -0400)
commitcfd358d99732463a9ec2ed3d81374dae9f12b112
treef17ff9808d9118af913ccc0de9a789d1bdd8e674
parent15fe13c887d6133b4b6d91c780a91c67fdb6b063
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

(cherry picked from commit 812c9f48a2b7bccc31b2a6077b299822357832e4)
sys/cam/ctl/README.ctl.txt
sys/cam/ctl/ctl.c
sys/cam/ctl/ctl_frontend.h
sys/cam/ctl/ctl_frontend_ioctl.c
sys/cam/ctl/ctl_frontend_iscsi.c
sys/cam/ctl/ctl_tpc.c