]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
scsi: lpfc: Revise interrupt coalescing for missing scenarios
authorJames Smart <jsmart2021@gmail.com>
Fri, 18 Oct 2019 21:18:26 +0000 (14:18 -0700)
committerSeth Forshee <seth.forshee@canonical.com>
Tue, 7 Apr 2020 15:40:04 +0000 (10:40 -0500)
commit3965a40a4e75e819e57907ad5ecd093c07e60657
treebfd0814d7aedaccb35d42c746f42479d41963d89
parent5078750b034c822507bf0da094501d3d42e756bd
scsi: lpfc: Revise interrupt coalescing for missing scenarios

BugLink: https://bugs.launchpad.net/bugs/1855303
The existing "auto eq delay" mechanism was sometimes skipping over an EQ,
not ramping the coalescing down under light load fast enough, and in other
cases never kicked in as cpu sharing by multiple vectors didn't quite add
up right.

Tweak the interrupt mechanism such that:

 - Add a flag to the EQ to force checking for colaescing values when being
   serviced in the interrupt handler.  The flag will be set by any CQ bound
   to the EQ whenever the number of CQ elements process in a single scan
   meets or exceeds the hardware queue notify level. E.g. there's a
   significant number of completions happening.

 - In the heartbeat work item that checks coalescing:

   - Replace the structure that was counting the number of EQs that
     interrupted on a single cpu with a new structure that looks at the EQ
     to see whether EQ currently has a coalescing value (thus it should be
     re-evaluate) or was marked by the new flag indicating heavy
     completions.

   - When a cpu, which may be servicing multiple vectors, had at least 1 EQ
     that should be checked, a new coalescing delay is calculated based on
     the number of interrupts that occurred on the cpu.

   - The new coalescing value is then applied to the EQs that had
     interrupted on the cpu.

Link: https://lore.kernel.org/r/20191018211832.7917-11-jsmart2021@gmail.com
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 8156d378c4cbf8ca19df5d8f0c610ce6923b61e2)
Signed-off-by: Vignesh Gunasekaran <vignesh.gunasekaran@broadcom.com>
Signed-off-by: Jeff Lane <jeffrey.lane@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/scsi/lpfc/lpfc_hw4.h
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_sli.c
drivers/scsi/lpfc/lpfc_sli4.h