• Shaohua Li's avatar
    blk-throttle: add latency target support · 53696b8d
    Shaohua Li authored
    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: default avatarShaohua Li <shli@fb.com>
    Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    53696b8d
blk-throttle.c 65.1 KB