scsi: lpfc: Fix poor use of hardware queues if fewer irq vectors
authorJames Smart <jsmart2021@gmail.com>
Wed, 22 May 2019 00:49:06 +0000 (17:49 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 18 Jun 2019 23:46:22 +0000 (19:46 -0400)
commit657add4e5e15b4872e6a6c2dfca43bff1b0197b4
tree7a6844734ed3bcc028aa6ad28a568eb123b7de61
parentd9954a2d18c3405bbbe3f15390a9747f66df9f9a
scsi: lpfc: Fix poor use of hardware queues if fewer irq vectors

While fixing the resources per socket, realized the driver was not using
hardware queues (up to 1 per cpu) if there were fewer interrupt
vectors. The driver was only using the hardware queue assigned to the cpu
with the vector.

Rework the affinity map check to use the additional hardware queue elements
that had been allocated.  If the cpu count exceeds the hardware queue count
- share, but choose what is shared with by: hyperthread peer, core peer,
socket peer, or finally similar cpu in a different socket.

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>
drivers/scsi/lpfc/lpfc_attr.c
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_sli.c
drivers/scsi/lpfc/lpfc_sli4.h