[PATCH v3 0/2] genirq, PCI/MSI: mask without flushing

From: Keith Busch

Date: Fri Nov 06 2026 - 12:40:20 EST


From: Keith Busch <kbusch@xxxxxxxxxx>

This adds a new irq api, disable_irq_noflush(), backed by an optional
irq_chip irq_mask_noflush() callback, and implemented for PCI MSI-X. It
writes the mask without reading back, and is for callers where an extra
interrupt after returning is harmless compared to the added latency of
flushing the masking write to the device.

There are no users in this series; the hybrid irq/polling work from nvme
is expected to use it when switching between MSI-X interrupts and
polling, so these are posted separately as prep patches that are
hopefully generally useful.

RFC with the nvme usage:
https://lore.kernel.org/linux-nvme/20261013223543.395054-1-kbusch@xxxxxxxx/

Changes since v2:
- Just the commit log to use the preferred "MSI-X"
Changes since v1:
- Keep the channel offline check guarding the flush read in
pci_msix_mask() (Sashiko)

v1: https://lore.kernel.org/all/20261105182706.3700908-1-kbusch@xxxxxxxx/

Keith Busch (2):
genirq: Add disable_irq_noflush()
PCI/MSI: Implement irq_mask_noflush() for MSI-X

drivers/irqchip/irq-msi-lib.c | 1 +
drivers/pci/msi/irqdomain.c | 6 ++++++
drivers/pci/msi/msi.h | 10 ++++++++--
include/linux/interrupt.h | 1 +
include/linux/irq.h | 3 +++
kernel/irq/chip.c | 31 +++++++++++++++++++++++++++++++
kernel/irq/internals.h | 1 +
kernel/irq/manage.c | 21 +++++++++++++++++++++
8 files changed, 72 insertions(+), 2 deletions(-)

--
2.52.0