<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 24, 2014 at 9:26 AM, Pavel Emelyanov <span dir="ltr">&lt;<a href="mailto:xemul@parallels.com" target="_blank">xemul@parallels.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 06/24/2014 06:12 PM, Serge Hallyn wrote:<br>
<br>
</div><div class="">&gt;&gt; Yes. Emply cgroups cannot be discovered through /proc/pid/cgroup file,<br>
&gt;&gt; we should walk the alive cgroup mount. But the problem is -- we cannot<br>
&gt;&gt; just take the system /sys/fs/cgroup/ directories, since there will be<br>
&gt;&gt; cgroups from other containers as well. We should find the root subdir<br>
&gt;&gt; of the container we dump and walk _this_ subtree.<br>
&gt;<br>
&gt; I volunteer to work on a proper cgroup c/r implementation, once Tycho<br>
&gt; gets the very basics done.<br>
<br>
</div>Serge, Tycho, I think I need to clarify one more thing.<br>
<br>
I believe, that once we do full cgroups hierarchy restore all the<br>
mkdirs would go away from the move_in_cgroup() routine. Instead,<br>
we will have some code, that would construct all the cgroup subtree<br>
before criu will start forking tasks. And once we have it, the<br>
move_in_cgroup() would (should) never fail. Thus this patch would<br>
be effectively reversed.<br>
<br>
Thanks,<br>
Pavel</blockquote><div><br></div><div>I agree.  Creation of the cgroup and its subtree should be done in one place as opposed to being split apart (i.e., between prepare_cgroup_sfd() and move_in_cgroup() as is done currently).</div>
<div><br></div><div>Regarding the 4 items to do for cgroups in your earlier email, I believe that we should have CLI options to tell CRIU what cgroups it needs to restore (almost like the way we tell it about external bind mounts).  This way we can handle the empty cgroups as well as dumping and restoring on the same machine versus on a different machine (i.e., migration).  For migration, CRIU definitely needs to be told how to handle cgroups name collision.  This is not something that it can handle at dump time.<br>
</div><div><br></div><div>--Saied</div><div><br></div></div></div></div>