summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx/qla_init.c
diff options
context:
space:
mode:
authorQuinn Tran <quinn.tran@qlogic.com>2015-12-17 19:57:07 (GMT)
committerNicholas Bellinger <nab@linux-iscsi.org>2016-01-07 21:57:48 (GMT)
commit2f424b9b36ad7062e9ade41a9fb034d21a9e4e4b (patch)
tree16b9022e3a39b29ea0d495db00610e0535fe805a /drivers/scsi/qla2xxx/qla_init.c
parentfb3269baf4ecc2ce6d17d4eb537080035bdf6d5b (diff)
downloadlinux-2f424b9b36ad7062e9ade41a9fb034d21a9e4e4b.tar.xz
qla2xxx: Move atioq to a different lock to reduce lock contention
99% of the time the ATIOQ has SCSI command. The other 1% of time is something else. Most of the time this interrupt does not need to hold the hardware_lock. We're moving the ATIO interrupt thread to a different lock to reduce lock contention. Signed-off-by: Quinn Tran <quinn.tran@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_init.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 35d1ea8..993dd25 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -4919,7 +4919,7 @@ qla2x00_restart_isp(scsi_qla_host_t *vha)
struct qla_hw_data *ha = vha->hw;
struct req_que *req = ha->req_q_map[0];
struct rsp_que *rsp = ha->rsp_q_map[0];
- unsigned long flags;
+ unsigned long flags, flags2;
/* If firmware needs to be loaded */
if (qla2x00_isp_firmware(vha)) {
@@ -4948,8 +4948,10 @@ qla2x00_restart_isp(scsi_qla_host_t *vha)
* while we weren't online.
*/
spin_lock_irqsave(&ha->hardware_lock, flags);
+ spin_lock_irqsave(&ha->tgt.atio_lock, flags2);
if (qla_tgt_mode_enabled(vha))
- qlt_24xx_process_atio_queue(vha);
+ qlt_24xx_process_atio_queue(vha, 1);
+ spin_unlock_irqrestore(&ha->tgt.atio_lock, flags2);
spin_unlock_irqrestore(&ha->hardware_lock, flags);
set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags);