]> git.kernelconcepts.de Git - karo-tx-linux.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)
commitaec242468cb84b8eea7130c10530a69d2b352bff
treeca582c28dd2c2023025456691b19ff420b5939e5
parentd61fcfa4bb18992dc8e171996808e1034dc643bb
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