blk-mq: allow software queue to map to multiple hardware queues
authorJens Axboe <axboe@kernel.dk>
Mon, 29 Oct 2018 19:13:29 +0000 (13:13 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 7 Nov 2018 02:47:53 +0000 (19:47 -0700)
commit3f48a27fd4a9154817b24422505e9612ab6f7ecd
tree1fa16f34854a18f994da452ab02b3676bc4ae1af
parent8c102b1010e1f83fc0c12b0d4e1764abbddfdf53
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>
block/blk-mq-sched.c
block/blk-mq.c
block/blk-mq.h
block/kyber-iosched.c
include/linux/blk-mq.h