Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Mike Christie and committed by
James Bottomley
e28f3d5b c93f87c7

+5 -13
+2 -2
drivers/infiniband/ulp/iser/iscsi_iser.c
··· 404 404 struct Scsi_Host *shost; 405 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 408 if (!shost) 409 409 return NULL; 410 410 shost->transportt = iscsi_iser_scsi_transport; ··· 596 596 .change_queue_depth = iscsi_change_queue_depth, 597 597 .sg_tablesize = ISCSI_ISER_SG_TABLESIZE, 598 598 .max_sectors = 1024, 599 - .cmd_per_lun = ISCSI_MAX_CMD_PER_LUN, 599 + .cmd_per_lun = ISER_DEF_CMD_PER_LUN, 600 600 .eh_abort_handler = iscsi_eh_abort, 601 601 .eh_device_reset_handler= iscsi_eh_device_reset, 602 602 .eh_target_reset_handler= iscsi_eh_target_reset,
+1 -1
drivers/infiniband/ulp/iser/iscsi_iser.h
··· 93 93 94 94 /* support upto 512KB in one RDMA */ 95 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 98 /* QP settings */ 99 99 /* Maximal bounds on received asynchronous PDUs */
+1 -8
drivers/scsi/libiscsi.c
··· 1451 1451 1452 1452 int 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 1454 scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth); 1457 1455 return sdev->queue_depth; 1458 1456 } ··· 2060 2062 if (!shost) 2061 2063 return NULL; 2062 2064 2063 - if (qdepth > ISCSI_MAX_CMD_PER_LUN || qdepth < 1) { 2064 - if (qdepth != 0) 2065 - printk(KERN_ERR "iscsi: invalid queue depth of %d. " 2066 - "Queue depth must be between 1 and %d.\n", 2067 - qdepth, ISCSI_MAX_CMD_PER_LUN); 2065 + if (qdepth == 0) 2068 2066 qdepth = ISCSI_DEF_CMD_PER_LUN; 2069 - } 2070 2067 shost->cmd_per_lun = qdepth; 2071 2068 2072 2069 ihost = shost_priv(shost);
+1 -2
include/scsi/libiscsi.h
··· 48 48 #define ISCSI_DEF_XMIT_CMDS_MAX 128 /* must be power of 2 */ 49 49 #define ISCSI_MGMT_CMDS_MAX 15 50 50 51 - #define ISCSI_DEF_CMD_PER_LUN 32 52 - #define ISCSI_MAX_CMD_PER_LUN 128 51 + #define ISCSI_DEF_CMD_PER_LUN 32 53 52 54 53 /* Task Mgmt states */ 55 54 enum {