blk-iocost: combine local_stat and desc_stat to stat
authorChengming Zhou <zhouchengming@bytedance.com>
Tue, 10 May 2022 03:47:57 +0000 (11:47 +0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 11 May 2022 23:05:52 +0000 (17:05 -0600)
commit2a371f7d5fa575010b915e325c5d20b9ad0d5d5a
treedbaac60d44bfcddff3a1618e4bcfd12297330a5c
parent069adbac2cd85ae00252da6c5576cbf9b9d9ba6e
blk-iocost: combine local_stat and desc_stat to stat

When we flush usage, wait, indebt stat in iocg_flush_stat(), we use
local_stat and desc_stat, which has no point since the leaf iocg
only has local_stat and the inner iocg only has desc_stat. Also
we don't need to flush percpu abs_vusage for these inner iocgs.

This patch combine local_stat and desc_stat to stat, only flush
percpu abs_vusage for active leaf iocgs, then build inner walk
list to propagate.

Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20220510034757.21761-1-zhouchengming@bytedance.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-iocost.c