diff options
author | Paul Menage <menage@google.com> | 2008-04-11 00:29:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-11 11:06:43 -0400 |
commit | b6c3006d204a0b86e1ebe02ca38f9f071a03c7ef (patch) | |
tree | f8f4487b8fe5dedb804c876c3e6f7df90f6b209d | |
parent | d10d89ec78114f925f63c5126a2b2490f501a462 (diff) |
cgroups: include hierarchy ids in /proc/<pid>/cgroup
Extend the /proc/<pid>/cgroup file to include the appropriate hierarchy ID on
each line.
Currently this ID isn't really needed since a hierarchy can be completely
identified by the set of subsystems bound to it, but this is likely to change
in the near future in order to support stateless subsystems and
merging/rebinding of subsystems. Getting this change into 2.6.25 reduces the
need for an API change later.
Signed-off-by: Paul Menage <menage@google.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Pavel Emelyanov <xemul@openvz.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | kernel/cgroup.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 62f1a5231fe9..2727f9238359 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -2569,6 +2569,7 @@ static int proc_cgroup_show(struct seq_file *m, void *v) | |||
2569 | /* Skip this hierarchy if it has no active subsystems */ | 2569 | /* Skip this hierarchy if it has no active subsystems */ |
2570 | if (!root->actual_subsys_bits) | 2570 | if (!root->actual_subsys_bits) |
2571 | continue; | 2571 | continue; |
2572 | seq_printf(m, "%lu:", root->subsys_bits); | ||
2572 | for_each_subsys(root, ss) | 2573 | for_each_subsys(root, ss) |
2573 | seq_printf(m, "%s%s", count++ ? "," : "", ss->name); | 2574 | seq_printf(m, "%s%s", count++ ? "," : "", ss->name); |
2574 | seq_putc(m, ':'); | 2575 | seq_putc(m, ':'); |