[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200527160821.GC42293@cmpxchg.org>
Date: Wed, 27 May 2020 12:08:21 -0400
From: Johannes Weiner <hannes@...xchg.org>
To: Boris Burkov <boris@....io>
Cc: Tejun Heo <tj@...nel.org>, Li Zefan <lizefan@...wei.com>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
cgroups@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-team@...com
Subject: Re: [PATCH cgroup/for-5.8] cgroup: add cpu.stat file to root cgroup
On Tue, May 26, 2020 at 01:08:00PM -0700, Boris Burkov wrote:
> Currently, the root cgroup does not have a cpu.stat file. Add one which
> is consistent with /proc/stat to capture global cpu statistics that
> might not fall under cgroup accounting.
>
> We haven't done this in the past because the data are already presented
> in /proc/stat and we didn't want to add overhead from collecting root
> cgroup stats when cgroups are configured, but no cgroups have been
> created.
>
> By keeping the data consistent with /proc/stat, I think we avoid the
> first problem, while improving the usability of cgroups stats.
> We avoid the second problem by computing the contents of cpu.stat from
> existing data collected for /proc/stat anyway.
>
> Signed-off-by: Boris Burkov <boris@....io>
> Suggested-by: Tejun Heo <tj@...nel.org>
Looks good to me, but Boris can you please update
Documentation/admin-guide/cgroup-v2.rst as well in this patch?
cpu.stat
A read-only flat-keyed file which exists on non-root cgroups.
Thanks!
Powered by blists - more mailing lists