[PATCH v18 8/9] docs: update isolcpus=managed_irq documentation
From: Aaron Tomlin
Date: Mon Nov 30 2026 - 18:05:31 EST
From: Daniel Wagner <wagi@xxxxxxxxxx>
The managed_irq flag now strictly restricts multiqueue hardware queue
allocation and managed interrupt affinity to housekeeping CPUs rather than
relying on best-effort post-allocation steering. Update its description
across the kernel command-line parameters, core housekeeping guide,
managed interrupt guide, and CPU isolation documentation accordingly.
Signed-off-by: Daniel Wagner <wagi@xxxxxxxxxx>
Reviewed-by: Hannes Reinecke <hare@xxxxxxx>
Acked-by: Frederic Weisbecker <frederic@xxxxxxxxxx>
Acked-by: Marco Crivellari <marco.crivellari@xxxxxxxx>
Co-developed-by: Aaron Tomlin <atomlin@xxxxxxxxxxx>
Signed-off-by: Aaron Tomlin <atomlin@xxxxxxxxxxx>
---
Documentation/admin-guide/cpu-isolation.rst | 3 +-
.../admin-guide/kernel-parameters.txt | 56 +++++++++++--------
Documentation/core-api/housekeeping.rst | 5 +-
Documentation/core-api/irq/managed_irq.rst | 56 +++++++++----------
4 files changed, 67 insertions(+), 53 deletions(-)
diff --git a/Documentation/admin-guide/cpu-isolation.rst b/Documentation/admin-guide/cpu-isolation.rst
index b9f13a928673..76762f5f7678 100644
--- a/Documentation/admin-guide/cpu-isolation.rst
+++ b/Documentation/admin-guide/cpu-isolation.rst
@@ -131,7 +131,8 @@ Interfaces
- The "irqaffinity=" kernel boot parameter for a default setting.
- The "managed_irq" flag in the "isolcpus=" kernel boot parameter
- tries a best effort affinity override for managed IRQs.
+ restricts multiqueue hardware queue allocation and managed IRQ
+ affinity to housekeeping CPUs.
Full Dynticks (aka nohz_full)
-----------------------------
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index dce9b8f3ae98..5f62ee5ddaf1 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -2815,28 +2815,40 @@ Kernel parameters
"number of CPUs in system - 1".
managed_irq
-
- Isolate from being targeted by managed interrupts
- which have an interrupt mask containing isolated
- CPUs. The affinity of managed interrupts is
- handled by the kernel and cannot be changed via
- the /proc/irq/* interfaces.
-
- This isolation is best effort and only effective
- if the automatically assigned interrupt mask of a
- device queue contains isolated and housekeeping
- CPUs. If housekeeping CPUs are online then such
- interrupts are directed to the housekeeping CPU
- so that IO submitted on the housekeeping CPU
- cannot disturb the isolated CPU.
-
- If a queue's affinity mask contains only isolated
- CPUs then this parameter has no effect on the
- interrupt routing decision, though interrupts are
- only delivered when tasks running on those
- isolated CPUs submit IO. IO submitted on
- housekeeping CPUs has no influence on those
- queues.
+ Strictly restrict multiqueue hardware queue
+ allocation and managed interrupt affinity to
+ housekeeping CPUs. The affinity of managed
+ interrupts is handled by the kernel and cannot
+ be changed via the /proc/irq/* interfaces.
+ Managed interrupts and multiqueue block device
+ queues are never created for or mapped to
+ isolated CPUs.
+
+ In the block layer (blk-mq), device queue allocation
+ and CPU-to-queue mappings are restricted to
+ housekeeping CPUs. For devices using managed
+ interrupts, hardware completion interrupts are routed
+ exclusively to housekeeping cores, shielding isolated
+ CPUs from I/O interruptions even if they initiated the
+ request.
+
+ Note: Using managed_irq restricts the number of
+ allocated hardware queues to match the number of
+ housekeeping CPUs for single-set drivers. This
+ prevents MSI-X vector exhaustion and forces isolated
+ CPUs to share submission queues.
+
+ Note: Offlining housekeeping CPUs which serve
+ isolated CPUs will fail. The isolated CPUs must
+ be offlined before offlining the housekeeping
+ CPUs, and at least one serving housekeeping CPU
+ must be brought back online before onlining
+ those isolated CPUs again.
+
+ Note: When I/O is submitted by an application on
+ an isolated CPU, the hardware completion
+ interrupt is handled entirely by a housekeeping
+ CPU.
The format of <cpu-list> is described above.
diff --git a/Documentation/core-api/housekeeping.rst b/Documentation/core-api/housekeeping.rst
index 71ba5d86f249..b148d8d38d52 100644
--- a/Documentation/core-api/housekeeping.rst
+++ b/Documentation/core-api/housekeeping.rst
@@ -36,8 +36,9 @@ by the ``enum hk_type type``:
parameters. This includes remote scheduler tick, vmstat and lockup
watchdog.
-3. HK_TYPE_MANAGED_IRQ matches the IRQ handlers moved away by managed
- IRQ isolation performed through ``isolcpus=managed_irq``.
+3. HK_TYPE_MANAGED_IRQ matches the multiqueue block devices and
+ managed IRQs strictly restricted to housekeeping CPUs through
+ ``isolcpus=managed_irq``.
4. HK_TYPE_DOMAIN_BOOT matches the work moved away by scheduler domain
isolation performed through ``isolcpus=domain`` only. It is similar
diff --git a/Documentation/core-api/irq/managed_irq.rst b/Documentation/core-api/irq/managed_irq.rst
index 05e295f3c289..a9781446fba1 100644
--- a/Documentation/core-api/irq/managed_irq.rst
+++ b/Documentation/core-api/irq/managed_irq.rst
@@ -51,20 +51,20 @@ Isolated CPUs
The affinity of managed interrupts is handled entirely in the kernel and cannot
be modified from user space through the /proc interfaces. The managed_irq
-sub‑parameter of the isolcpus boot option specifies a CPU mask that managed
-interrupts should attempt to avoid. This isolation is best‑effort and only
-applies if the automatically assigned interrupt mask also contains online CPUs
-outside the avoided mask. If the requested mask contains only isolated CPUs,
-the setting has no effect.
+sub-parameter of the isolcpus boot option restricts multiqueue block device
+queue allocation and managed interrupt affinity strictly to housekeeping CPUs
+(the CPUs outside the specified isolated mask).
-CPUs listed in the avoided mask remain part of the interrupt’s affinity mask.
-This means that if all non‑isolated CPUs go offline while isolated CPUs remain
-online, the interrupt will be assigned to one of the isolated CPUs.
+Isolated CPUs are excluded when computing the managed interrupt affinity masks
+and vector limits. In the block layer (blk-mq), isolated CPUs share hardware
+queues owned by housekeeping CPUs so that completion interrupts never target
+isolated cores, and offlining the last housekeeping CPU serving an active
+isolated CPU is rejected.
The following examples assume a system with 8 CPUs.
- A QEMU instance is booted with "-device virtio-scsi-pci".
- The MSI‑X device exposes 11 interrupts: 3 "management" interrupts and 8
+ The MSI-X device exposes 11 interrupts: 3 "management" interrupts and 8
"queue" interrupts. The driver requests the 8 queue interrupts, each of which
is affine to exactly one CPU. If that CPU goes offline, the interrupt is shut
down.
@@ -84,33 +84,33 @@ The following examples assume a system with 8 CPUs.
(/sys/kernel/debug/irq/irqs/48). The dstate field will include
IRQD_IRQ_DISABLED, IRQD_IRQ_MASKED and IRQD_MANAGED_SHUTDOWN.
+- If the same "-device virtio-scsi-pci" instance is booted with
+ "isolcpus=managed_irq,2-7", queue and vector allocation is restricted to the
+ two housekeeping CPUs (0 and 1). Only 2 queue interrupts are allocated,
+ affine strictly to CPU0 and CPU1, while isolated CPUs 2-7 share those two
+ submission queues.
+
- A QEMU instance is booted with "-device virtio-scsi-pci,num_queues=2"
and the kernel command line includes:
"irqaffinity=0,1 isolcpus=domain,2-7 isolcpus=managed_irq,1-3,5-7".
- The MSI‑X device exposes 5 interrupts: 3 management interrupts and 2 queue
+ The MSI-X device exposes 5 interrupts: 3 management interrupts and 2 queue
interrupts. The management interrupts follow the irqaffinity= setting. The
- queue interrupts are spread across available CPUs::
+ queue interrupts are spread strictly across the housekeeping CPUs (0 and 4)::
/proc/irq/47/effective_affinity_list:0
- /proc/irq/47/smp_affinity_list:0-3
+ /proc/irq/47/smp_affinity_list:0
/proc/irq/48/effective_affinity_list:4
- /proc/irq/48/smp_affinity_list:4-7
-
- The two queue interrupts are evenly distributed. Interrupt 48 is placed on CPU4
- because the managed_irq mask avoids CPUs 5–7 when possible.
+ /proc/irq/48/smp_affinity_list:4
Replacing the managed_irq argument with "isolcpus=managed_irq,1-3,4-5,7"
- results in::
+ leaves CPUs 0 and 6 as housekeeping CPUs, resulting in::
/proc/irq/48/effective_affinity_list:6
- /proc/irq/48/smp_affinity_list:4-7
-
- Interrupt 48 is now served on CPU6 because the system avoids CPUs 4, 5 and
- 7. If CPU6 is taken offline, the interrupt migrates to one of the "isolated"
- CPUs::
-
- /proc/irq/48/effective_affinity_list:7
- /proc/irq/48/smp_affinity_list:4-7
-
- The interrupt is shut down once all CPUs listed in its smp_affinity mask are
- offline.
+ /proc/irq/48/smp_affinity_list:6
+
+ While any isolated CPU mapped to CPU6's block hardware queue remains online,
+ attempting to take CPU6 offline fails with -EINVAL. Once those dependent
+ isolated CPUs are taken offline first, taking CPU6 offline shuts the
+ interrupt down rather than migrating it onto an isolated CPU, and bringing
+ any of those isolated CPUs back online requires CPU6 to be brought online
+ first.
--
2.55.0