linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/1] scsi: mpi3mr: Introduce smp_affinity_enable module parameter
@ 2025-04-28  9:41 Aaron Tomlin
  2025-04-28  9:41 ` [RFC PATCH 1/1] " Aaron Tomlin
  0 siblings, 1 reply; 2+ messages in thread
From: Aaron Tomlin @ 2025-04-28  9:41 UTC (permalink / raw)
  To: mpi3mr-linuxdrv.pdl
  Cc: kashyap.desai, sumit.saxena, sreekanth.reddy, James.Bottomley,
	martin.petersen, linux-scsi, linux-kernel

I noticed that the Linux MegaRAID driver for SAS based RAID controllers has
the same aforementioned module parameter. Despite the potential performance
drawbacks, I suspect it would be useful with the Broadcom MPI3 Storage
Controller Driver too, to respect the default IRQ affinity.
Please let me know your thoughts.

Aaron Tomlin (1):
  scsi: mpi3mr: Introduce smp_affinity_enable module parameter

 drivers/scsi/mpi3mr/mpi3mr_fw.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

-- 
2.47.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [RFC PATCH 1/1] scsi: mpi3mr: Introduce smp_affinity_enable module parameter
  2025-04-28  9:41 [RFC PATCH 0/1] scsi: mpi3mr: Introduce smp_affinity_enable module parameter Aaron Tomlin
@ 2025-04-28  9:41 ` Aaron Tomlin
  0 siblings, 0 replies; 2+ messages in thread
From: Aaron Tomlin @ 2025-04-28  9:41 UTC (permalink / raw)
  To: mpi3mr-linuxdrv.pdl
  Cc: kashyap.desai, sumit.saxena, sreekanth.reddy, James.Bottomley,
	martin.petersen, linux-scsi, linux-kernel

This patch introduces a new module parameter namely
"smp_affinity_enable", to govern the application of system-wide IRQ
affinity (with kernel boot-time parameter "irqaffinity") for MSI-X
interrupts. By default, the default IRQ affinity mask will not be
respected. Set smp_affinity_enable to 0 disables this behaviour.
Consequently, preventing the auto-assignment of MSI-X IRQs.

Signed-off-by: Aaron Tomlin <atomlin@atomlin.com>
---
 drivers/scsi/mpi3mr/mpi3mr_fw.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c
index 5ed31fe57474..c1d76431230a 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_fw.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c
@@ -22,6 +22,10 @@ static int poll_queues;
 module_param(poll_queues, int, 0444);
 MODULE_PARM_DESC(poll_queues, "Number of queues for io_uring poll mode. (Range 1 - 126)");
 
+static int smp_affinity_enable = 1;
+module_param(smp_affinity_enable, int, 0444);
+MODULE_PARM_DESC(smp_affinity_enable, "SMP affinity feature enable/disable Default: enable(1)");
+
 #if defined(writeq) && defined(CONFIG_64BIT)
 static inline void mpi3mr_writeq(__u64 b, volatile void __iomem *addr)
 {
@@ -846,7 +850,8 @@ static int mpi3mr_setup_isr(struct mpi3mr_ioc *mrioc, u8 setup_one)
 
 		desc.post_vectors = mrioc->requested_poll_qcount;
 		min_vec = desc.pre_vectors + desc.post_vectors;
-		irq_flags |= PCI_IRQ_AFFINITY | PCI_IRQ_ALL_TYPES;
+		if (smp_affinity_enable)
+			irq_flags |= PCI_IRQ_AFFINITY | PCI_IRQ_ALL_TYPES;
 
 		retval = pci_alloc_irq_vectors_affinity(mrioc->pdev,
 			min_vec, max_vectors, irq_flags, &desc);
-- 
2.47.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-04-28  9:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-28  9:41 [RFC PATCH 0/1] scsi: mpi3mr: Introduce smp_affinity_enable module parameter Aaron Tomlin
2025-04-28  9:41 ` [RFC PATCH 1/1] " Aaron Tomlin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).