aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-10-29 15:06:13 -0600
committerJens Axboe <axboe@kernel.dk>2018-11-07 13:44:59 -0700
commitea4f995ee8b8f0578b3319949f2edd5d812fdb0a (patch)
treef7516777fbd8b2fc16cf75b846792981c3a07434 /include/linux/blkdev.h
parentblk-mq: separate number of hardware queues from nr_cpu_ids (diff)
downloadlinux-dev-ea4f995ee8b8f0578b3319949f2edd5d812fdb0a.tar.xz
linux-dev-ea4f995ee8b8f0578b3319949f2edd5d812fdb0a.zip
blk-mq: cache request hardware queue mapping
We call blk_mq_map_queue() a lot, at least two times for each request per IO, sometimes more. Since we now have an indirect call as well in that function. cache the mapping so we don't have to re-call blk_mq_map_queue() for the same request multiple times. Reviewed-by: Keith Busch <keith.busch@intel.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r--include/linux/blkdev.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 2ae7465d68ab..9b1f470cc784 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -129,6 +129,7 @@ enum mq_rq_state {
struct request {
struct request_queue *q;
struct blk_mq_ctx *mq_ctx;
+ struct blk_mq_hw_ctx *mq_hctx;
unsigned int cmd_flags; /* op and common flags */
req_flags_t rq_flags;