[CRIU] [PATCH 1/4] mem: Introduce image-proxy/image-cache & remote option

Mike Rapoport rppt at linux.vnet.ibm.com
Tue Aug 9 06:34:00 PDT 2016


On Tue, Aug 09, 2016 at 11:24:57AM +0000, Katerina Koukiou wrote:
> On Thu, Aug 4, 2016 at 12:52 PM, Mike Rapoport <rppt at linux.vnet.ibm.com> wrote:
> >
> > img_raw_size uses underlying file descriptor to get the image size.
> > Obviously, with socket it won't quite work :)
> > The pagemap image size is used to estimate amount of memory required to
> > hold the entire pagemap in memory and avoid over/under allocations as much
> > as possible.
> > So, we either need to make the pagemap size available at the restore side
> > early enough, or to choose some magic number and hope for best :)
> >
> If we choose a "magic number" could you please suggest one that would work
> for most of the cases?

I really don't know, but 1024 seems to me nice round number :)

> Otherwise an implementation hint on how to get the exact pagemap size at
> that point?

Well, the dump side can estimate the size of pagemap's just before it's going
to actually write them, say at entry to page_xfer_dump_pages. But currently
there is no mechanism to communicate this information to the restore side
(or cache/proxy for that matter).
A possible way could be prepending a dummy pagemap that contains the number
of 'real' pagemap entries...

> Thanks

--
Sincerely yours,
Mike.



More information about the CRIU mailing list