[CRIU] [PATCH] Dismantle cgyard in non-detached restore mode.

Pavel Emelyanov xemul at parallels.com
Wed Mar 18 13:17:29 PDT 2015


On 03/18/2015 10:01 PM, Tycho Andersen wrote:
> Hi Saied,
> 
> On Wed, Mar 18, 2015 at 11:14:31AM -0700, Saied Kazemi wrote:
>> Tycho,
>>
>> Thanks for looking into this.  I knew that we can't fini_cgroup() here but
>> because I am not familiar with the internals of cgroup restoration I just
>> put it there as a quick hack to get criu successfully dump and restore my
>> test container multiple times (didn't care about properties, etc.).
>>
>> For a permanent fix, I have to defer to your judgement on the best way to
>> dismantle the cgyard in the non-detached mode.  I agree with you that it's
>> a good idea to always fini_cgroup() as soon as we've fully restored
>> cgroups, regardless of detached/non-detached mode.
> 
> Ok, I think the right thing to do is something like this:
> 
> https://github.com/tych0/criu/commit/63e138e7b4b1b183d864fb08923176c9cd9ba545
> 
> I vaguely recall some discussion about why this wasn't possible
> before, but I don't remember exactly what it was. 

I can remember only one reason -- cgroup props should be restored at the very
end not to make restoring processes hit potentially strict limits set for memory,
cpu or anything else.

But other than this restoring them earlier than it's done now seems correct :)

> I'll try to look through my old mail and see what that is about; I'll also 
> test the above patch to make sure it really does what I think it does, and 
> then send to the list.

Thanks,
Pavel



More information about the CRIU mailing list