diff options
author | Roman Gushchin <guro@fb.com> | 2017-08-02 18:55:31 +0200 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2017-08-02 21:05:20 +0200 |
commit | ec39225cca42c05ac36853d11d28f877fde5c42e (patch) | |
tree | 7291a1c4befe3cd890a28802fce26c0f7e6e81f5 /arch/cris/mm | |
parent | cgroup: implement hierarchy limits (diff) | |
download | linux-ec39225cca42c05ac36853d11d28f877fde5c42e.tar.xz linux-ec39225cca42c05ac36853d11d28f877fde5c42e.zip |
cgroup: add cgroup.stat interface with basic hierarchy stats
A cgroup can consume resources even after being deleted by a user.
For example, writing back dirty pages should be accounted and
limited, despite the corresponding cgroup might contain no processes
and being deleted by a user.
In the current implementation a cgroup can remain in such "dying" state
for an undefined amount of time. For instance, if a memory cgroup
contains a pge, mlocked by a process belonging to an other cgroup.
Although the lifecycle of a dying cgroup is out of user's control,
it's important to have some insight of what's going on under the hood.
In particular, it's handy to have a counter which will allow
to detect css leaks.
To solve this problem, add a cgroup.stat interface to
the base cgroup control files with the following metrics:
nr_descendants total number of visible descendant cgroups
nr_dying_descendants total number of dying descendant cgroups
Signed-off-by: Roman Gushchin <guro@fb.com>
Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: Waiman Long <longman@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: kernel-team@fb.com
Cc: cgroups@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Diffstat (limited to 'arch/cris/mm')
0 files changed, 0 insertions, 0 deletions