[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZiarF2wxWecJ1vTE@slm.duckdns.org>
Date: Mon, 22 Apr 2024 08:23:19 -1000
From: Tejun Heo <tj@...nel.org>
To: Kemeng Shi <shikemeng@...weicloud.com>
Cc: akpm@...ux-foundation.org, willy@...radead.org, jack@...e.cz,
bfoster@...hat.com, dsterba@...e.com, mjguzik@...il.com,
dhowells@...hat.com, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH v4 1/4] writeback: collect stats of all wb of bdi in
bdi_debug_stats_show
On Tue, Apr 23, 2024 at 12:48:05AM +0800, Kemeng Shi wrote:
> /sys/kernel/debug/bdi/xxx/stats is supposed to show writeback information
> of whole bdi, but only writeback information of bdi in root cgroup is
> collected. So writeback information in non-root cgroup are missing now.
> To be more specific, considering following case:
>
> /* create writeback cgroup */
> cd /sys/fs/cgroup
> echo "+memory +io" > cgroup.subtree_control
> mkdir group1
> cd group1
> echo $$ > cgroup.procs
> /* do writeback in cgroup */
> fio -name test -filename=/dev/vdb ...
> /* get writeback info of bdi */
> cat /sys/kernel/debug/bdi/xxx/stats
> The cat result unexpectedly implies that there is no writeback on target
> bdi.
>
> Fix this by collecting stats of all wb in bdi instead of only wb in
> root cgroup.
>
> Following domain hierarchy is tested:
> global domain (320G)
> / \
> cgroup domain1(10G) cgroup domain2(10G)
> | |
> bdi wb1 wb2
>
> /* all writeback info of bdi is successfully collected */
> cat stats
> BdiWriteback: 2912 kB
> BdiReclaimable: 1598464 kB
> BdiDirtyThresh: 167479028 kB
> DirtyThresh: 195038532 kB
> BackgroundThresh: 32466728 kB
> BdiDirtied: 19141696 kB
> BdiWritten: 17543456 kB
> BdiWriteBandwidth: 1136172 kBps
> b_dirty: 2
> b_io: 0
> b_more_io: 1
> b_dirty_time: 0
> bdi_list: 1
> state: 1
>
> Signed-off-by: Kemeng Shi <shikemeng@...weicloud.com>
Acked-by: Tejun Heo <tj@...nel.org>
Thanks.
--
tejun
Powered by blists - more mailing lists