diff options
author | Paul Menage <menage@google.com> | 2007-10-19 02:39:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 14:53:36 -0400 |
commit | a424316ca154317367c7ddf89997d1c80e4a8051 (patch) | |
tree | ed349926c41aad5be6d62c9074ff72a0d9ac32c2 /fs/proc | |
parent | 697f41610863c9264a7ae26dac9a387c9dda8c84 (diff) |
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 <menage@google.com>
Cc: Serge E. Hallyn <serue@us.ibm.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Paul Jackson <pj@sgi.com>
Cc: Kirill Korotaev <dev@openvz.org>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: Srivatsa Vaddagiri <vatsa@in.ibm.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/base.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 4fe74d156416..0e9a9aa9df64 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -67,6 +67,7 @@ | |||
67 | #include <linux/mount.h> | 67 | #include <linux/mount.h> |
68 | #include <linux/security.h> | 68 | #include <linux/security.h> |
69 | #include <linux/ptrace.h> | 69 | #include <linux/ptrace.h> |
70 | #include <linux/cgroup.h> | ||
70 | #include <linux/cpuset.h> | 71 | #include <linux/cpuset.h> |
71 | #include <linux/audit.h> | 72 | #include <linux/audit.h> |
72 | #include <linux/poll.h> | 73 | #include <linux/poll.h> |
@@ -2133,6 +2134,9 @@ static const struct pid_entry tgid_base_stuff[] = { | |||
2133 | #ifdef CONFIG_CPUSETS | 2134 | #ifdef CONFIG_CPUSETS |
2134 | REG("cpuset", S_IRUGO, cpuset), | 2135 | REG("cpuset", S_IRUGO, cpuset), |
2135 | #endif | 2136 | #endif |
2137 | #ifdef CONFIG_CGROUPS | ||
2138 | REG("cgroup", S_IRUGO, cgroup), | ||
2139 | #endif | ||
2136 | INF("oom_score", S_IRUGO, oom_score), | 2140 | INF("oom_score", S_IRUGO, oom_score), |
2137 | REG("oom_adj", S_IRUGO|S_IWUSR, oom_adjust), | 2141 | REG("oom_adj", S_IRUGO|S_IWUSR, oom_adjust), |
2138 | #ifdef CONFIG_AUDITSYSCALL | 2142 | #ifdef CONFIG_AUDITSYSCALL |
@@ -2419,6 +2423,9 @@ static const struct pid_entry tid_base_stuff[] = { | |||
2419 | #ifdef CONFIG_CPUSETS | 2423 | #ifdef CONFIG_CPUSETS |
2420 | REG("cpuset", S_IRUGO, cpuset), | 2424 | REG("cpuset", S_IRUGO, cpuset), |
2421 | #endif | 2425 | #endif |
2426 | #ifdef CONFIG_CGROUPS | ||
2427 | REG("cgroup", S_IRUGO, cgroup), | ||
2428 | #endif | ||
2422 | INF("oom_score", S_IRUGO, oom_score), | 2429 | INF("oom_score", S_IRUGO, oom_score), |
2423 | REG("oom_adj", S_IRUGO|S_IWUSR, oom_adjust), | 2430 | REG("oom_adj", S_IRUGO|S_IWUSR, oom_adjust), |
2424 | #ifdef CONFIG_AUDITSYSCALL | 2431 | #ifdef CONFIG_AUDITSYSCALL |