]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - block/blk-throttle.c
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)
commitb22c417c885ea973149ecf56286aabec060153e2
treefcf3e890a2eb1f186882ade5b810f3fe522dc2c0
parentcd5ab1b0fcb44ab5d00358edc9b0b2e2a966fb22
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