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>

authored by Paul Menage and committed by Linus Torvalds b6c3006d d10d89ec

+1
+1
kernel/cgroup.c
··· 2569 2569 /* Skip this hierarchy if it has no active subsystems */ 2570 2570 if (!root->actual_subsys_bits) 2571 2571 continue; 2572 + seq_printf(m, "%lu:", root->subsys_bits); 2572 2573 for_each_subsys(root, ss) 2573 2574 seq_printf(m, "%s%s", count++ ? "," : "", ss->name); 2574 2575 seq_putc(m, ':');