• Tejun Heo's avatar
    iocost: consider iocgs with active delays for debt forgiveness · bec02dbb
    Tejun Heo authored
    An iocg may have 0 debt but non-zero delay. The current debt forgiveness
    logic doesn't act on such iocgs. This can lead to unexpected behaviors - an
    iocg with a little bit of debt will have its delay canceled through debt
    forgiveness but one w/o any debt but active delay will have to wait out
    until its delay decays out.
    
    This patch updates the debt handling logic so that it treats delays the same
    as debts. If either debt or delay is active, debt forgiveness logic kicks in
    and acts on both the same way.
    
    Also, avoid turning the debt and delay directly to zero as that can confuse
    state transitions.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    bec02dbb
blk-iocost.c 95.1 KB