[CRIU] [PATCH 2/2] zdtm.sh: add ability to use a freezer cgroup
Andrey Vagin
avagin at openvz.org
Wed Jul 22 09:07:31 PDT 2015
It allows to freeze processes faster
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
test/zdtm.sh | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/test/zdtm.sh b/test/zdtm.sh
index 6f63622..b6e78b5 100755
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -371,6 +371,7 @@ BATCH_TEST=0
SPECIFIED_NAME_USED=0
START_FROM="."
RESTORE_SIBLING=""
+FREEZE_CGROUP=""
zdtm_sep()
{ (
@@ -563,6 +564,9 @@ start_test()
fi
(
+ if [ -n "$FREEZE_CGROUP" ]; then
+ echo 0 > /sys/fs/cgroup/freezer/test/tasks
+ fi
# Here is no way to set FD_CLOEXEC on 3
exec 3>&-
make -C $tdir $tname.pid
@@ -757,6 +761,9 @@ EOF
fi
[ -n "$snappdir" ] && cpt_args="$cpt_args --prev-images-dir=$snappdir"
fi
+ if [ -n "$FREEZE_CGROUP" ]; then
+ cpt_args="$cpt_args --freeze-cgroup $FREEZE_CGROUP"
+ fi
[ -n "$dump_only" ] && cpt_args="$cpt_args $POSTDUMP"
@@ -1058,6 +1065,11 @@ while :; do
AUTO_DEDUP=1
shift
;;
+ --freeze-cgroup)
+ shift
+ FREEZE_CGROUP=$1
+ shift
+ ;;
-g)
COMPILE_ONLY=1
shift
--
2.1.0
More information about the CRIU
mailing list