summaryrefslogtreecommitdiffstats
path: root/block/blk-mq.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-10-29 13:13:29 -0600
committerJens Axboe <axboe@kernel.dk>2018-11-07 13:44:59 -0700
commitf31967f0e455d08d3ea1d2f849bf62dafc92dbf4 (patch)
tree22fbc79b5ba286e2add8f995a8cfa9f211200192 /block/blk-mq.h
parentf9afca4d367b8c915f28d29fcaba7460640403ff (diff)
downloadlinux-f31967f0e455d08d3ea1d2f849bf62dafc92dbf4.tar.gz
linux-f31967f0e455d08d3ea1d2f849bf62dafc92dbf4.tar.bz2
linux-f31967f0e455d08d3ea1d2f849bf62dafc92dbf4.zip
blk-mq: allow software queue to map to multiple hardware queues
The mapping used to be dependent on just the CPU location, but now it's a tuple of (type, cpu) instead. This is a prep patch for allowing a single software queue to map to multiple hardware queues. No functional changes in this patch. This changes the software queue count to an unsigned short to save a bit of space. We can still support 64K-1 CPUs, which should be enough. Add a check to catch a wrap. Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.h')
-rw-r--r--block/blk-mq.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-mq.h b/block/blk-mq.h
index 6a8f8b60d8ba..1821f448f7c4 100644
--- a/block/blk-mq.h
+++ b/block/blk-mq.h
@@ -17,7 +17,7 @@ struct blk_mq_ctx {
} ____cacheline_aligned_in_smp;
unsigned int cpu;
- unsigned int index_hw;
+ unsigned short index_hw[HCTX_MAX_TYPES];
/* incremented at dispatch time */
unsigned long rq_dispatched[2];