[CRIU] [RFC PATCH 01/12] zdtm.py: postpone waiting for lazy-pages daemon
Mike Rapoport
rppt at linux.vnet.ibm.com
Mon Jan 9 00:23:15 PST 2017
Currently we are waiting for lazy-pages daemon to finish as a part of
.restore method, which may cause filling test process memory before the
test process resumed it's execution after call to test_waitsig(). In such
case, no page faults occur, but rather all the memory is copied in
handle_remaining_pages method in uffd.c.
Let's move wait(<lazy-pages-pid>,..) after call to test.stop().
Signed-off-by: Mike Rapoport <rppt at linux.vnet.ibm.com>
---
test/zdtm.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/test/zdtm.py b/test/zdtm.py
index b899e38..89563bf 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -782,6 +782,10 @@ class criu:
self.__leave_stopped = (opts['stop'] and True or False)
self.__criu = (opts['rpc'] and criu_rpc or criu_cli)
+ def fini(self, opts):
+ if self.__lazy_pages:
+ wait_pid_die(int(rpidfile(self.__ddir() + "/lp.pid")), "lazy-pages")
+
def logs(self):
return self.__dump_path
@@ -952,9 +956,6 @@ class criu:
pstree_check_stopped(self.__test.getpid())
pstree_signal(self.__test.getpid(), signal.SIGCONT)
- if self.__lazy_pages:
- wait_pid_die(int(rpidfile(self.__ddir() + "/lp.pid")), "lazy pages daemon")
-
@staticmethod
def check(feature):
return criu_cli.run("check", ["-v0", "--feature", feature]) == 0
@@ -1300,6 +1301,7 @@ def do_run_test(tname, tdesc, flavs, opts):
if opts['join_ns']:
check_joinns_state(t)
t.stop()
+ cr_api.fini(opts)
try_run_hook(t, ["--clean"])
except test_fail_exc as e:
print_sep("Test %s FAIL at %s" % (tname, e.step), '#')
--
1.9.1
More information about the CRIU
mailing list