[SCSI] qla2xxx: Resolve a performance issue in interrupt
Reverted back a change in qla*_intr_handler code that caused an increase in cpu cycles by allowing interrupts to occur while the instance hardware lock was being held. Fix by taking the lock in irqsave mode. Reported-and-tested-by: Douglas W. Styner <douglas.w.styner@intel.com> Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
parent
babdb788f7
commit
43fac4d97a
1 changed files with 9 additions and 6 deletions
|
@ -37,6 +37,7 @@ qla2100_intr_handler(int irq, void *dev_id)
|
|||
uint16_t hccr;
|
||||
uint16_t mb[4];
|
||||
struct rsp_que *rsp;
|
||||
unsigned long flags;
|
||||
|
||||
rsp = (struct rsp_que *) dev_id;
|
||||
if (!rsp) {
|
||||
|
@ -49,7 +50,7 @@ qla2100_intr_handler(int irq, void *dev_id)
|
|||
reg = &ha->iobase->isp;
|
||||
status = 0;
|
||||
|
||||
spin_lock(&ha->hardware_lock);
|
||||
spin_lock_irqsave(&ha->hardware_lock, flags);
|
||||
vha = pci_get_drvdata(ha->pdev);
|
||||
for (iter = 50; iter--; ) {
|
||||
hccr = RD_REG_WORD(®->hccr);
|
||||
|
@ -101,7 +102,7 @@ qla2100_intr_handler(int irq, void *dev_id)
|
|||
RD_REG_WORD(®->hccr);
|
||||
}
|
||||
}
|
||||
spin_unlock(&ha->hardware_lock);
|
||||
spin_unlock_irqrestore(&ha->hardware_lock, flags);
|
||||
|
||||
if (test_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags) &&
|
||||
(status & MBX_INTERRUPT) && ha->flags.mbox_int) {
|
||||
|
@ -133,6 +134,7 @@ qla2300_intr_handler(int irq, void *dev_id)
|
|||
uint16_t mb[4];
|
||||
struct rsp_que *rsp;
|
||||
struct qla_hw_data *ha;
|
||||
unsigned long flags;
|
||||
|
||||
rsp = (struct rsp_que *) dev_id;
|
||||
if (!rsp) {
|
||||
|
@ -145,7 +147,7 @@ qla2300_intr_handler(int irq, void *dev_id)
|
|||
reg = &ha->iobase->isp;
|
||||
status = 0;
|
||||
|
||||
spin_lock(&ha->hardware_lock);
|
||||
spin_lock_irqsave(&ha->hardware_lock, flags);
|
||||
vha = pci_get_drvdata(ha->pdev);
|
||||
for (iter = 50; iter--; ) {
|
||||
stat = RD_REG_DWORD(®->u.isp2300.host_status);
|
||||
|
@ -216,7 +218,7 @@ qla2300_intr_handler(int irq, void *dev_id)
|
|||
WRT_REG_WORD(®->hccr, HCCR_CLR_RISC_INT);
|
||||
RD_REG_WORD_RELAXED(®->hccr);
|
||||
}
|
||||
spin_unlock(&ha->hardware_lock);
|
||||
spin_unlock_irqrestore(&ha->hardware_lock, flags);
|
||||
|
||||
if (test_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags) &&
|
||||
(status & MBX_INTERRUPT) && ha->flags.mbox_int) {
|
||||
|
@ -1626,6 +1628,7 @@ qla24xx_intr_handler(int irq, void *dev_id)
|
|||
uint32_t hccr;
|
||||
uint16_t mb[4];
|
||||
struct rsp_que *rsp;
|
||||
unsigned long flags;
|
||||
|
||||
rsp = (struct rsp_que *) dev_id;
|
||||
if (!rsp) {
|
||||
|
@ -1638,7 +1641,7 @@ qla24xx_intr_handler(int irq, void *dev_id)
|
|||
reg = &ha->iobase->isp24;
|
||||
status = 0;
|
||||
|
||||
spin_lock(&ha->hardware_lock);
|
||||
spin_lock_irqsave(&ha->hardware_lock, flags);
|
||||
vha = pci_get_drvdata(ha->pdev);
|
||||
for (iter = 50; iter--; ) {
|
||||
stat = RD_REG_DWORD(®->host_status);
|
||||
|
@ -1688,7 +1691,7 @@ qla24xx_intr_handler(int irq, void *dev_id)
|
|||
WRT_REG_DWORD(®->hccr, HCCRX_CLR_RISC_INT);
|
||||
RD_REG_DWORD_RELAXED(®->hccr);
|
||||
}
|
||||
spin_unlock(&ha->hardware_lock);
|
||||
spin_unlock_irqrestore(&ha->hardware_lock, flags);
|
||||
|
||||
if (test_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags) &&
|
||||
(status & MBX_INTERRUPT) && ha->flags.mbox_int) {
|
||||
|
|
Loading…
Reference in a new issue