aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cgroup-defs.h
diff options
context:
space:
mode:
authorRoman Gushchin <guro@fb.com>2017-08-02 17:55:29 +0100
committerTejun Heo <tj@kernel.org>2017-08-02 12:05:19 -0700
commit0679dee03c6d706d57145ea92c23d08fa10a1999 (patch)
treec820222fb59847005601bfbb087f6dfb693af5c4 /include/linux/cgroup-defs.h
parentcgroup: add comment to cgroup_enable_threaded() (diff)
downloadlinux-dev-0679dee03c6d706d57145ea92c23d08fa10a1999.tar.xz
linux-dev-0679dee03c6d706d57145ea92c23d08fa10a1999.zip
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
Diffstat (limited to 'include/linux/cgroup-defs.h')
-rw-r--r--include/linux/cgroup-defs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/cgroup-defs.h b/include/linux/cgroup-defs.h
index 9d741959f218..58b4c425a155 100644
--- a/include/linux/cgroup-defs.h
+++ b/include/linux/cgroup-defs.h
@@ -274,6 +274,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
* doesn't have any tasks.