We can avoid grabbing any locks in the interrupt path for MSI-X interrupts
and simply schedule the iopoll thread.

Signed-off-by: Brian King <brk...@linux.vnet.ibm.com>
---

 drivers/scsi/ipr.c |   26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff -puN drivers/scsi/ipr.c~ipr_msrrq_optimize drivers/scsi/ipr.c
--- linux-2.6.git/drivers/scsi/ipr.c~ipr_msrrq_optimize 2016-09-05 
15:19:25.197737194 -0500
+++ linux-2.6.git-bjking1/drivers/scsi/ipr.c    2016-09-05 15:19:25.203737161 
-0500
@@ -5763,8 +5763,11 @@ static int ipr_iopoll(struct irq_poll *i
        spin_lock_irqsave(hrrq->lock, hrrq_flags);
        completed_ops = ipr_process_hrrq(hrrq, budget, &doneq);
 
-       if (completed_ops < budget)
+       if (completed_ops < budget) {
                irq_poll_complete(iop);
+               if ((be32_to_cpu(*hrrq->hrrq_curr) & IPR_HRRQ_TOGGLE_BIT) == 
hrrq->toggle_bit)
+                       irq_poll_sched(&hrrq->iopoll);
+       }
        spin_unlock_irqrestore(hrrq->lock, hrrq_flags);
 
        list_for_each_entry_safe(ipr_cmd, temp, &doneq, queue) {
@@ -5861,6 +5864,11 @@ static irqreturn_t ipr_isr_mhrrq(int irq
        irqreturn_t rc = IRQ_NONE;
        LIST_HEAD(doneq);
 
+       if (ioa_cfg->iopoll_weight && ioa_cfg->sis64 && ioa_cfg->nvectors > 1) {
+               irq_poll_sched(&hrrq->iopoll);
+               return IRQ_HANDLED;
+       }
+
        spin_lock_irqsave(hrrq->lock, hrrq_flags);
 
        /* If interrupts are disabled, ignore the interrupt */
@@ -5869,19 +5877,11 @@ static irqreturn_t ipr_isr_mhrrq(int irq
                return IRQ_NONE;
        }
 
-       if (ioa_cfg->iopoll_weight && ioa_cfg->sis64 && ioa_cfg->nvectors > 1) {
-               if ((be32_to_cpu(*hrrq->hrrq_curr) & IPR_HRRQ_TOGGLE_BIT) ==
-                      hrrq->toggle_bit) {
-                       irq_poll_sched(&hrrq->iopoll);
-                       spin_unlock_irqrestore(hrrq->lock, hrrq_flags);
-                       return IRQ_HANDLED;
-               }
-       } else {
-               if ((be32_to_cpu(*hrrq->hrrq_curr) & IPR_HRRQ_TOGGLE_BIT) ==
-                       hrrq->toggle_bit)
+       if ((be32_to_cpu(*hrrq->hrrq_curr) & IPR_HRRQ_TOGGLE_BIT) ==
+           hrrq->toggle_bit) {
 
-                       if (ipr_process_hrrq(hrrq, -1, &doneq))
-                               rc =  IRQ_HANDLED;
+               if (ipr_process_hrrq(hrrq, -1, &doneq))
+                       rc =  IRQ_HANDLED;
        }
 
        spin_unlock_irqrestore(hrrq->lock, hrrq_flags);
_


------------------------------------------------------------------------------
_______________________________________________
Iprdd-devel mailing list
Iprdd-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iprdd-devel

Reply via email to