]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
blk-throttle: fix zero wait time for iops throttled group
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
Mon, 8 Jul 2019 15:29:57 +0000 (18:29 +0300)
committerJens Axboe <axboe@kernel.dk>
Wed, 10 Jul 2019 15:00:57 +0000 (09:00 -0600)
commit3a10f999ffd464d01c5a05592a15470a3c4bbc36
tree84008b527c89f973b57d8f8a9fb1721a7004e4e7
parent113ab72ed4794c193509a97d7c6d32a6886e1682
blk-throttle: fix zero wait time for iops throttled group

After commit 991f61fe7e1d ("Blk-throttle: reduce tail io latency when
iops limit is enforced") wait time could be zero even if group is
throttled and cannot issue requests right now. As a result
throtl_select_dispatch() turns into busy-loop under irq-safe queue
spinlock.

Fix is simple: always round up target time to the next throttle slice.

Fixes: 991f61fe7e1d ("Blk-throttle: reduce tail io latency when iops limit is enforced")
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-throttle.c