[CRIU] [PATCH 0/6] criu: pagemap: improve accuracy of lazy pages

Mike Rapoport rppt at linux.vnet.ibm.com
Thu Sep 8 00:39:06 PDT 2016


The pagemap entries for pages that can be lazily restored were different
for the case when the dump is written to disk and for the case when lazy
pages were copied on demand. Only the second case produces pagemap entries
marked with 'lazy' flag.

These patches try to make the pagemap entries more consistent and ensure
they convey accurate information about memory ranges they describe.

The 'zero' and 'lazy' flags are dropped in favor of 'flags' field in
pagemap.proto. The 'in_parent' flag also has representation in the 'flags'
field, so eventually it can be made deprecated. The pagemap entry 'flags'
are used internally to detect whether pages are in parent, lazy, or zero.

The first to patches in the serie are not strictly related, but I believe
them to be nice cleanups anyway... 

Mike Rapoport (6):
  criu: pagemap: drop put_pagemap
  criu: pagemap: introduce advance() helper for pagemap iteration
  criu: pagemap: replace 'zero' and 'lazy' booleans with 'flags'
  criu: page-xfer: add ability to write pagemap flags
  criu: pagemap: add PE_PRESENT flag
  criu: mem: skip lazy pages during restore based on pagemap info

 criu/cr-dedup.c          |  15 +++----
 criu/include/page-xfer.h |   2 +-
 criu/include/pagemap.h   |  29 +++++++++++++-
 criu/mem.c               |  25 ++++++------
 criu/page-xfer.c         |  66 ++++++++++++++++++++++---------
 criu/pagemap.c           | 100 +++++++++++++++++++++++------------------------
 criu/shmem.c             |   3 --
 criu/uffd.c              |   6 +--
 images/pagemap.proto     |   3 +-
 9 files changed, 145 insertions(+), 104 deletions(-)

-- 
1.9.1



More information about the CRIU mailing list