[CRIU] Develop a tracking memory updates model for a running process

Mike Rapoport rppt at linux.ibm.com
Wed Mar 27 18:39:30 MSK 2019


Hi,

On Wed, Mar 27, 2019 at 10:06:26AM +0000, Pavel Emelianov wrote:
> On 3/23/19 11:59 AM, lupin10 at inwind.it wrote:
> > Hi All,
> > 
> > sorry if it is not the right room where I may question, but I would
> > like to ask if by starting from criu source code would be possible to
> > develop a dirty memory model for each virtual address belonging to a
> > running process. In more detail, I know about some virtual files just
> > like smaps in the linux kernel, but in my mind, for a given running
> > process, I would like to have the full page table and tracking for each
> > memory address their updates in real time.
> 
> We do have the changes tracker in criu
> (https://criu.org/Memory_changes_tracking) that uses the soft-dirty
> feature from the Linux kernel
> (https://www.kernel.org/doc/Documentation/vm/soft-dirty.txt)
> 
> However, this approach has many problems, one of the major is -- if there
> are two changes trackers, they will silently spoil each-other's data. We
> have plans to re-invent this by using the userfaultfd thing
> (https://criu.org/Userfaultfd). Likely Mike (in Cc) will provide more
> details on the latter :)

Tracking memory changes with userfaultfd can be possible only after
userfaultfd-WP work [1] will be merged upstream. Even then, it will be
limited to anonymous memory.

So for now replacing soft-dirty with uffd-wp in CRIU is pretty much at the
level of vague ideas.
 
> -- Pavel
> 
> > Could you please address on which documents and any done work to start with?

[1] https://lore.kernel.org/lkml/20190320020642.4000-1-peterx@redhat.com

-- 
Sincerely yours,
Mike.



More information about the CRIU mailing list