]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - block/bfq-iosched.c
block, bfq: do not expire a queue when it is the only busy one
authorPaolo Valente <paolo.valente@linaro.org>
Fri, 22 Jan 2021 18:19:48 +0000 (19:19 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Jan 2021 01:18:24 +0000 (18:18 -0700)
commit2391d13ed484df1515f0025458e1f82317823fab
tree665cde651345a1df5529b5aec81721775a0d035c
parent3c337690d2ebb7a01fa13bfa59ce4911f358df42
block, bfq: do not expire a queue when it is the only busy one

This commits preserves I/O-dispatch plugging for a special symmetric
case that may suddenly turn into asymmetric: the case where only one
bfq_queue, say bfqq, is busy. In this case, not expiring bfqq does not
cause any harm to any other queues in terms of service guarantees. In
contrast, it avoids the following unlucky sequence of events: (1) bfqq
is expired, (2) a new queue with a lower weight than bfqq becomes busy
(or more queues), (3) the new queue is served until a new request
arrives for bfqq, (4) when bfqq is finally served, there are so many
requests of the new queue in the drive that the pending requests for
bfqq take a lot of time to be served. In particular, event (2) may
case even already dispatched requests of bfqq to be delayed, inside
the drive. So, to avoid this series of events, the scenario is
preventively declared as asymmetric also if bfqq is the only busy
queues. By doing so, I/O-dispatch plugging is performed for bfqq.

Tested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Paolo Valente <paolo.valente@linaro.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bfq-iosched.c