]> git.baikalelectronics.ru Git - kernel.git/commit
blk-throttle: add latency target support
authorShaohua Li <shli@fb.com>
Mon, 27 Mar 2017 22:19:43 +0000 (15:19 -0700)
committerJens Axboe <axboe@fb.com>
Tue, 28 Mar 2017 14:02:20 +0000 (08:02 -0600)
commitb8ca1b907142090faf32fda0654fa3d718e9a560
tree843090a882b03bbaa9731b1bab546be79f7a79c5
parent9609f4546c0ad5aa4b587cc36070d3e267b0df3a
blk-throttle: add latency target support

One hard problem adding .low limit is to detect idle cgroup. If one
cgroup doesn't dispatch enough IO against its low limit, we must have a
mechanism to determine if other cgroups dispatch more IO. We added the
think time detection mechanism before, but it doesn't work for all
workloads. Here we add a latency based approach.

We already have mechanism to calculate latency threshold for each IO
size. For every IO dispatched from a cgorup, we compare its latency
against its threshold and record the info. If most IO latency is below
threshold (in the code I use 75%), the cgroup could be treated idle and
other cgroups can dispatch more IO.

Currently this latency target check is only for SSD as we can't
calcualte the latency target for hard disk. And this is only for cgroup
leaf node so far.

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