From: Jens Axboe <axboe@kernel.dk>
To: linux-block@vger.kernel.org
Cc: Jens Axboe <axboe@kernel.dk>
Subject: [PATCH 3/4] block: prefetch request to be initialized
Date: Tue, 19 Oct 2021 09:32:59 -0600 [thread overview]
Message-ID: <20211019153300.623322-4-axboe@kernel.dk> (raw)
In-Reply-To: <20211019153300.623322-1-axboe@kernel.dk>
Now we have the tags available in __blk_mq_alloc_requests_batch(), we
can start fetching the first request cacheline before calling into the
request initialization.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
block/blk-mq.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index fbaecb6e6dd4..77c2c3220128 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -389,6 +389,7 @@ __blk_mq_alloc_requests_batch(struct blk_mq_alloc_data *data,
for (i = 0; tag_mask; i++) {
if (!(tag_mask & (1UL << i)))
continue;
+ prefetch(tags->static_rqs[tag]);
tag = tag_offset + i;
tag_mask &= ~(1UL << i);
rq = blk_mq_rq_ctx_init(data, tags, tag, alloc_time_ns);
--
2.33.1
next prev parent reply other threads:[~2021-10-19 15:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-19 15:32 [PATCHSET 0/4] Last round of alloc side optimizations Jens Axboe
2021-10-19 15:32 ` [PATCH 1/4] block: add rq_flags to struct blk_mq_alloc_data Jens Axboe
2021-10-19 18:42 ` Keith Busch
2021-10-19 18:48 ` Jens Axboe
2021-11-03 19:54 ` Guenter Roeck
2021-11-03 19:56 ` Jens Axboe
2021-11-03 21:41 ` Guenter Roeck
2021-11-03 23:29 ` Jens Axboe
2021-10-19 15:32 ` [PATCH 2/4] block: pass in blk_mq_tags to blk_mq_rq_ctx_init() Jens Axboe
2021-10-19 15:32 ` Jens Axboe [this message]
2021-10-19 15:33 ` [PATCH 4/4] block: re-flow blk_mq_rq_ctx_init() Jens Axboe
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=20211019153300.623322-4-axboe@kernel.dk \
--to=axboe@kernel.dk \
--cc=linux-block@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;
as well as URLs for NNTP newsgroup(s).