mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
5d5e8b801cf513e45371b3dd930ad72ffe3b5f08
Restorer does really restore shared memory (including page contents restore) only on master process, while all other processes do open such memory area via map_files/ procfs entry so that we might have a situation when shared VMA is present in some particular core-%d.img file but it's not listed in collected shmems array and find_shmem_by_pid will return NULL. This is perfectly fine, be ready for that. Another issue is that shared memory might look like CR_FD_SHMEM: /home/cyrill/projects/kernel/crtools/shmem-2641.img ---------------------------------------- 0x7f2200775000-0x7f2200776000 id 19664 0x7f2200776000-0x7f2200777000 id 19663 ---------------------------------------- So vma area is [x;y) range and we should distinguish two shmem lookup cases - one when we search for page in shmem area - second when we lookup shmem area in collected ranges They both have a different lookup conditions so single find_shmem splitted into two helpers find_shmem and find_shmem_page as appropriate. This patch finally fixes the three process asynchronious shared memory updates test-case. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
crtools ======= An utility to checkpoint/restore tasks. Some code snippets are borrowed from - Linux kernel (http://kernel.org/) - git (http://git-scm.com/) - kvm-tools (https://github.com/penberg/linux-kvm) - ptrace-parasite (https://code.google.com/p/ptrace-parasite/) Many thanks to these projects. Licensed under GPLv2 (http://www.gnu.org/licenses/gpl-2.0.txt) Kernel patching =============== To have crtools up and running clone git://github.com/cyrillos/linux-2.6.git and switch to branch "crtools". It's based on Linux commit 384703b8e6cd4c8ef08512e596024e028c91c339 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri Dec 16 18:36:26 2011 -0800 Linux 3.2-rc6
Description
Languages
C
86%
Python
6.1%
Java
2.6%
Shell
2.6%
Makefile
2%
Other
0.7%