Re: [PATCH v17 10/10] genirq/affinity: Confine pre and post vectors to housekeeping CPUs

From: Hannes Reinecke

Date: Thu Dec 03 2026 - 02:50:36 EST


On 11/29/26 8:26 AM, Aaron Tomlin wrote:
From: Ionut Nechita <ionut.nechita@xxxxxxxxxxxxx>

The managed IRQ affinity spreading for isolcpus=managed_irq restricts the
affinity of managed interrupt vectors to housekeeping CPUs. However, the
reserved vectors that do not participate in managed affinity spreading,
namely affd->pre_vectors (such as the NVMe admin completion queue) and
trailing affd->post_vectors, are still initialised unconditionally from
irq_default_affinity, which by default spans all CPUs including isolated
ones.

Although these reserved vectors are not marked managed, on a freshly
probed device an admin queue interrupt can still be delivered to an
isolated CPU before user space has a chance to re-steer it. On PREEMPT_RT
this stray threaded interrupt wakeup on an isolated core directly
perturbs latency-critical workloads.

When HK_TYPE_MANAGED_IRQ is enabled, confine these reserved pre/post
vectors to the intersection of irq_default_affinity and the housekeeping
mask (falling back to the housekeeping mask if that intersection contains
no online CPUs). This keeps unmanaged device queues off isolated CPUs
from the moment of allocation while still honouring irqaffinity= when
configured, and leaves behaviour unchanged when managed_irq isolation is
disabled. Update the managed_irq documentation to reflect this behaviour.

Signed-off-by: Ionut Nechita <ionut.nechita@xxxxxxxxxxxxx>
Co-developed-by: Aaron Tomlin <atomlin@xxxxxxxxxxx>
Signed-off-by: Aaron Tomlin <atomlin@xxxxxxxxxxx>
---
.../admin-guide/kernel-parameters.txt | 3 +-
Documentation/core-api/irq/managed_irq.rst | 9 ++++--
kernel/irq/affinity.c | 28 +++++++++++++++++--
3 files changed, 34 insertions(+), 6 deletions(-)

Reviewed-by: Hannes Reinecke <hare@xxxxxxxxxx>

Cheers,

Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@xxxxxxx +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich