1. 11 Jul, 2014 1 commit
  2. 10 Jul, 2014 1 commit
    • 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
  3. 08 Jul, 2014 5 commits
  4. 04 Jul, 2014 15 commits
  5. 03 Jul, 2014 5 commits
  6. 02 Jul, 2014 10 commits
  7. 01 Jul, 2014 3 commits
    • Pavel Emelyanov's avatar
      rst: Include criu/include/ptrace.h instead of system one · b429492d
      Pavel Emelyanov authored
      On ARM some PTRACE_... constants are not declared in sys/ptrace.h file.
      They are in linux/ptrace.h, but on x86 this file somewhat conflicts with
      the sys/ one. For now fix ARM compilation by using criu/ one and think
      of it later.
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      b429492d
    • Pavel Emelyanov's avatar
      bd93f9b4
    • Pavel Emelyanov's avatar
      criu: Restore tasks as siblings in swrk · 84eb0a19
      Pavel Emelyanov authored
      Andrey validly pointed out, that restoring pdeath_sig is not
      compatible with criu_restore_child() call -- after criu restore
      children, it will exit and fire the pdeath_sig into restored
      tree root, potentially killing it.
      
      The fix for that could be -- when started in swrk more, criu can
      restore tree not as children tasks, but as siblings, using the
      CLONE_PARENT flag when fork()-ing the root task.
      
      With this we should also take care about errors handing -- right
      now criu catches the SIGCHILD from dying children tasks, and
      since we plan to create them be children of the criu parent (the
      library caller) we will not be able to catch them. To do so we
      SEIZE the root task in advance thus causing all SIGCHLD-s go to
      criu, not to its parent.
      
      Having this done we no longer need the SUBREAPER trick in the
      library call -- tasks get restored right as callers kids :)
      
      Some thoughts for future -- using this trick we can finally make
      "natural" restoration of shell jobs. I.e. -- make criu restore
      some subtree right under bash, w/o leaving itself as intermediate
      task and w/o re-parenting the subtree to init after restore.
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      Acked-by: 's avatarAndrey Vagin <avagin@parallels.com>
      84eb0a19