blk-iocost: implement vtime loss compensation
authorTejun Heo <tj@kernel.org>
Tue, 1 Sep 2020 18:52:54 +0000 (14:52 -0400)
committerJens Axboe <axboe@kernel.dk>
Wed, 2 Sep 2020 01:38:33 +0000 (19:38 -0600)
commitac33e91e2daca40fcad66c68712276da7b40f169
tree3364d49b6020adc8330667e27e8a8684e33630a6
parentdda1315f18536cb94e293a3ae0ccb5c4df53e5e4
blk-iocost: implement vtime loss compensation

When an iocg accumulates too much vtime or gets deactivated, we throw away
some vtime, which lowers the overall device utilization. As the exact amount
which is being thrown away is known, we can compensate by accelerating the
vrate accordingly so that the extra vtime generated in the current period
matches what got lost.

This significantly improves work conservation when involving high weight
cgroups with intermittent and bursty IO patterns.

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