[PATCH v1 1/4] blk-mq: remove stale comment about non-present CPU mapping
From: Lei Chen
Date: Thu Oct 08 2026 - 23:03:08 EST
Commit 20e4d8139319 ("blk-mq: simplify queue mapping & schedule with each
possisble CPU") changed blk_mq_map_swqueue() to iterate over all possible
CPUs instead of only present CPUs, but left the comment claiming that
non-present CPUs are mapped to the first hctx.
The function now uses the tag set's CPU-to-hardware-queue maps for all
possible CPUs, without checking whether a CPU is present. Non-present
CPUs are therefore not necessarily mapped to hctx0. The fallback to
hctx0 in this function handles tag allocation failure, independently
of CPU presence.
Remove the outdated statement and retain the description of the mapping
loop.
Signed-off-by: Lei Chen <lei.chen@xxxxxxxxxx>
---
block/blk-mq.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index a26a11c73ee3..59452b855afe 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -4173,11 +4173,7 @@ static void blk_mq_map_swqueue(struct request_queue *q)
hctx->dispatch_from = NULL;
}
- /*
- * Map software to hardware queues.
- *
- * If the cpu isn't present, the cpu is mapped to first hctx.
- */
+ /* Map software to hardware queues. */
for_each_possible_cpu(i) {
ctx = per_cpu_ptr(q->queue_ctx, i);
--
2.43.0