• Tang Junhui's avatar
    bcache: add journal statistic · a728eacb
    Tang Junhui authored
    Sometimes, Journal takes up a lot of CPU, we need statistics
    to know what's the journal is doing. So this patch provide
    some journal statistics:
    1) reclaim: how many times the journal try to reclaim resource,
       usually the journal bucket or/and the pin are exhausted.
    2) flush_write: how many times the journal try to flush btree node
       to cache device, usually the journal bucket are exhausted.
    3) retry_flush_write: how many times the journal retry to flush
       the next btree node, usually the previous tree node have been
       flushed by other thread.
    we show these statistic by sysfs interface. Through these statistics
    We can totally see the status of journal module when the CPU is too
    high.
    Signed-off-by: default avatarTang Junhui <tang.junhui@zte.com.cn>
    Reviewed-by: default avatarMichael Lyle <mlyle@lyle.org>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    a728eacb
journal.c 18.7 KB