summaryrefslogtreecommitdiffstats
path: root/block/blk-mq-tag.c
diff options
context:
space:
mode:
authorJianchao Wang <jianchao.w.wang@oracle.com>2019-01-24 18:25:32 +0800
committerJens Axboe <axboe@kernel.dk>2019-02-01 08:33:04 -0700
commit8ccdf4a3775229314c8bd365ac88c2cbdf36be13 (patch)
tree8b6c6835912bb3f3076d6694ba264072ae5921b6 /block/blk-mq-tag.c
parent058fdecc6de7cdecbf4c59b851e80eb2d6c5295f (diff)
downloadlinux-stable-8ccdf4a3775229314c8bd365ac88c2cbdf36be13.tar.gz
linux-stable-8ccdf4a3775229314c8bd365ac88c2cbdf36be13.tar.bz2
linux-stable-8ccdf4a3775229314c8bd365ac88c2cbdf36be13.zip
blk-mq: save queue mapping result into ctx directly
Currently, the queue mapping result is saved in a two-dimensional array. In the hot path, to get a hctx, we need do following: q->queue_hw_ctx[q->tag_set->map[type].mq_map[cpu]] This isn't very efficient. We could save the queue mapping result into ctx directly with different hctx type, like, ctx->hctxs[type] Signed-off-by: Jianchao Wang <jianchao.w.wang@oracle.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq-tag.c')
-rw-r--r--block/blk-mq-tag.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c
index 2089c6c62f44..a4931fc7be8a 100644
--- a/block/blk-mq-tag.c
+++ b/block/blk-mq-tag.c
@@ -170,7 +170,7 @@ unsigned int blk_mq_get_tag(struct blk_mq_alloc_data *data)
data->ctx = blk_mq_get_ctx(data->q);
data->hctx = blk_mq_map_queue(data->q, data->cmd_flags,
- data->ctx->cpu);
+ data->ctx);
tags = blk_mq_tags_from_data(data);
if (data->flags & BLK_MQ_REQ_RESERVED)
bt = &tags->breserved_tags;