aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cgroup_debug.c
diff options
context:
space:
mode:
authorPaul Menage <menage@google.com>2008-04-29 04:00:04 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 11:06:09 -0400
commit3116f0e3df0a67ad56f15dd4c5f6cefb04bb4a98 (patch)
tree27dc8e1000eb7c3e36157963415a0bc8b8555e44 /kernel/cgroup_debug.c
parentc27e8818a09bbdfe7c07c629cb2c27e1a742e156 (diff)
CGroup API files: move "releasable" to cgroup_debug subsystem
The "releasable" control file provided by the cgroup framework exports the state of a per-cgroup flag that's related to the notify-on-release feature. This isn't really generally useful, unless you're trying to debug this particular feature of cgroups. This patch moves the "releasable" file to the cgroup_debug subsystem. Signed-off-by: Paul Menage <menage@google.com> Cc: "Li Zefan" <lizf@cn.fujitsu.com> Cc: Balbir Singh <balbir@in.ibm.com> Cc: Paul Jackson <pj@sgi.com> Cc: Pavel Emelyanov <xemul@openvz.org> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: "YAMAMOTO Takashi" <yamamoto@valinux.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/cgroup_debug.c')
-rw-r--r--kernel/cgroup_debug.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/kernel/cgroup_debug.c b/kernel/cgroup_debug.c
index cbb7a26f4ea..c3dc3aba4c0 100644
--- a/kernel/cgroup_debug.c
+++ b/kernel/cgroup_debug.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * kernel/ccontainer_debug.c - Example cgroup subsystem that 2 * kernel/cgroup_debug.c - Example cgroup subsystem that
3 * exposes debug info 3 * exposes debug info
4 * 4 *
5 * Copyright (C) Google Inc, 2007 5 * Copyright (C) Google Inc, 2007
@@ -62,6 +62,11 @@ static u64 current_css_set_refcount_read(struct cgroup *cont,
62 return count; 62 return count;
63} 63}
64 64
65static u64 releasable_read(struct cgroup *cgrp, struct cftype *cft)
66{
67 return test_bit(CGRP_RELEASABLE, &cgrp->flags);
68}
69
65static struct cftype files[] = { 70static struct cftype files[] = {
66 { 71 {
67 .name = "cgroup_refcount", 72 .name = "cgroup_refcount",
@@ -81,6 +86,11 @@ static struct cftype files[] = {
81 .name = "current_css_set_refcount", 86 .name = "current_css_set_refcount",
82 .read_u64 = current_css_set_refcount_read, 87 .read_u64 = current_css_set_refcount_read,
83 }, 88 },
89
90 {
91 .name = "releasable",
92 .read_u64 = releasable_read,
93 }
84}; 94};
85 95
86static int debug_populate(struct cgroup_subsys *ss, struct cgroup *cont) 96static int debug_populate(struct cgroup_subsys *ss, struct cgroup *cont)