OSDN Git Service

scsi: mpt3sas: Determine smp affinity on per HBA basis
authorSreekanth Reddy <sreekanth.reddy@broadcom.com>
Mon, 24 Jun 2019 14:42:55 +0000 (10:42 -0400)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 27 Jun 2019 02:58:34 +0000 (22:58 -0400)
commit610ef1e955cd262a5f72d8401a36c9cfca6072fe
tree2aeb5aa1a3d1d3607690cc028b2612d4defb220c
parent48d6f0a6a5595abb38d899dbf8ca09f7dc858d2b
scsi: mpt3sas: Determine smp affinity on per HBA basis

Even though 'smp_affinity_enable' module parameter is enabled, if the
number of online CPUs is bigger than the number of msix vectors enabled on
that HBA, then smp affinity settings should be disabled only for this HBA.

But currently the smp affinity setting is disabled globally and hence smp
affinity will be disabled for subsequent HBAs even though number of msix
vectors enabled for this HBA matches the number of online CPU.

To fix this, define a per HBA variable smp_affinity_enable.  Initially this
variable is initialized with smp_affinity_enable module parameter value. If
this HBA has less number of msix vectors configured when compared to number
of online cpus, then only this HBA's variable smp_affinity_enable is set to
zero.

Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpt3sas/mpt3sas_base.c
drivers/scsi/mpt3sas/mpt3sas_base.h