blk-mq: improve plug list sorting
authorJens Axboe <axboe@kernel.dk>
Tue, 30 Oct 2018 18:24:04 +0000 (12:24 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 7 Nov 2018 02:47:54 +0000 (19:47 -0700)
commit2a21a2c3535ae2abd6ab3fdb964b1834355784eb
tree7c83a0eb53828a7ffe71ffac2ade20a6e64293ba
parent25c2fde205a800157ccd83c7f2446627b4f3491f
blk-mq: improve plug list sorting

Currently we only look at the software queue, but with support
for multiple maps, we should also look at the hardware queue.
This is important since we'll flush out the request list if
either the software queue or hardware queue don't match.

This sorts by software queue first, then hardware queue if
that differs. Finally we sort by request location like before.
This minimizes the flush points per plug list.

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>
block/blk-mq.c