• Tejun Heo's avatar
    blk-iocost: halve debts if device stays idle · dda1315f
    Tejun Heo authored
    A low weight iocg can amass a large amount of debt, for example, when
    anonymous memory gets reclaimed aggressively. If the system has a lot of
    memory paired with a slow IO device, the debt can span multiple seconds or
    more. If there are no other subsequent IO issuers, the in-debt iocg may end
    up blocked paying its debt while the IO device is idle.
    
    This patch implements a mechanism to protect against such pathological
    cases. If the device has been sufficiently idle for a substantial amount of
    time, the debts are halved. The criteria are on the conservative side as we
    want to resolve the rare extreme cases without impacting regular operation
    by forgiving debts too readily.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    dda1315f
blk-iocost.c 89.3 KB