diff options
author | Jens Axboe <axboe@kernel.dk> | 2018-10-29 13:13:29 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-11-07 13:44:59 -0700 |
commit | f31967f0e455d08d3ea1d2f849bf62dafc92dbf4 (patch) | |
tree | 22fbc79b5ba286e2add8f995a8cfa9f211200192 /include/linux/blk-mq.h | |
parent | f9afca4d367b8c915f28d29fcaba7460640403ff (diff) | |
download | linux-stable-f31967f0e455d08d3ea1d2f849bf62dafc92dbf4.tar.gz linux-stable-f31967f0e455d08d3ea1d2f849bf62dafc92dbf4.tar.bz2 linux-stable-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 'include/linux/blk-mq.h')
-rw-r--r-- | include/linux/blk-mq.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index 176164888628..6c39d546c50b 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h @@ -37,7 +37,8 @@ struct blk_mq_hw_ctx { struct blk_mq_ctx *dispatch_from; unsigned int dispatch_busy; - unsigned int nr_ctx; + unsigned short type; + unsigned short nr_ctx; struct blk_mq_ctx **ctxs; spinlock_t dispatch_wait_lock; |