• Jens Axboe's avatar
    block: add scalable completion tracking of requests · cf43e6be
    Jens Axboe authored
    For legacy block, we simply track them in the request queue. For
    blk-mq, we track them on a per-sw queue basis, which we can then
    sum up through the hardware queues and finally to a per device
    state.
    
    The stats are tracked in, roughly, 0.1s interval windows.
    
    Add sysfs files to display the stats.
    
    The feature is off by default, to avoid any extra overhead. In-kernel
    users of it can turn it on by setting QUEUE_FLAG_STATS in the queue
    flags. We currently don't turn it on if someone just reads any of
    the stats files, that is something we could add as well.
    Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    cf43e6be
blk-mq-sysfs.c 12.9 KB