[CRIU] [PATCH 3/5] cgroup props: update controllers list and props list

Tycho Andersen tycho.andersen at canonical.com
Mon Jun 6 08:20:15 PDT 2016


In particular add support for the new controllers:

* perf_event (nothing here, but may be used by the perf tool so we should
  keep it)
* net_cls
* net_prio
* pids

Also add support for many more memory properties that were not implemented
in the first pass, but the container may use.

Note that this commit omits the "devices" controller, because that needs to
be checkpointed and restored in a special way.

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
CC: Cyrill Gorcunov <gorcunov at openvz.org>
---
 criu/cgroup-props.c | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/criu/cgroup-props.c b/criu/cgroup-props.c
index 26d0ec1..ec55e13 100644
--- a/criu/cgroup-props.c
+++ b/criu/cgroup-props.c
@@ -418,7 +418,13 @@ static int cgp_parse_builtins(void)
 			"[ "
 				"\"memory.limit_in_bytes\", "
 				"\"memory.memsw.limit_in_bytes\", "
-				"\"memory.use_hierarchy\" "
+				"\"memory.swappiness\", "
+				"\"memory.soft_limit_in_bytes\", "
+				"\"memory.move_charge_at_immigrate\", "
+				"\"memory.oom_control\", "
+				"\"memory.use_hierarchy\", "
+				"\"memory.kmem.limit_in_bytes\", "
+				"\"memory.kmem.tcp.limit_in_bytes\" "
 			"]\n"
 		/*
 		 * cpuset.cpus and cpuset.mems must be set before the process moves
@@ -451,6 +457,29 @@ static int cgp_parse_builtins(void)
 			" - \"strategy\": \"replace\"\n"
 			" - \"properties\": "
 			"[ "
+			"]\n"
+		"\"perf_event\":\n"
+			" - \"strategy\": \"replace\"\n"
+			" - \"properties\": "
+			"[ "
+			"]\n"
+		"\"net_cls\":\n"
+			" - \"strategy\": \"replace\"\n"
+			" - \"properties\": "
+			"[ "
+				"\"net_cls.classid\" "
+			"]\n"
+		"\"net_prio\":\n"
+			" - \"strategy\": \"replace\"\n"
+			" - \"properties\": "
+			"[ "
+				"\"net_prio.ifpriomap\" "
+			"]\n"
+		"\"pids\":\n"
+			" - \"strategy\": \"replace\"\n"
+			" - \"properties\": "
+			"[ "
+				"\"pids.current\" "
 			"]\n";
 
 	return cgp_parse_stream((void *)predefined_stream,
-- 
2.7.4



More information about the CRIU mailing list