mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
dump: Introduce the pre-dump action
With this action criu will seize tasks, grab all its memory into page-pipes, rest dirty tracker and will then release them. Writing the memory from page-pipes would occur after tasks are unfreezed and thus the frozen time should become reasonably small. When pre-dump is in action, the dirty tracking is forcedly turned off as well as tasks are resumed afterwards, not killed, by default. This is a prerequisite for iterative migration. Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
17
crtools.c
17
crtools.c
@@ -308,6 +308,23 @@ int main(int argc, char *argv[])
|
||||
return cr_dump_tasks(tree_id);
|
||||
}
|
||||
|
||||
if (!strcmp(argv[optind], "pre-dump")) {
|
||||
if (!tree_id)
|
||||
goto opt_pid_missing;
|
||||
|
||||
if (!opts.track_mem) {
|
||||
pr_info("Enforcing memory tracking for pre-dump.\n");
|
||||
opts.track_mem = true;
|
||||
}
|
||||
|
||||
if (opts.final_state == TASK_DEAD) {
|
||||
pr_info("Enforcing tasks run after pre-dump.\n");
|
||||
opts.final_state = TASK_ALIVE;
|
||||
}
|
||||
|
||||
return cr_pre_dump_tasks(tree_id);
|
||||
}
|
||||
|
||||
if (!strcmp(argv[optind], "restore")) {
|
||||
if (tree_id)
|
||||
pr_warn("Using -t with criu restore is obsoleted\n");
|
||||
|
Reference in New Issue
Block a user