diff options
author | Jens Axboe <axboe@kernel.dk> | 2021-10-19 17:32:59 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-10-27 16:43:15 +0200 |
commit | 92aff191cc5b15a56d10a7a1a0b4bc5f6e17fcf3 (patch) | |
tree | a0bfe0b493d2bae15a7a27a6594804a3e5a246df /block/blk-mq.c | |
parent | block: pass in blk_mq_tags to blk_mq_rq_ctx_init() (diff) | |
download | linux-92aff191cc5b15a56d10a7a1a0b4bc5f6e17fcf3.tar.xz linux-92aff191cc5b15a56d10a7a1a0b4bc5f6e17fcf3.zip |
block: prefetch request to be initialized
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>
Link: https://lore.kernel.org/r/20211019153300.623322-4-axboe@kernel.dk
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r-- | block/blk-mq.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index e881e12a2691..7cdb10f96aa6 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -405,6 +405,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); |