• Tycho Andersen's avatar
    Attempt to restore cgroups · 51876eea
    Tycho Andersen authored
    During the dump phase, /proc/cgroups is parsed to find co-mounted cgroups.
    Then, for each task /proc/self/cgroup is parsed for the cgroups that it is a
    member of, and that cgroup is traversed to find any child cgroups which may
    also need restoring. Any cgroups not currently mounted will be temporarily
    mounted and traversed. All of this information is persisted along with the
    original cg_sets, which indicate which cgroups a task is a member of.
    
    On restore, an initial phase creates all the cgroups which were saved. Tasks
    are then restored into these cgroups via cg_sets as usual.
    Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    51876eea
cgroup.c 18.5 KB