]> 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)
commit0d1e7fa5024b9af1b0285c869878f2d585bbaa42
treeca582c28dd2c2023025456691b19ff420b5939e5
parente0bb4c32b8b345a693c6eea6474bdb78200aa4a8
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