aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2009-03-05 15:46:01 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-03-13 16:28:06 -0400
commite28f3d5b51ed07d822f135cd941b01e2d485270e (patch)
treee64637e1e4f3bf6921f91729b6f299165929d6df
parentc93f87c727ad4e6a5d94cfab219b1492ccc5ca5e (diff)
[SCSI] libiscsi: don't cap queue depth in iscsi modules
There is no need to cap the queue depth in the modules. We set this in userspace and can do that there. For performance testing with ram based targets, this is helpful since we can have very high queue depths. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
-rw-r--r--drivers/infiniband/ulp/iser/iscsi_iser.c4
-rw-r--r--drivers/infiniband/ulp/iser/iscsi_iser.h2
-rw-r--r--drivers/scsi/libiscsi.c9
-rw-r--r--include/scsi/libiscsi.h3
4 files changed, 5 insertions, 13 deletions
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c
index 4338f54c41fa..5f79c0a5faf3 100644
--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
+++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
@@ -404,7 +404,7 @@ iscsi_iser_session_create(struct iscsi_endpoint *ep,
404 struct Scsi_Host *shost; 404 struct Scsi_Host *shost;
405 struct iser_conn *ib_conn; 405 struct iser_conn *ib_conn;
406 406
407 shost = iscsi_host_alloc(&iscsi_iser_sht, 0, ISCSI_MAX_CMD_PER_LUN); 407 shost = iscsi_host_alloc(&iscsi_iser_sht, 0, ISER_DEF_CMD_PER_LUN);
408 if (!shost) 408 if (!shost)
409 return NULL; 409 return NULL;
410 shost->transportt = iscsi_iser_scsi_transport; 410 shost->transportt = iscsi_iser_scsi_transport;
@@ -596,7 +596,7 @@ static struct scsi_host_template iscsi_iser_sht = {
596 .change_queue_depth = iscsi_change_queue_depth, 596 .change_queue_depth = iscsi_change_queue_depth,
597 .sg_tablesize = ISCSI_ISER_SG_TABLESIZE, 597 .sg_tablesize = ISCSI_ISER_SG_TABLESIZE,
598 .max_sectors = 1024, 598 .max_sectors = 1024,
599 .cmd_per_lun = ISCSI_MAX_CMD_PER_LUN, 599 .cmd_per_lun = ISER_DEF_CMD_PER_LUN,
600 .eh_abort_handler = iscsi_eh_abort, 600 .eh_abort_handler = iscsi_eh_abort,
601 .eh_device_reset_handler= iscsi_eh_device_reset, 601 .eh_device_reset_handler= iscsi_eh_device_reset,
602 .eh_target_reset_handler= iscsi_eh_target_reset, 602 .eh_target_reset_handler= iscsi_eh_target_reset,
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.h b/drivers/infiniband/ulp/iser/iscsi_iser.h
index 861119593f2b..9d529cae1f0d 100644
--- a/drivers/infiniband/ulp/iser/iscsi_iser.h
+++ b/drivers/infiniband/ulp/iser/iscsi_iser.h
@@ -93,7 +93,7 @@
93 93
94 /* support upto 512KB in one RDMA */ 94 /* support upto 512KB in one RDMA */
95#define ISCSI_ISER_SG_TABLESIZE (0x80000 >> SHIFT_4K) 95#define ISCSI_ISER_SG_TABLESIZE (0x80000 >> SHIFT_4K)
96#define ISCSI_ISER_MAX_LUN 256 96#define ISER_DEF_CMD_PER_LUN 128
97 97
98/* QP settings */ 98/* QP settings */
99/* Maximal bounds on received asynchronous PDUs */ 99/* Maximal bounds on received asynchronous PDUs */
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 701457cca08a..a5168a673503 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -1451,8 +1451,6 @@ EXPORT_SYMBOL_GPL(iscsi_queuecommand);
1451 1451
1452int iscsi_change_queue_depth(struct scsi_device *sdev, int depth) 1452int iscsi_change_queue_depth(struct scsi_device *sdev, int depth)
1453{ 1453{
1454 if (depth > ISCSI_MAX_CMD_PER_LUN)
1455 depth = ISCSI_MAX_CMD_PER_LUN;
1456 scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth); 1454 scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth);
1457 return sdev->queue_depth; 1455 return sdev->queue_depth;
1458} 1456}
@@ -2062,13 +2060,8 @@ struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht,
2062 if (!shost) 2060 if (!shost)
2063 return NULL; 2061 return NULL;
2064 2062
2065 if (qdepth > ISCSI_MAX_CMD_PER_LUN || qdepth < 1) { 2063 if (qdepth == 0)
2066 if (qdepth != 0)
2067 printk(KERN_ERR "iscsi: invalid queue depth of %d. "
2068 "Queue depth must be between 1 and %d.\n",
2069 qdepth, ISCSI_MAX_CMD_PER_LUN);
2070 qdepth = ISCSI_DEF_CMD_PER_LUN; 2064 qdepth = ISCSI_DEF_CMD_PER_LUN;
2071 }
2072 shost->cmd_per_lun = qdepth; 2065 shost->cmd_per_lun = qdepth;
2073 2066
2074 ihost = shost_priv(shost); 2067 ihost = shost_priv(shost);
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h
index 67542aa3aedc..898de4a73727 100644
--- a/include/scsi/libiscsi.h
+++ b/include/scsi/libiscsi.h
@@ -48,8 +48,7 @@ struct device;
48#define ISCSI_DEF_XMIT_CMDS_MAX 128 /* must be power of 2 */ 48#define ISCSI_DEF_XMIT_CMDS_MAX 128 /* must be power of 2 */
49#define ISCSI_MGMT_CMDS_MAX 15 49#define ISCSI_MGMT_CMDS_MAX 15
50 50
51#define ISCSI_DEF_CMD_PER_LUN 32 51#define ISCSI_DEF_CMD_PER_LUN 32
52#define ISCSI_MAX_CMD_PER_LUN 128
53 52
54/* Task Mgmt states */ 53/* Task Mgmt states */
55enum { 54enum {