aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_init.c
diff options
context:
space:
mode:
authorQuinn Tran <quinn.tran@qlogic.com>2015-12-17 14:57:07 -0500
committerNicholas Bellinger <nab@linux-iscsi.org>2016-01-07 16:57:48 -0500
commit2f424b9b36ad7062e9ade41a9fb034d21a9e4e4b (patch)
tree16b9022e3a39b29ea0d495db00610e0535fe805a /drivers/scsi/qla2xxx/qla_init.c
parentfb3269baf4ecc2ce6d17d4eb537080035bdf6d5b (diff)
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 35d1ea8a58d1..993dd25279ff 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)
4919 struct qla_hw_data *ha = vha->hw; 4919 struct qla_hw_data *ha = vha->hw;
4920 struct req_que *req = ha->req_q_map[0]; 4920 struct req_que *req = ha->req_q_map[0];
4921 struct rsp_que *rsp = ha->rsp_q_map[0]; 4921 struct rsp_que *rsp = ha->rsp_q_map[0];
4922 unsigned long flags; 4922 unsigned long flags, flags2;
4923 4923
4924 /* If firmware needs to be loaded */ 4924 /* If firmware needs to be loaded */
4925 if (qla2x00_isp_firmware(vha)) { 4925 if (qla2x00_isp_firmware(vha)) {
@@ -4948,8 +4948,10 @@ qla2x00_restart_isp(scsi_qla_host_t *vha)
4948 * while we weren't online. 4948 * while we weren't online.
4949 */ 4949 */
4950 spin_lock_irqsave(&ha->hardware_lock, flags); 4950 spin_lock_irqsave(&ha->hardware_lock, flags);
4951 spin_lock_irqsave(&ha->tgt.atio_lock, flags2);
4951 if (qla_tgt_mode_enabled(vha)) 4952 if (qla_tgt_mode_enabled(vha))
4952 qlt_24xx_process_atio_queue(vha); 4953 qlt_24xx_process_atio_queue(vha, 1);
4954 spin_unlock_irqrestore(&ha->tgt.atio_lock, flags2);
4953 spin_unlock_irqrestore(&ha->hardware_lock, flags); 4955 spin_unlock_irqrestore(&ha->hardware_lock, flags);
4954 4956
4955 set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags); 4957 set_bit(LOOP_RESYNC_NEEDED, &vha->dpc_flags);