Skip to content

Commit ce5a58a

Browse files
Nitesh Narayan LalKAGA-KOKO
authored andcommitted
scsi: lpfc: Use irq_set_affinity()
The driver uses irq_set_affinity_hint to set the affinity for the lpfc interrupts to a mask corresponding to the local NUMA node to avoid performance overhead on AMD architectures. However, irq_set_affinity_hint() setting the affinity is an undocumented side effect that this function also sets the affinity under the hood. To remove this side effect irq_set_affinity_hint() has been marked as deprecated and new interfaces have been introduced. Also, as per the commit dcaa213 ("scsi: lpfc: Change default IRQ model on AMD architectures"): "On AMD architecture, revert the irq allocation to the normal style (non-managed) and then use irq_set_affinity_hint() to set the cpu affinity and disable user-space rebalancing." we don't really need to set the affinity_hint as user-space rebalancing for the lpfc interrupts is not desired. Hence, replace the irq_set_affinity_hint() with irq_set_affinity() which only applies the affinity for the interrupts. Signed-off-by: Nitesh Narayan Lal <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: James Smart <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent bf886e1 commit ce5a58a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/scsi/lpfc/lpfc_init.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12709,7 +12709,7 @@ lpfc_irq_set_aff(struct lpfc_hba_eq_hdl *eqhdl, unsigned int cpu)
1270912709
cpumask_clear(&eqhdl->aff_mask);
1271012710
cpumask_set_cpu(cpu, &eqhdl->aff_mask);
1271112711
irq_set_status_flags(eqhdl->irq, IRQ_NO_BALANCING);
12712-
irq_set_affinity_hint(eqhdl->irq, &eqhdl->aff_mask);
12712+
irq_set_affinity(eqhdl->irq, &eqhdl->aff_mask);
1271312713
}
1271412714

1271512715
/**
@@ -12998,7 +12998,6 @@ lpfc_sli4_enable_msix(struct lpfc_hba *phba)
1299812998
for (--index; index >= 0; index--) {
1299912999
eqhdl = lpfc_get_eq_hdl(index);
1300013000
lpfc_irq_clear_aff(eqhdl);
13001-
irq_set_affinity_hint(eqhdl->irq, NULL);
1300213001
free_irq(eqhdl->irq, eqhdl);
1300313002
}
1300413003

@@ -13159,7 +13158,6 @@ lpfc_sli4_disable_intr(struct lpfc_hba *phba)
1315913158
for (index = 0; index < phba->cfg_irq_chann; index++) {
1316013159
eqhdl = lpfc_get_eq_hdl(index);
1316113160
lpfc_irq_clear_aff(eqhdl);
13162-
irq_set_affinity_hint(eqhdl->irq, NULL);
1316313161
free_irq(eqhdl->irq, eqhdl);
1316413162
}
1316513163
} else {

0 commit comments

Comments
 (0)