summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorTony Battersby <tonyb@cybernetics.com>2009-01-08 12:58:04 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-03-12 12:58:17 -0500
commitc2fd206e08cd55e7ee0d865affc172eb5af01c16 (patch)
treec74efdea9b4015b9fcba7a90d229c341ee480237 /drivers/scsi
parent783fa7311b2c639f39c6163f9fbb05253fb2d702 (diff)
downloadblackbird-op-linux-c2fd206e08cd55e7ee0d865affc172eb5af01c16.tar.gz
blackbird-op-linux-c2fd206e08cd55e7ee0d865affc172eb5af01c16.zip
[SCSI] sym53c8xx: use a queue depth of 1 for untagged devices
sym53c8xx uses a command queue depth of 2 for untagged devices, without good reason. This _mostly_ seems to work ok, but it has caused me some subtle problems. For example, I have an application where one thread sends write commands to a tape drive, and another thread sends log sense polling commands. With a queue depth of 2, the polling commands end up being starved for long periods of time while multiple write commands are serviced (this may also be related to the fact the the sg driver queues commands in LIFO order). This problem is fixed by changing the queue depth to 1 for untagged devices. I have tested this change extensively with many different tape drives, medium changers, and disk drives (disk drives of course use tagged commands and are therefore unaffected by this patch). Signed-off-by: Tony Battersby <tonyb@cybernetics.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_glue.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c
index a0d5aa6aad79..23e782015880 100644
--- a/drivers/scsi/sym53c8xx_2/sym_glue.c
+++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
@@ -792,9 +792,9 @@ static int sym53c8xx_slave_configure(struct scsi_device *sdev)
/*
* Select queue depth from driver setup.
- * Donnot use more than configured by user.
- * Use at least 2.
- * Donnot use more than our maximum.
+ * Do not use more than configured by user.
+ * Use at least 1.
+ * Do not use more than our maximum.
*/
reqtags = sym_driver_setup.max_tag;
if (reqtags > tp->usrtags)
@@ -803,7 +803,7 @@ static int sym53c8xx_slave_configure(struct scsi_device *sdev)
reqtags = 0;
if (reqtags > SYM_CONF_MAX_TAG)
reqtags = SYM_CONF_MAX_TAG;
- depth_to_use = reqtags ? reqtags : 2;
+ depth_to_use = reqtags ? reqtags : 1;
scsi_adjust_queue_depth(sdev,
sdev->tagged_supported ? MSG_SIMPLE_TAG : 0,
depth_to_use);
OpenPOWER on IntegriCloud