• Shaohua Li's avatar
    blk-throttle: detect completed idle cgroup · aec24246
    Shaohua Li authored
    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: default avatarShaohua Li <shli@fb.com>
    Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    aec24246
blk-throttle.c 55.2 KB