• Tejun Heo's avatar
    blk-iocost: add absolute usage stat · 97eb1975
    Tejun Heo authored
    Currently, iocost doesn't collect or expose any statistics punting off all
    monitoring duties to drgn based iocost_monitor.py. While it works for some
    scenarios, there are some usability and data availability challenges. For
    example, accurate per-cgroup usage information can't be tracked by vtime
    progression at all and the number available in iocg->usages[] are really
    short-term snapshots used for control heuristics with possibly significant
    errors.
    
    This patch implements per-cgroup absolute usage stat counter and exposes it
    through io.stat along with the current vrate. Usage stat collection and
    flushing employ the same method as cgroup rstat on the active iocg's and the
    only hot path overhead is preemption toggling and adding to a percpu
    counter.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    97eb1975
blk-iocost.c 74.7 KB