[CRIU] [PATCH cr 5/7] mm: rework of dumping shared memory
Andrey Vagin
avagin at openvz.org
Mon Mar 19 11:50:01 EDT 2012
vma_entry contains shmid and all shared memory are dumped in own files.
The most interesting thing is restore.
A maping is restored by process with the smallest pid. The mamping
is created before executing restorer.
We map a full mapping and restore it's conten, then we open a file from
/proc/pid/map_files and store a descriptor in vma_info. The mapping is
unmaped. Now we can map any region of this mapping in the restorer.
We use this trick, because a target process may have this mapping in
some places and the restorer has not function to open proc files.
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
cr-dump.c | 139 ++++++++++++++++++++--
cr-restore.c | 329 +++++++++++++++++++++++-----------------------------
cr-show.c | 24 ----
crtools.c | 6 -
include/crtools.h | 9 +-
include/image.h | 7 -
include/restorer.h | 18 ++-
parasite-syscall.c | 16 +--
parasite.c | 7 -
restorer.c | 8 +-
util.c | 5 +-
11 files changed, 303 insertions(+), 265 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-mm-rework-of-dumping-shared-memory.patch
Type: text/x-patch
Size: 23491 bytes
Desc: not available
Url : http://openvz.org/pipermail/criu/attachments/20120319/66020694/0005-mm-rework-of-dumping-shared-memory-0001.bin
More information about the CRIU
mailing list