summaryrefslogtreecommitdiffstats
path: root/block/blk-wbt.h
diff options
context:
space:
mode:
authorShaohua Li <shli@fb.com>2017-03-27 10:51:44 -0700
committerJens Axboe <axboe@fb.com>2017-03-28 08:02:20 -0600
commitec80991d6fc2cb17abfc5427ac1512d2ccd40589 (patch)
treece3709e88bfdee940afa7729e2358505f8a6dcae /block/blk-wbt.h
parentfa6fb5aab85f3e2d9cf017ec516a8c234402a7cd (diff)
downloadlinux-0-day-ec80991d6fc2cb17abfc5427ac1512d2ccd40589.tar.gz
blk-throttle: add interface for per-cgroup target latency
Here we introduce per-cgroup latency target. The target determines how a cgroup can afford latency increasement. We will use the target latency to calculate a threshold and use it to schedule IO for cgroups. If a cgroup's bandwidth is below its low limit but its average latency is below the threshold, other cgroups can safely dispatch more IO even their bandwidth is higher than their low limits. On the other hand, if the first cgroup's latency is higher than the threshold, other cgroups are throttled to their low limits. So the target latency determines how we efficiently utilize free disk resource without sacifice of worload's IO latency. For example, assume 4k IO average latency is 50us when disk isn't congested. A cgroup sets the target latency to 30us. Then the cgroup can accept 50+30=80us IO latency. If the cgroupt's average IO latency is 90us and its bandwidth is below low limit, other cgroups are throttled to their low limit. If the cgroup's average IO latency is 60us, other cgroups are allowed to dispatch more IO. When other cgroups dispatch more IO, the first cgroup's IO latency will increase. If it increases to 81us, we then throttle other cgroups. User will configure the interface in this way: echo "8:16 rbps=2097152 wbps=max latency=100 idle=200" > io.low latency is in microsecond unit By default, latency target is 0, which means to guarantee IO latency. Signed-off-by: Shaohua Li <shli@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-wbt.h')
0 files changed, 0 insertions, 0 deletions