[CRIU] Where mapping contents are dumped & how are they restored?

Pavel Emelyanov xemul at parallels.com
Mon Feb 2 04:00:09 PST 2015


On 01/31/2015 12:29 PM, beproject criu wrote:
> Hi,
> 
> I have created my own device & want to add support for it in CRIU.
> So, please could you help me with it.
> 
> Consider two processes sharing a memory mapping. Then :-
> Where such memory mappings are actually dumped in the CRIU source code?

All the memory mappings get dumped in two stages.
First they are collected in collect_mappings() call per-task, then
the information is analyzed and mappings are dumped in dump_task_mm()
per-task too, shared memory segments are dumped in cr_dump_shmem().

> Is this supported in CRIU?
> If yes, then how is it restored?

Restoring of mappings is multi-stage. First they are read inside
prepare_mm_pid(), then tasks are forked and some mappings are restored
while doing it in prepare_mappings(), then some actions are done in
open_vmas(), then all tasks dive into __export_restore_task() and
mappings restore continue there.

We have a set of articles about memory C/R in http://criu.org/Category:Memory
Not everything is described there yet, though.

> And if not, what is missing for it?
> 
> Thanks.
> 
> 
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
> 



More information about the CRIU mailing list