]> git.baikalelectronics.ru Git - kernel.git/commit
blk-iocost: Don't let merges push vtime into the future
authorTejun Heo <tj@kernel.org>
Wed, 4 Sep 2019 19:45:53 +0000 (12:45 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 10 Sep 2019 18:31:39 +0000 (12:31 -0600)
commitbd0660afb6bb267617f4611ec2b0a99db9029d9f
tree3d7868912f57e6b10947dbf955e157ebbd3279b2
parenta5d3306843341d86f9b8eb6d81fc6e5b08ceb3a9
blk-iocost: Don't let merges push vtime into the future

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