提交 b6c3006d 编写于 作者: P Paul Menage 提交者: Linus Torvalds

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: NPaul 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: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 d10d89ec
...@@ -2569,6 +2569,7 @@ static int proc_cgroup_show(struct seq_file *m, void *v) ...@@ -2569,6 +2569,7 @@ static int proc_cgroup_show(struct seq_file *m, void *v)
/* Skip this hierarchy if it has no active subsystems */ /* Skip this hierarchy if it has no active subsystems */
if (!root->actual_subsys_bits) if (!root->actual_subsys_bits)
continue; continue;
seq_printf(m, "%lu:", root->subsys_bits);
for_each_subsys(root, ss) for_each_subsys(root, ss)
seq_printf(m, "%s%s", count++ ? "," : "", ss->name); seq_printf(m, "%s%s", count++ ? "," : "", ss->name);
seq_putc(m, ':'); seq_putc(m, ':');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册