summaryrefslogtreecommitdiff
path: root/drivers/scsi/iscsi_tcp.h
diff options
context:
space:
mode:
authorMike Christie <michael.christie@oracle.com>2022-06-17 01:45:51 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2022-06-22 04:19:22 +0300
commitf1d269765ee29da56b32818b7a08054484ed89f2 (patch)
tree97b0b41c94163255272cd1db2b62d72a5478a77d /drivers/scsi/iscsi_tcp.h
parent8af809966c0b34cfacd8da9a412689b8e9910354 (diff)
downloadlinux-f1d269765ee29da56b32818b7a08054484ed89f2.tar.xz
scsi: iscsi: Run recv path from workqueue
We don't always want to run the recv path from the network softirq because when we have to have multiple sessions sharing the same CPUs, some sessions can eat up the NAPI softirq budget and affect other sessions or users. Allow us to queue the recv handling to the iscsi workqueue so we can have the scheduler/wq code try to balance the work and CPU use across all sessions' worker threads. Note: It wasn't the original intent of the change but a nice side effect is that for some workloads/configs we get a nice performance boost. For a simple read heavy test: fio --direct=1 --filename=/dev/dm-0 --rw=randread --bs=256K --ioengine=libaio --iodepth=128 --numjobs=4 where the iscsi threads, fio jobs, and rps_cpus share CPUs we see a 32% throughput boost. We also see increases for small I/O IOPs tests but it's not as high. Link: https://lore.kernel.org/r/20220616224557.115234-4-michael.christie@oracle.com Reviewed-by: Lee Duncan <lduncan@suse.com> Signed-off-by: Mike Christie <michael.christie@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/iscsi_tcp.h')
-rw-r--r--drivers/scsi/iscsi_tcp.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/iscsi_tcp.h b/drivers/scsi/iscsi_tcp.h
index 791453195099..850a018aefb9 100644
--- a/drivers/scsi/iscsi_tcp.h
+++ b/drivers/scsi/iscsi_tcp.h
@@ -28,6 +28,8 @@ struct iscsi_sw_tcp_send {
struct iscsi_sw_tcp_conn {
struct socket *sock;
+ struct work_struct recvwork;
+ bool queue_recv;
struct iscsi_sw_tcp_send out;
/* old values for socket callbacks */