• Tejun Heo's avatar
    blk-iocost: Don't let merges push vtime into the future · e1518f63
    Tejun Heo authored
    Merges have the same problem that forced-bios had which is fixed by
    the previous patch.  The cost of a merge is calculated at the time of
    issue and force-advances vtime into the future.  Until global vtime
    catches up, how the cgroup's hweight changes in the meantime doesn't
    matter and it often leads to situations where the cost is calculated
    at one hweight and paid at a very different one.  See the previous
    patch for more details.
    
    Fix it by never advancing vtime into the future for merges.  If budget
    is available, vtime is advanced.  Otherwise, the cost is charged as
    debt.
    
    This brings merge cost handling in line with issue cost handling in
    ioc_rqos_throttle().
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    e1518f63
blk-iocost.c 66.5 KB