[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200601204214.GF31548@mtj.thefacebook.com>
Date: Mon, 1 Jun 2020 16:42:14 -0400
From: Tejun Heo <tj@...nel.org>
To: Boris Burkov <boris@....io>
Cc: Jens Axboe <axboe@...nel.dk>, cgroups@...r.kernel.org,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-team@...com
Subject: Re: [PATCH 2/2 blk-cgroup/for-5.8] blk-cgroup: show global disk
stats in root cgroup io.stat
On Mon, Jun 01, 2020 at 01:12:05PM -0700, Boris Burkov wrote:
> In order to improve consistency and usability in cgroup stat accounting,
> we would like to support the root cgroup's io.stat.
>
> Since the root cgroup has processes doing io even if the system has no
> explicitly created cgroups, we need to be careful to avoid overhead in
> that case. For that reason, the rstat algorithms don't handle the root
> cgroup, so just turning the file on wouldn't give correct statistics.
>
> To get around this, we simulate flushing the iostat struct by filling it
> out directly from global disk stats. The result is a root cgroup io.stat
> file consistent with both /proc/diskstats and io.stat.
>
> Note that in order to collect the disk stats, we needed to iterate over
> devices. To facilitate that, we had to change the linkage of a disk_type
> to external so that it can be used from blk-cgroup.c to iterate over
> disks.
>
> Signed-off-by: Boris Burkov <boris@....io>
> Suggested-by: Tejun Heo <tj@...nel.org>
Acked-by: Tejun Heo <tj@...nel.org>
Thanks.
--
tejun
Powered by blists - more mailing lists