]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commitf26f97cc41775df83739312fa40db895b67b9923
treea7ed26f5e86f3f542701f69ea0032a2e3244fca0
parent50b0a5b2fffeb4d744ddff6fe0cc5e11e5365989
blk-throttle: fix zero wait time for iops throttled group

BugLink: https://bugs.launchpad.net/bugs/1839036
commit 3a10f999ffd464d01c5a05592a15470a3c4bbc36 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
block/blk-throttle.c