From: Lei Chen <lei.chen@smartx.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
Lei Chen <lei.chen@smartx.com>
Subject: [PATCH v1 1/4] blk-mq: remove stale comment about non-present CPU mapping
Date: Fri, 9 Oct 2026 11:01:08 +0800 [thread overview]
Message-ID: <20261009030111.57784-2-lei.chen@smartx.com> (raw)
In-Reply-To: <20261009030111.57784-1-lei.chen@smartx.com>
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@smartx.com>
---
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
next prev parent reply other threads:[~2026-10-09 3:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 3:01 [PATCH v1 0/4] Expose blk-mq tag sets through debugfs Lei Chen
2026-10-09 3:01 ` Lei Chen [this message]
2026-10-09 3:01 ` [PATCH v1 2/4] blk-mq: manage driver tags at the tag set level Lei Chen
2026-10-09 3:01 ` [PATCH v1 3/4] block: expose blk-mq tag sets through debugfs Lei Chen
2026-10-09 3:01 ` [PATCH v1 4/4] block: link request queue debugfs directories to tag sets Lei Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261009030111.57784-2-lei.chen@smartx.com \
--to=lei.chen@smartx.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®