aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_isr.c
diff options
context:
space:
mode:
authorMichael Reed <mdr@sgi.com>2009-04-07 01:33:47 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-05-20 18:21:10 -0400
commita13d8ac057705c479b8bf15e5303f18f899502f9 (patch)
treea97f78dd93e9432bc1eb63be512acc7a74a3791b /drivers/scsi/qla2xxx/qla_isr.c
parente1f916035f149540e5090207ceafca9ba779084e (diff)
[SCSI] qla2xxx: Conditionally disable automatic queue full tracking.
Changing a lun's queue depth (/sys/block/sdX/device/queue_depth) isn't sticky when the device is connected via a QLogic fibre channel adapter. The QLogic qla2xxx fibre channel driver dynamically adjusts a lun's queue depth. If a user has a specific need to limit the number of commands issued to a lun (say a tape drive, or a shared raid where the total commands issued to all luns is limited at the controller level, for example) and writes a limiting value to /sys/block/sdXX/device/queue_depth, the qla2xxx driver will silently and gradually increase the queue depth back to the driver limit of ql2xmaxqdepth. While reducing this value (module parameter) or increasing the interval between ramp ups (ql2xqfullrampup) offers the potential for a work around it would be better to have the option of just disabling the dynamic adjustment of queue depth. This patch implements an "off switch" as a module parameter. Signed-off-by: Michael Reed <mdr@sgi.com> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_isr.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_isr.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 41e50c2bec0f..eb35d2050f7a 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -765,6 +765,9 @@ qla2x00_adjust_sdev_qdepth_up(struct scsi_device *sdev, void *data)
765 struct qla_hw_data *ha = vha->hw; 765 struct qla_hw_data *ha = vha->hw;
766 struct req_que *req = NULL; 766 struct req_que *req = NULL;
767 767
768 if (!ql2xqfulltracking)
769 return;
770
768 req = vha->req; 771 req = vha->req;
769 if (!req) 772 if (!req)
770 return; 773 return;
@@ -807,6 +810,9 @@ qla2x00_ramp_up_queue_depth(scsi_qla_host_t *vha, struct req_que *req,
807 fc_port_t *fcport; 810 fc_port_t *fcport;
808 struct scsi_device *sdev; 811 struct scsi_device *sdev;
809 812
813 if (!ql2xqfulltracking)
814 return;
815
810 sdev = sp->cmd->device; 816 sdev = sp->cmd->device;
811 if (sdev->queue_depth >= req->max_q_depth) 817 if (sdev->queue_depth >= req->max_q_depth)
812 return; 818 return;
@@ -1125,6 +1131,8 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
1125 scsi_status)); 1131 scsi_status));
1126 1132
1127 /* Adjust queue depth for all luns on the port. */ 1133 /* Adjust queue depth for all luns on the port. */
1134 if (!ql2xqfulltracking)
1135 break;
1128 fcport->last_queue_full = jiffies; 1136 fcport->last_queue_full = jiffies;
1129 starget_for_each_device(cp->device->sdev_target, 1137 starget_for_each_device(cp->device->sdev_target,
1130 fcport, qla2x00_adjust_sdev_qdepth_down); 1138 fcport, qla2x00_adjust_sdev_qdepth_down);
@@ -1183,6 +1191,8 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
1183 * Adjust queue depth for all luns on the 1191 * Adjust queue depth for all luns on the
1184 * port. 1192 * port.
1185 */ 1193 */
1194 if (!ql2xqfulltracking)
1195 break;
1186 fcport->last_queue_full = jiffies; 1196 fcport->last_queue_full = jiffies;
1187 starget_for_each_device( 1197 starget_for_each_device(
1188 cp->device->sdev_target, fcport, 1198 cp->device->sdev_target, fcport,