Changes

Jump to: navigation, search

CGroups

1,567 bytes added, 14:50, 19 August 2014
no edit summary
# Mountpoints of "cgroup" file system
CRIU started supporting this info since version 1.3-rc1. Here's how CRIU manages themit works.
== CGroups tasks live in ==
Starting from version 1CRIU defines a "set" of cgroups.3A set is a per-rc1 CRIU saves the information about CGroups each controller list of paths where a task lives in in the <code>core</code> image's <code>tc.cg_set</code> field. This is an ID of a "set" found If paths to groups for two tasks differ at least for one controller, they are considered to live in the <code>cgroup.img</code>'s <code>different sets</code> section.
Set contains per-controller paths to groupsFor every set CRIU generates an ID, which is then stored in the task's <code>core.tc.cg_set</code> image. The set in which CRIU lives during dump is also generated and is saved in the inventory image. If a The set in which the root task changes at least one controllerlives in is also special -- every other set (except CRIU's path it one) is considered checked to live in different contain only sub-dirs of the respective root task's set. Otherwise dump fails.
While dumping On restore each task is moved into the respective set. If task's set coincide with CRIU's one task isn't moved anywhere and remains in whatever cgroups CRIU restore was started. == CGroups that are visible by tasks == Other than CGroups collected with tasks there can be other groups in which no tasks live. To pick up those CRIU gets the root set and saves all the CGroups tree starting from it. This information is stored in the <code>cgroup.controllers</code> image. In the same place CRIU saves the properties of CGroups -- these are values read from CGroup configuration files. Note -- since CRIU starts from root set and scans the directories tree, all the paths in which this section are also subdirs of the root task livesset's. In order to make CRIU handle this information on dump and restore one should specify the <code>--manage-cgroups</code> option. Any new set  == Mountpoints of "cgroup" file system == If found later should contain in the list of mounts, CRIU would dump one, but only the "root" mount will work. If you bind-mounted some subgroups into container, CRIU dump would fail. == Restoring into different CGroups == The option syntax is <code>--cgroup-root [<controller>:]/<path></code> and it only subdirs of makes sense on restore. Without this option CRIU would restore tasks and groups that live in the subtrees starting from the roottask's setdirs. When this option is given, the respective controllers' will get restoring starting from the give path instead.

Navigation menu