[CRIU] [PATCH] pcs7: shmem -- Inspect pages before the dump

Andrei Vagin avagin at virtuozzo.com
Wed Oct 26 20:02:19 PDT 2016


On Mon, Oct 17, 2016 at 01:30:31PM +0300, Pavel Emelyanov wrote:
> On 10/08/2016 02:42 AM, Andrei Vagin wrote:
> > From: Cyrill Gorcunov <gorcunov at virtuozzo.com>
> > 
> > When pages are swapped out we can't detect their presence
> > with mincore. Instead lest do a trick: walk over pagerange
> > and touch pages so we can use @pagemap then and inspect
> > the pages status.
> 
> I have some better (I think) idea :) What if we open the shmem file
> and lseek it with SEEK_DATA? Even swapped out pages are reported as
> data as far as I can read from kernel's shmem_seek_hole_data.

It is a cool idea, but i think it will be slower than what we have here.

We will need to call lseek for each page. A system call is more
expensive than a map of zero page.

It will work better only for cases when we have big holes.

> 
> -- Pavel
> 


More information about the CRIU mailing list