[CRIU] Questions in CRIU restore mechanism.

Pavel Emelyanov xemul at parallels.com
Mon Mar 25 06:41:58 EDT 2013


On 03/25/2013 11:47 AM, MyungJoo Ham wrote:
> Samsung Enterprise Portal mySingle
> 
> Hello, CRIU developers and maintainers.
> 
> Thank you for your wonderful project being released to public including ARM.

You're welcome.

> 
> I have a question on the CRIU restore mechanism while trying to use CRIU to 
> accelerate launching of large user processes.
> 
> Q1: Does CRIU support "demand paging"-like restore?
> 
> (Not restoring the whole process image to RAM at once, but restoring pages wanted
>  by the process from disk to RAM like the swap-in mechanism usually does)

The answer is both -- yes and no. There are 4 types of mappings application may use:
shared anon, shared file, private anon and private file.

For shared file mappings we don't restore pages contents at all, since the contents
of the pages is in the respective file and if app after restore will try to read them
it will read the data from disk (just as you want).

For shared anon and private anon mappings we do restore contents of pages from image.
This can't be fixed at the moment, since the kernel currently doesn't provide any APIs
for fixing this.

For private file mappings situation is tricky. Withing these mappings there are two
types of pages -- those, that were read from file and modified, and those that were
just read, but not modified. So the former pages cannot be restored-on-demand for the
same reasons as anon mappings cannot be. Latter pages are not restored, since the data
app want is in the file and it will work like it does for shared file mappings.

> Q2: Would it be possible to set the CRIU process image as a swap file and let Linux
> kernel use it (supporting Q1)?

It's a good idea. Yes, this is possible, but only in theory -- kernel doesn't have
any APIs for telling "make this virtual address be mapped to this swap entry". If
we had one, we could do this.

> Q3: Any example configuration or script for ARM port of CRIU?

I don't get this question. Can you elaborate, please?

>  
> 
>  
> 
> Cheers!
> 
> MyungJoo
>  
> 
> --
> 
> MyungJoo Ham (함명주), PHD
> 
> System S/W Lab, S/W Platform Team, Software Center
> Samsung Electronics
> Cell: +82-10-6714-2858

Thanks,
Pavel


More information about the CRIU mailing list