[PATCH v2] blk-mq: use a housekeeping CPU for passthrough requests on isolated hctxs

Daniel Wagner dwagner at suse.de
Wed Nov 4 02:22:34 PST 2026


On Tue, Nov 03, 2026 at 03:22:29PM +0000, sashiko-bot at kernel.org wrote:
> Should this check !blk_mq_hctx_has_online_cpu(data.hctx, nr_cpu_ids) (or
> ensure blk_mq_map_swqueue() sets BLK_MQ_S_INACTIVE when an hctx has no
> online CPUs mapped)?

Yes, this is correct. I'll extend the patch and add this to the commit message:

    When all mapped CPUs are offline at queue setup, BLK_MQ_S_INACTIVE is
    not set, as only the CPU offline callback sets it. The
    blk_mq_hctx_has_online_cpu test catches this case. It uses the queue
    map, so it also finds online isolated CPUs.

    When the last mapped CPU goes offline, the CPU offline callback sets
    BLK_MQ_S_INACTIVE while the CPU is still in cpu_online_mask, so
    blk_mq_hctx_has_online_cpu still finds it. The BLK_MQ_S_INACTIVE test
    catches this case.



More information about the Linux-nvme mailing list