[CRIU] [RFC] [PATCH cr 0/11] Restore copy-on-write regions

Andrey Vagin avagin at openvz.org
Mon Oct 15 11:32:13 EDT 2012


This series is based on two facts.
* Copy-on-write regions can be in MAP_PRIVATE mappings
* pages-[PID].img is a content of MAP_PRIVATE mappings

So we can restore all private mappings before forking children and
all copy-on-write regions will be restored automatically.

Here is only one problem, that a mapping can not be restored in a
correct place, because it may be conflict with crtools' mappings.
The mapping get avaliable address and then remmaped in restorer.

 cr-restore.c               |  260 ++++++++++++++++++++++++++++++++++++++++----
 include/image.h            |    2 +
 include/restorer.h         |    5 +-
 include/syscall-x86-64.def |    1 +
 restorer.c                 |   34 +++---
 5 files changed, 261 insertions(+), 41 deletions(-)



More information about the CRIU mailing list