[CRIU] [RFC PATCH] Try to include userfaultfd with criu

Pavel Emelyanov xemul at parallels.com
Mon Oct 26 09:13:06 PDT 2015


On 10/26/2015 03:41 PM, Adrian Reber wrote:
> Pavel, thanks for the comments on the userfaultfd integration. I am
> trying to integrate all your suggestions. I have question about
> restoring pages... Or rather about not restoring pages.
> 
> My current approach is, if the parameter --lazy-pages is specified, to
> skip pages with MAP_ANONYMOUS. I thought about skipping the pages in
> restore_priv_vma_content(). 

Correct.

> If I skip pages I need to seek with a
> different value then '0' in read_pagemap_page() to read from the right
> position from the pages-x.img file.

Yes, there's skip_pagemap_pages() call for that :)

> Before overlooking something obvious
> I thought I will ask here to see what the right solution would be to
> seek over the skipped userfaultfd pages. Would an additional parameter
> be the right approach to handle the seek in read_pagemap_page() or is
> there another way of skipping userfaultfd pages?

You mean how to search for pages after restore by the lazy daemon? Right
now I have a student working on a library for random pagemap access :)
But before this stuff gets revealed to the public, I would save the pagemap
position on a helper structure and in lazy daemon just lseek into this
place.

-- Pavel



More information about the CRIU mailing list