iocost: recalculate delay after debt reduction
authorTejun Heo <tj@kernel.org>
Fri, 18 Sep 2020 00:44:54 +0000 (20:44 -0400)
committerJens Axboe <axboe@kernel.dk>
Fri, 25 Sep 2020 14:35:02 +0000 (08:35 -0600)
commitd95178410b7706844491efb77fb0a37a69f7a5e6
tree7798e50745e783b2ab79ecd91f52c3fe74a8f2de
parent33a1fe6d822b3552fcad9bbb059b2fb93566f4c9
iocost: recalculate delay after debt reduction

Debt sets the initial delay duration which is decayed over time. The current
debt reduction halved the debt but didn't change the delay. It prevented
future debts from increasing delay but didn't do anything to lower the
existing delay, limiting the mechanism's ability to reduce unnecessary
idling.

Reset iocg->delay to 0 after debt reduction so that iocg_kick_waitq()
recalculates new delay value based on the reduced debt amount.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-iocost.c