]> git.baikalelectronics.ru Git - kernel.git/commit
blk-throttle: configure bps/iops limit for cgroup in low limit
authorShaohua Li <shli@fb.com>
Mon, 27 Mar 2017 17:51:33 +0000 (10:51 -0700)
committerJens Axboe <axboe@fb.com>
Tue, 28 Mar 2017 14:02:20 +0000 (08:02 -0600)
commitdd4b76bea7520676af15b7b42aa8d903aa42177a
treefcf3e890a2eb1f186882ade5b810f3fe522dc2c0
parent9f602c1d32fdea054c2b0cff615f3bf408d7324e
blk-throttle: configure bps/iops limit for cgroup in low limit

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: Shaohua Li <shli@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-throttle.c