• Shaohua Li's avatar
    blk-throttle: configure bps/iops limit for cgroup in low limit · b22c417c
    Shaohua Li authored
    each queue will have a state machine. Initially queue is in LIMIT_LOW
    state, which means all cgroups will be throttled according to their low
    limit. After all cgroups with low limit cross the limit, the queue state
    gets upgraded to LIMIT_MAX state.
    For max limit, cgroup will use the limit configured by user.
    For low limit, cgroup will use the minimal value between low limit and
    max limit configured by user. If the minimal value is 0, which means the
    cgroup doesn't configure low limit, we will use max limit to throttle
    the cgroup and the cgroup is ready to upgrade to LIMIT_MAX
    Signed-off-by: default avatarShaohua Li <shli@fb.com>
    Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    b22c417c
blk-throttle.c 46.6 KB