OpenVZ Forum


Home » Mailing lists » Devel » [RFC][PATCH] CGroups: Include hierarchy ids in /proc/<pid>/cgroup
[RFC][PATCH] CGroups: Include hierarchy ids in /proc/<pid>/cgroup [message #29222] Wed, 09 April 2008 00:05
Paul Menage is currently offline  Paul Menage
Messages: 642
Registered: September 2006
Senior Member
[ The RFC associated with this patch is whether there's a better way to export such information in a way that's simultaneously extensible, human-readable and machine-parsable ]

CGroups: Include hierarchy ids in /proc/<pid>/cgroup

This patch extends 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>

---
 kernel/cgroup.c |    1 +
 1 file changed, 1 insertion(+)

Index: cgroup-2.6.25-rc8-mm1/kernel/cgroup.c
===================================================================
--- cgroup-2.6.25-rc8-mm1.orig/kernel/cgroup.c
+++ cgroup-2.6.25-rc8-mm1/kernel/cgroup.c
@@ -2613,6 +2613,7 @@ static int proc_cgroup_show(struct seq_f
 		/* Skip this hierarchy if it has no active subsystems */
 		if (!root->actual_subsys_bits)
 			continue;
+		seq_printf(m, "%lu:", root->subsys_bits);
 		for_each_subsys(root, ss)
 			seq_printf(m, "%s%s", count++ ? "," : "", ss->name);
 		seq_putc(m, ':');
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Previous Topic: [PATCH] Add try_to_remove_exclusive_swap_page stub for CONFIG_SWAP=N
Next Topic: Re: Loadable cgroup subsystems
Goto Forum:
  


Current Time: Sat Jul 13 15:23:41 GMT 2024

Total time taken to generate the page: 0.02217 seconds