]> git.baikalelectronics.ru Git - kernel.git/commit
block: flush plug based on hardware and software queue order
authorJens Axboe <axboe@kernel.dk>
Fri, 11 Mar 2022 17:24:17 +0000 (10:24 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 11 Mar 2022 18:08:34 +0000 (11:08 -0700)
commitb72f965ca95b7577ad56f8fdfaaf1930308e3c25
treed408e8ae45e12c0c2418537e0d22753e3b62bbac
parentb0298d55d8f9bb7c020caf279231bec16e5b2f9d
block: flush plug based on hardware and software queue order

We used to sort the plug list if we had multiple queues before dispatching
requests to the IO scheduler. This usually isn't needed, but for certain
workloads that interleave requests to disks, it's a less efficient to
process the plug list one-by-one if everything is interleaved.

Don't sort the list, but skip through it and flush out entries that have
the same target at the same time.

Fixes: 9e7a0e1cc881 ("block: get rid of plug list sorting")
Reported-and-tested-by: Song Liu <song@kernel.org>
Reviewed-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c