[CRIU] [PATCH] criu: add make lazy support to crit
Adrian Reber
adrian at lisas.de
Wed May 11 00:19:28 PDT 2016
On Fri, May 06, 2016 at 02:57:13PM +0300, Pavel Emelyanov wrote:
> Sorry for such a long delay in review. Here are my comments, inline.
>
> On 04/29/2016 11:39 AM, Adrian Reber wrote:
> > From: Adrian Reber <areber at redhat.com>
> >
> > This enables crit to remove all memory pages from a checkpoint
> > directory which can be lazily restored using userfaultfd. This
> > changes the pagemap.img and pages.img to no longer contain pages
> > which can be handled by userfaultfd (MAP_PRIVATE && MAP_ANON).
> >
> > Usage:
> >
> > $ crit/crit make-lazy /tmp/4/ /tmp/5
>
> We already have the pagemaps manipulation code called 'dedup'. And it
> sits in criu binary :) I don't insist in implementing make-lazy in criu
> too, crit looks better place, but any ideas how to make dedup and
> make-lazy be better aligned with each other?
Ah, I always thought dedup was only used during restore to remove
already restored pages from the checkpoint. I was not aware that it can
also run standalone to clean up checkpoints.
If I understand the code correctly the dedup option removes pages from
parent checkpoints (pre-dump) which are also present in the child
checkpoints, right?
This sounds indeed just like what I tried to do with crit with
make-lazy. Checkpoint manipulation sounds much easier in python but if
the code already exists for dedup I am also undecided. I think python
makes more sense as I also want to provide the possibility to undo the
'make-lazy' operation: Create a 'normal' checkpoint from the two parts
which result from 'make-lazy'. I will try to address your code comments
and send a second version of the patch.
Adrian
More information about the CRIU
mailing list