OSDN Git Service

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 20:45:00 +0000 (13:45 -0700)
commit3110fc79606fb6003949246c6fb325dd43445273
tree7b583e5d4e3f0487a4804900ecfc510addfb0ee9
parent67cae4c948a5311121905a2a8740c50daf7f6478
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