[CRIU] [PATCHv2 0/9] Implement anonymous shared memory deduplication
Eugene Batalov
eabatalov89 at gmail.com
Tue Dec 22 07:22:45 PST 2015
This patchset implements 3 types of shared memory deduplication:
1. Manual anonymous shared memory image deduplication on criu dedup command.
2. Anonymous shared memory pages autodedup on criu dump command.
Kernel provided SOFT_DIRTY bits + parent anon shmem image are used.
As with private anon mem this is enabled using --auto-dedup option.
3. Anonymous shared memory pages autodedup on criu restore command.
Each restored page is removed from anon shmem dump.
As with private anon mem this is enabled using --auto-dedup option.
This patchset heavily reuses existing page-read/xfer code
to implement the most of its new features.
=== v0 to v1 changes ===
- Collect separate longest vma sizes for private and shared
anonymous memory.
- Reset process memory soft dirty bits 'symmetrically' in
pre_dump_one_task() and dump_one_task().
- Remove 2nd PMC walk. Reuse process VMA loop in
__parasite_dump_pages_seized().
- Use single page_in_parent() routine (don't use ots copy-paste).
=== v1 to v2 changes ===
- Don't dump not used anon shmem pages.
Collect and analyze PME_SWAP and PME_PRESENT pagemap bits for this purpose.
Fyodor Bocharov (9):
vma: rename longest to priv_longest
proc_parse: collect longest shared vma size
mem: reset SOFT_DIRTY bits after dumping of all vmas in the process
shmem: pass anonymous shmem pagemap to add_shmem_area
shmem: implement used and dirty pages tracking
page-read/xfer: add ability to open image hierarchy for shmem
mem: generalize page_in_parent function and make it extern
shmem: implement anon shared memory dedup on dump
shmem: implement manual anon shared memory dedup
cr-dedup.c | 23 ++-
cr-dump.c | 12 +-
include/mem.h | 2 +
include/page-read.h | 4 +-
include/shmem.h | 3 +-
include/vma.h | 6 +-
mem.c | 40 ++--
page-read.c | 12 +-
page-xfer.c | 5 +-
proc_parse.c | 10 +-
shmem.c | 117 ++++++++----
shmem.c.orig | 513 ++++++++++++++++++++++++++++++++++++++++++++++++++++
12 files changed, 665 insertions(+), 82 deletions(-)
create mode 100644 shmem.c.orig
--
1.9.1
More information about the CRIU
mailing list