[RFC PATCH 4/4] scsi: iscsi_tcp: Allow user to control if transmit from queuecommand

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Transmitting from the queuecommand is nice when your app and iscsi threads
have to run on the same CPU. But, for the case where you want higher
throughput/IOPs it's sometimes better to hog multiple CPUs with the app on
one CPU and the xmit/recv paths an another. To allow both configs this
adds a modparam.

Signed-off-by: Mike Christie <michael.christie@xxxxxxxxxx>
---
 drivers/scsi/iscsi_tcp.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c
index c2627505011d..c48707b53746 100644
--- a/drivers/scsi/iscsi_tcp.c
+++ b/drivers/scsi/iscsi_tcp.c
@@ -56,6 +56,10 @@ static bool iscsi_use_recv_wq;
 module_param_named(use_recv_wq, iscsi_use_recv_wq, bool, 0644);
 MODULE_PARM_DESC(use_recv_wq, "Set to true to read iSCSI data/headers from the iscsi_q workqueue. The default is false which will perform reads from the network softirq context.");
 
+static bool iscsi_xmit_from_qc;
+module_param_named(xmit_from_queuecommand, iscsi_xmit_from_qc, bool, 0644);
+MODULE_PARM_DESC(xmit_from_queuecommand, "Set to true to try to xmit the task from the queuecommand callout. The default is false wihch will xmit the task from the iscsi_q workqueue.");
+
 static int iscsi_sw_tcp_dbg;
 module_param_named(debug_iscsi_tcp, iscsi_sw_tcp_dbg, int,
 		   S_IRUGO | S_IWUSR);
@@ -909,6 +913,7 @@ iscsi_sw_tcp_session_create(struct iscsi_endpoint *ep, uint16_t cmds_max,
 	struct iscsi_cls_session *cls_session;
 	struct iscsi_session *session;
 	struct iscsi_sw_tcp_host *tcp_sw_host;
+	struct iscsi_host *ihost;
 	struct Scsi_Host *shost;
 	int rc;
 
@@ -928,6 +933,12 @@ iscsi_sw_tcp_session_create(struct iscsi_endpoint *ep, uint16_t cmds_max,
 	shost->max_channel = 0;
 	shost->max_cmd_len = SCSI_MAX_VARLEN_CDB_SIZE;
 
+	if (iscsi_xmit_from_qc) {
+		shost->hostt->queuecommand_blocks = true;
+		ihost = shost_priv(shost);
+		ihost->xmit_from_qc = true;
+	}
+
 	rc = iscsi_host_get_max_scsi_cmds(shost, cmds_max);
 	if (rc < 0)
 		goto free_host;
-- 
2.25.1




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux