]> git.kernelconcepts.de Git - karo-tx-linux.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)
commit53696b8d212f4a0f0e5dcdb3df64558dcdf03d1a
tree843090a882b03bbaa9731b1bab546be79f7a79c5
parentb9147dd1bae2b15d6931ecd42f8606c775fecbc9
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