Re: [PATCH v6 6/9] isolation: introduce io_queue isolcpus type

Ming Lei
2025-05-09T02:04:44Z

On Fri, Apr 25, 2025 at 09:32:16AM +0200, Daniel Wagner wrote:
> On Fri, Apr 25, 2025 at 08:26:22AM +0200, Hannes Reinecke wrote:
> > On 4/24/25 20:19, Daniel Wagner wrote:
> > > Multiqueue drivers spreading IO queues on all CPUs for optimal
> > > performance. The drivers are not aware of the CPU isolated requirement
> > > and will spread all queues ignoring the isolcpus configuration.
> > >
> > > Introduce a new isolcpus mask which allows the user to define on which
> > > CPUs IO queues should be placed. This is similar to the managed_irq but
> > > for drivers which do not use the managed IRQ infrastructure.
> > >
> > > Signed-off-by: Daniel Wagner <wagi@kernel.org>
> > > ---
> > > include/linux/sched/isolation.h | 1 +
> > > kernel/sched/isolation.c | 7 +++++++
> > > 2 files changed, 8 insertions(+)
> > >
> > Reviewed-by: Hannes Reinecke <hare@suse.de>
>
> Just realized I forgot to also add some document on this new argument:
>
> io_queue
> Isolate from IO queue work caused by multiqueue
> device drivers. Restrict the placement of
> queues to housekeeping CPUs only, ensuring that
> all IO work is processed by a housekeeping CPU.
>
> Note: When an isolated CPU issues an IO, it is
> forwarded to a housekeeping CPU. This will
> trigger a software interrupt on the completion
> path.
>
> Note: It is not possible to offline housekeeping
> CPUs that serve isolated CPUs.

This patch adds kernel parameter only, but not apply it at all, the above
words just confuses everyone, so I'd suggest to not expose the kernel
command line & document until the whole mechanism is supported.

Especially 'irqaffinity=0 isolcpus=io_queue' requires the application
to offline CPU in order, which has to be documented:

https://lore.kernel.org/all/cc5e44dd-e1dc-4f24-88d9-ce45a8b0794f@flourine.local/

Thanks,
Ming