[PATCH v12 06/13] nvme-pci: use block layer helpers to constrain queue affinity
Aaron Tomlin
atomlin at atomlin.com
Wed Apr 22 11:52:08 PDT 2026
From: Daniel Wagner <wagi at kernel.org>
Ensure that IRQ affinity setup also respects the queue-to-CPU mapping
constraints provided by the block layer. This allows the NVMe driver
to avoid assigning interrupts to CPUs that the block layer has excluded
(e.g., isolated CPUs).
Signed-off-by: Daniel Wagner <wagi at kernel.org>
Reviewed-by: Martin K. Petersen <martin.petersen at oracle.com>
Reviewed-by: Hannes Reinecke <hare at suse.de>
Signed-off-by: Aaron Tomlin <atomlin at atomlin.com>
---
drivers/nvme/host/pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index db5fc9bf6627..daa041d15d3c 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2862,6 +2862,7 @@ static int nvme_setup_irqs(struct nvme_dev *dev, unsigned int nr_io_queues)
.pre_vectors = 1,
.calc_sets = nvme_calc_irq_sets,
.priv = dev,
+ .mask = blk_mq_possible_queue_affinity(),
};
unsigned int irq_queues, poll_queues;
unsigned int flags = PCI_IRQ_ALL_TYPES | PCI_IRQ_AFFINITY;
--
2.51.0
More information about the Linux-nvme
mailing list