]> git.baikalelectronics.ru Git - kernel.git/commit
blk-throttle: detect completed idle cgroup
authorShaohua Li <shli@fb.com>
Mon, 27 Mar 2017 17:51:39 +0000 (10:51 -0700)
committerJens Axboe <axboe@fb.com>
Tue, 28 Mar 2017 14:02:20 +0000 (08:02 -0600)
commit2b97cf917194033057628ef5c24259daa4b942d1
treeca582c28dd2c2023025456691b19ff420b5939e5
parent70e4652aa52ad6dc1d6b22351df22211dec80b7d
blk-throttle: detect completed idle cgroup

cgroup could be assigned a limit, but doesn't dispatch enough IO, eg the
cgroup is idle. When this happens, the cgroup doesn't hit its limit, so
we can't move the state machine to higher level and all cgroups will be
throttled to their lower limit, so we waste bandwidth. Detecting idle
cgroup is hard. This patch handles a simple case, a cgroup doesn't
dispatch any IO. We ignore such cgroup's limit, so other cgroups can use
the bandwidth.

Please note this will be replaced with a more sophisticated algorithm
later, but this demonstrates the idea how we handle idle cgroups, so I
leave it here.

Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-throttle.c