Re: [PATCH v18 0/9] blk: honor isolcpus configuration
From: Aaron Tomlin
Date: Tue Dec 01 2026 - 15:08:25 EST
On Tue, Dec 01, 2026 at 03:20:56PM +0200, Ionut Nechita wrote:
> Hi Aaron,
>
> Tested v18 on top of 946d9ed1aa02 in QEMU/KVM (4 vCPUs in 2 sockets,
> NVMe + virtio-blk, isolcpus=managed_irq,2-3), every patch built and
> booted, plus the full series with lockdep:
Hi Ionut,
Thank you for the thorough testing.
> - With the whole series no queue interrupt lands on an isolated CPU,
> and with 9/9 neither does an admin / config vector (before 9/9
> nvme0q0 and virtio0-config were still effective on CPU 2).
> - The new hotplug rules in 5/9 behave as described: offlining CPU 1
> while isolated CPU 2 (same hctx) is online is refused; after
> offlining 2 first it works; onlining 2 while its hctx has no online
> housekeeping CPU is refused and rolled back; after onlining 1 it
> works. No lockdep splat in these paths.
> - Reads from isolated CPU 2 (3 x 20000 O_DIRECT per disk): p50 24 us
> (NVMe) / 20 us (virtio-blk); CPU 2 gets ~1 IPI per read and no
> device interrupt.
>
> The IRQD_AFFINITY_SET hunk you added to 9/9 looks right to me; it
> makes the platform IRQ path behave like alloc_descs(). I could not
> test that path here (QEMU x86, PCI/MSI-X only).
>
> Two things I noticed while testing:
>
> 1. Bisectability: with 4/9 applied but not 7/9, nr_hw_queues follows
> the housekeeping CPUs while the managed vectors are still spread
> over all CPUs, so each device ends up with a single active hctx and
> nvme0q2 / virtio0-req.1 fire on isolated CPUs for 4/9..6/9. With
> 7/9 moved before 4/9 (1-3, 7, 4-6, 8, 9; it applies cleanly) every
> step from there on has no queue interrupt on an isolated CPU.
>
> 2. NUMA locality: with 8 CPUs in 2 nodes and isolcpus=managed_irq,5-7,
> CPUs 6 and 7 (node 1) are mapped to the queues of CPUs 1 and 3
> (node 0) although CPU 4's queue is on their node.
Good catch, this could be improved. Spreading unassigned isolated CPUs
globally across active_hctx not only causes unnecessary cross-NUMA traffic
when a node has local housekeeping CPUs, it can also cause
blk_mq_hw_queue_to_node() to misattribute an hctx's NUMA node if a
lower-numbered isolated CPU from another node is mapped to it.
Preferring local-node active queues first via cpu_to_node() and falling
back to global active_hctx only when a NUMA node has no online housekeeping
CPUs is strictly better.
I think it is best to address this now. I will update the unassigned-CPU
mapping in both blk-mq and virtio-fs to take NUMA locality into account.
> For the series except 6/9 (virtio-fs not exercised here):
>
> Tested-by: Ionut Nechita <ionut.nechita@xxxxxxxxxxxxx>
Thanks again!
Kind regards,
--
Aaron Tomlin