mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-18 06:15:12 +00:00
scsi: smartpqi: Add module param to disable managed ints
Allow SMP affinity to be changeable by disabling managed interrupts. On distributions where the driver is enabled for multi-queue support the driver utilizes kernel managed interrupts, which automatically distributes interrupts to all available CPUs and assigns SMP affinity. On most distributions, the affinity can not be changed by the user. This change will allow managed interrupts to be disabled by the user via a module parameter while still allowing multi-queue support to function properly. Use the module parameter disable_managed_interrupts=1 Link: https://lore.kernel.org/r/165730606638.177165.12846020942931640329.stgit@brunhilda Reviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com> Signed-off-by: Mike McGowen <Mike.McGowen@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
6ce3cfb365
commit
cf15c3e734
@ -1351,7 +1351,7 @@ struct pqi_ctrl_info {
|
||||
u8 enable_r6_writes : 1;
|
||||
u8 lv_drive_type_mix_valid : 1;
|
||||
u8 enable_stream_detection : 1;
|
||||
|
||||
u8 disable_managed_interrupts : 1;
|
||||
u8 ciss_report_log_flags;
|
||||
u32 max_transfer_encrypted_sas_sata;
|
||||
u32 max_transfer_encrypted_nvme;
|
||||
|
@ -175,6 +175,12 @@ module_param_named(hide_vsep,
|
||||
pqi_hide_vsep, int, 0644);
|
||||
MODULE_PARM_DESC(hide_vsep, "Hide the virtual SEP for direct attached drives.");
|
||||
|
||||
static int pqi_disable_managed_interrupts;
|
||||
module_param_named(disable_managed_interrupts,
|
||||
pqi_disable_managed_interrupts, int, 0644);
|
||||
MODULE_PARM_DESC(disable_managed_interrupts,
|
||||
"Disable the kernel automatically assigning SMP affinity to IRQs.");
|
||||
|
||||
static char *raid_levels[] = {
|
||||
"RAID-0",
|
||||
"RAID-4",
|
||||
@ -4039,10 +4045,14 @@ static void pqi_free_irqs(struct pqi_ctrl_info *ctrl_info)
|
||||
static int pqi_enable_msix_interrupts(struct pqi_ctrl_info *ctrl_info)
|
||||
{
|
||||
int num_vectors_enabled;
|
||||
unsigned int flags = PCI_IRQ_MSIX;
|
||||
|
||||
if (!pqi_disable_managed_interrupts)
|
||||
flags |= PCI_IRQ_AFFINITY;
|
||||
|
||||
num_vectors_enabled = pci_alloc_irq_vectors(ctrl_info->pci_dev,
|
||||
PQI_MIN_MSIX_VECTORS, ctrl_info->num_queue_groups,
|
||||
PCI_IRQ_MSIX | PCI_IRQ_AFFINITY);
|
||||
flags);
|
||||
if (num_vectors_enabled < 0) {
|
||||
dev_err(&ctrl_info->pci_dev->dev,
|
||||
"MSI-X init failed with error %d\n",
|
||||
@ -8588,6 +8598,7 @@ static struct pqi_ctrl_info *pqi_alloc_ctrl_info(int numa_node)
|
||||
ctrl_info->max_write_raid_5_6 = PQI_DEFAULT_MAX_WRITE_RAID_5_6;
|
||||
ctrl_info->max_write_raid_1_10_2drive = ~0;
|
||||
ctrl_info->max_write_raid_1_10_3drive = ~0;
|
||||
ctrl_info->disable_managed_interrupts = pqi_disable_managed_interrupts;
|
||||
|
||||
return ctrl_info;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user