2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

cg: Dump cgroups tasks live in

Each task points to a single ID of cgroup-set it lives in. This
is done so to save some space in the image, as tasks likely
live in the same set of cgroups.

Other than this we keep track of what cgroup set we dump the
subtree from. If it happens, that root task lives in the same
cgroup set as criu does, we don't allow for any other sub-cgroups
and make restore (next patch) much simpler and faster.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov
2014-05-08 16:42:40 +04:00
parent 8b8eb53a0a
commit 1ba9d2cae9
4 changed files with 235 additions and 0 deletions

View File

@@ -77,6 +77,10 @@ int write_img_inventory(void)
return -1;
}
he.has_root_cg_set = true;
if (dump_task_cgroup(NULL, &he.root_cg_set))
return -1;
he.root_ids = crt.ids;
if (pb_write_one(fd, &he, PB_INVENTORY) < 0)