From a424316ca154317367c7ddf89997d1c80e4a8051 Mon Sep 17 00:00:00 2001 From: Paul Menage Date: Thu, 18 Oct 2007 23:39:35 -0700 Subject: Task Control Groups: add procfs interface Add: /proc/cgroups - general system info /proc/*/cgroup - per-task cgroup membership info [a.p.zijlstra@chello.nl: cgroups: bdi init hooks] Signed-off-by: Paul Menage Cc: Serge E. Hallyn Cc: "Eric W. Biederman" Cc: Dave Hansen Cc: Balbir Singh Cc: Paul Jackson Cc: Kirill Korotaev Cc: Herbert Poetzl Cc: Srivatsa Vaddagiri Cc: Cedric Le Goater Signed-off-by: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/proc/base.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'fs') diff --git a/fs/proc/base.c b/fs/proc/base.c index 4fe74d15641..0e9a9aa9df6 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -67,6 +67,7 @@ #include #include #include +#include #include #include #include @@ -2132,6 +2133,9 @@ static const struct pid_entry tgid_base_stuff[] = { #endif #ifdef CONFIG_CPUSETS REG("cpuset", S_IRUGO, cpuset), +#endif +#ifdef CONFIG_CGROUPS + REG("cgroup", S_IRUGO, cgroup), #endif INF("oom_score", S_IRUGO, oom_score), REG("oom_adj", S_IRUGO|S_IWUSR, oom_adjust), @@ -2418,6 +2422,9 @@ static const struct pid_entry tid_base_stuff[] = { #endif #ifdef CONFIG_CPUSETS REG("cpuset", S_IRUGO, cpuset), +#endif +#ifdef CONFIG_CGROUPS + REG("cgroup", S_IRUGO, cgroup), #endif INF("oom_score", S_IRUGO, oom_score), REG("oom_adj", S_IRUGO|S_IWUSR, oom_adjust), -- cgit v1.2.3