]> git.baikalelectronics.ru Git - kernel.git/commit
iocost: reimplement debt forgiveness using average usage
authorTejun Heo <tj@kernel.org>
Fri, 18 Sep 2020 00:44:55 +0000 (20:44 -0400)
committerJens Axboe <axboe@kernel.dk>
Fri, 25 Sep 2020 14:35:02 +0000 (08:35 -0600)
commit8731a32c512bff2dc31aafc9b8c1793fa08be5b5
tree9ea9e5985b7224484015bfc3474c7cbdeb6f2e5f
parentb08712c4f7c8926e4163c4603a0ed928c080ee8d
iocost: reimplement debt forgiveness using average usage

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