[CRIU] [PATCH cr] [RFC] shmem: rework of dumping shared memory

Andrey Vagin avagin at openvz.org
Sat Mar 17 15:57:11 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, 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
restorer.

The content are restored from crtools before the final executing processes.
I don't want to restore it in restore, because in this case we need to wait
when all tasks maps this mapping.

I don't know how to split this patch...

Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 cr-dump.c          |  135 ++++++++++++++++--
 cr-restore.c       |  406 ++++++++++++++++++++++++++--------------------------
 cr-show.c          |   24 ---
 crtools.c          |   17 +--
 include/crtools.h  |   10 +-
 include/image.h    |    9 +-
 include/parasite.h |    4 -
 include/restorer.h |   18 ++-
 include/util.h     |    2 +-
 parasite-syscall.c |   17 +--
 parasite.c         |   17 +--
 proc_parse.c       |    4 +-
 restorer.c         |    8 +-
 util.c             |    5 +-
 14 files changed, 375 insertions(+), 301 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-shmem-rework-of-dumping-shared-memory.patch
Type: text/x-patch
Size: 27404 bytes
Desc: not available
Url : http://openvz.org/pipermail/criu/attachments/20120317/8ff5faa1/0001-shmem-rework-of-dumping-shared-memory.bin


More information about the CRIU mailing list