Re: [PATCH v2] blk-mq: use a housekeeping CPU for passthrough requests on isolated hctxs
From: Christoph Hellwig
Date: Wed Nov 04 2026 - 02:46:20 EST
On Wed, Nov 04, 2026 at 08:37:10AM +0100, Sebastian Andrzej Siewior wrote:
> On 2026-11-04 08:17:03 [+0100], Christoph Hellwig wrote:
> > On Tue, Nov 03, 2026 at 05:37:48PM +0100, Sebastian Andrzej Siewior wrote:
> > > What about
> > > guard(rcu);
> > > for_each_cpu_and(cpu, cpu_online_mask, housekeeping_cpumask(HK_TYPE_MANAGED_IRQ)) {
> > > if (!cpu_is_isolated(cpu)
> > > break;
> > > }
> > >
> > > this ends up with one less function call ;)
> >
> > Please avoid this completely unreadable and unaditable guard crap.
>
> If you/ block prefers to avoid guard() then fine. I usually get punched
> the other way around.
>
> > How is anyone supposed to understand that above mess?
>
> I can show you code where you start crying.
I don't cry easily, but I've basically given up trying to understand
or fix code infested too much by at and other CLASS/__cleanup magic
like the core VFS code, because my brain can't cope with it...
> Anyway. My main selling
> point was for_each_cpu_and().
I guess the advantage would be to reduce the iteration, so it's
probably ok. I don't find it particularly easier to read, and given
that this is a slow path it might not matter.