On Thu, Jun 25, 2020 at 10:42 PM Tomas Henzl <thenzl@xxxxxxxxxx> wrote: > > Affinity hint should be cleared before freeing irq. Hi Tomas, megaraid_sas driver setups IRQ affinity(non-managed) for MSI-x index "0" to "instance->low_latency_index_start - 1". Rest of MSI-x indices- "instance->low_latency_index_start" to "instance->msix_vectors -1" are managed (API- pci_alloc_irq_affinity() takes care of this) so calling irq_set_affinity_hint() for managed IRQs does not seem right. Please try setting affinity to NULL for only this range- "0" to "instance->low_latency_index_start -1" and see if it solves your problem. Also, is it regression due to below commit: f0b9e7bdc309 scsi: megaraid_sas: Set affinity for high IOPS reply queues Thanks, Sumit > > Signed-off-by: Tomas Henzl <thenzl@xxxxxxxxxx> > --- > drivers/scsi/megaraid/megaraid_sas_base.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c > index 00668335c..d5626ad8b 100644 > --- a/drivers/scsi/megaraid/megaraid_sas_base.c > +++ b/drivers/scsi/megaraid/megaraid_sas_base.c > @@ -5602,9 +5602,11 @@ megasas_setup_irqs_msix(struct megasas_instance *instance, u8 is_probe) > &instance->irq_context[i])) { > dev_err(&instance->pdev->dev, > "Failed to register IRQ for vector %d.\n", i); > - for (j = 0; j < i; j++) > + for (j = 0; j < i; j++) { > + irq_set_affinity_hint(pci_irq_vector(pdev, j), NULL); > free_irq(pci_irq_vector(pdev, j), > &instance->irq_context[j]); > + } > /* Retry irq register for IO_APIC*/ > instance->msix_vectors = 0; > instance->msix_load_balance = false; > @@ -5642,6 +5644,7 @@ megasas_destroy_irqs(struct megasas_instance *instance) { > > if (instance->msix_vectors) > for (i = 0; i < instance->msix_vectors; i++) { > + irq_set_affinity_hint(pci_irq_vector(instance->pdev, i), NULL); > free_irq(pci_irq_vector(instance->pdev, i), > &instance->irq_context[i]); > } > -- > 2.21.3 >