• Shaohua Li's avatar
    blk-throttle: make sure expire time isn't too big · fc23c57d
    Shaohua Li authored
    
    [ Upstream commit 06cceedc ]
    
    cgroup could be throttled to a limit but when all cgroups cross high
    limit, queue enters a higher state and so the group should be throttled
    to a higher limit. It's possible the cgroup is sleeping because of
    throttle and other cgroups don't dispatch IO any more. In this case,
    nobody can trigger current downgrade/upgrade logic. To fix this issue,
    we could either set up a timer to wakeup the cgroup if other cgroups are
    idle or make sure this cgroup doesn't sleep too long. Setting up a timer
    means we must change the timer very frequently. This patch chooses the
    latter. Making cgroup sleep time not too big wouldn't change cgroup
    bps/iops, but could make it wakeup more frequently, which isn't a big
    issue because throtl_slice * 8 is already quite big.
    Signed-off-by: default avatarShaohua Li <shli@fb.com>
    Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    fc23c57d
blk-throttle.c 43.1 KB