• Tejun Heo's avatar
    iocost: reimplement debt forgiveness using average usage · c7af2a00
    Tejun Heo authored
    Debt forgiveness logic was counting the number of consecutive !busy periods
    as the trigger condition. While this usually works, it can easily be thrown
    off by temporary fluctuations especially on configurations w/ short periods.
    
    This patch reimplements debt forgiveness so that:
    
    * Use the average usage over the forgiveness period instead of counting
      consecutive periods.
    
    * Debt is reduced at around the target rate (1/2 every 100ms) regardless of
      ioc period duration.
    
    * Usage threshold is raised to 50%. Combined with the preceding changes and
      the switch to average usage, this makes debt forgivness a lot more
      effective at reducing the amount of unnecessary idleness.
    
    * Constants are renamed with DFGV_ prefix.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    c7af2a00
blk-iocost.c 94.8 KB