cgroup: keep track of number of descent cgroups
Keep track of the number of online and dying descent cgroups. This data will be used later to add an ability to control cgroup hierarchy (limit the depth and the number of descent cgroups) and display hierarchy stats. 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
This commit is contained in:

committed by
Tejun Heo

parent
c705a00d77
commit
0679dee03c
@@ -273,6 +273,14 @@ struct cgroup {
|
||||
*/
|
||||
int level;
|
||||
|
||||
/*
|
||||
* Keep track of total numbers of visible and dying descent cgroups.
|
||||
* Dying cgroups are cgroups which were deleted by a user,
|
||||
* but are still existing because someone else is holding a reference.
|
||||
*/
|
||||
int nr_descendants;
|
||||
int nr_dying_descendants;
|
||||
|
||||
/*
|
||||
* Each non-empty css_set associated with this cgroup contributes
|
||||
* one to nr_populated_csets. The counter is zero iff this cgroup
|
||||
|
Reference in New Issue
Block a user