diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2005-11-30 00:12:59 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-12-13 20:12:00 -0500 |
commit | 9e3961ba2be51a88c6223143568c80e0616d93ce (patch) | |
tree | b811c3ab70d14997718596c9ec21a08561b34d5f /drivers/scsi/iscsi_tcp.c | |
parent | f6cfba1d21e9e4afd80e2274aa4df3dc1bd0aab7 (diff) |
[SCSI] iscsi: lower queue depth
From Wang Zhenyu:
High queue depth was a problem for some targets so make queue_depth adjustable
From Mike Christie
Make default queue_depth a little lower
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/iscsi_tcp.c')
-rw-r--r-- | drivers/scsi/iscsi_tcp.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index 83e2f8c8e496..5b14c404069f 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c | |||
@@ -2402,6 +2402,15 @@ fault: | |||
2402 | } | 2402 | } |
2403 | 2403 | ||
2404 | static int | 2404 | static int |
2405 | iscsi_change_queue_depth(struct scsi_device *sdev, int depth) | ||
2406 | { | ||
2407 | if (depth > ISCSI_MAX_CMD_PER_LUN) | ||
2408 | depth = ISCSI_MAX_CMD_PER_LUN; | ||
2409 | scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth); | ||
2410 | return sdev->queue_depth; | ||
2411 | } | ||
2412 | |||
2413 | static int | ||
2405 | iscsi_pool_init(struct iscsi_queue *q, int max, void ***items, int item_size) | 2414 | iscsi_pool_init(struct iscsi_queue *q, int max, void ***items, int item_size) |
2406 | { | 2415 | { |
2407 | int i; | 2416 | int i; |
@@ -3260,13 +3269,14 @@ iscsi_r2tpool_free(struct iscsi_session *session) | |||
3260 | static struct scsi_host_template iscsi_sht = { | 3269 | static struct scsi_host_template iscsi_sht = { |
3261 | .name = "iSCSI Initiator over TCP/IP, v." | 3270 | .name = "iSCSI Initiator over TCP/IP, v." |
3262 | ISCSI_VERSION_STR, | 3271 | ISCSI_VERSION_STR, |
3263 | .queuecommand = iscsi_queuecommand, | 3272 | .queuecommand = iscsi_queuecommand, |
3273 | .change_queue_depth = iscsi_change_queue_depth, | ||
3264 | .can_queue = ISCSI_XMIT_CMDS_MAX - 1, | 3274 | .can_queue = ISCSI_XMIT_CMDS_MAX - 1, |
3265 | .sg_tablesize = ISCSI_SG_TABLESIZE, | 3275 | .sg_tablesize = ISCSI_SG_TABLESIZE, |
3266 | .cmd_per_lun = ISCSI_CMD_PER_LUN, | 3276 | .cmd_per_lun = ISCSI_DEF_CMD_PER_LUN, |
3267 | .eh_abort_handler = iscsi_eh_abort, | 3277 | .eh_abort_handler = iscsi_eh_abort, |
3268 | .eh_host_reset_handler = iscsi_eh_host_reset, | 3278 | .eh_host_reset_handler = iscsi_eh_host_reset, |
3269 | .use_clustering = DISABLE_CLUSTERING, | 3279 | .use_clustering = DISABLE_CLUSTERING, |
3270 | .proc_name = "iscsi_tcp", | 3280 | .proc_name = "iscsi_tcp", |
3271 | .this_id = -1, | 3281 | .this_id = -1, |
3272 | }; | 3282 | }; |