[CRIU] [PATCH v4 0/7] anonymous shmem changes tracking and manual deduplication

Eugene Batalov eabatalov89 at gmail.com
Thu Aug 11 07:53:50 PDT 2016


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.

=== v2 to v3 changes ===
- Add extensive ps tree with shmem test
- Rebase to current criu-dev branch.
Change patch set behavior: use new PP_HOLE_ZERO, PP_HOLE_PARENT flags.
Add zero page holes into dump as it is currently done in anon private mem.
Previously zero page holes were not put into dump.

=== V3 to V4 changes ===
- Use proper meaning of memory dedup in all the commit descriptions
  and titles
- Call page_is_zero() from update_shmem_pmaps() and remember its results.
  In V3 I've called page_is_zero() from dump_one_shmem() - this is error
  because I've passed invalid pfn into page_is_zero(). Valid pfn
  is avaliable only in update_shmem_pmaps() and should be computed
  from page PME.
- Store states of all ashmem vma pages in a single bitmap.
  In v3 I've used 2 bitmaps. Now they are merged into
  one because for V4 I needed 3rd bitmap to store 'page is zero' flag
  which is too much. Also current single bitmap solution is extensible.

Eugene Batalov (3):
  mem: export should_dump_page() from mem.c
  shmem: add anon shmem dumping to predump command
  test: add test for anon shmem dedup

Fyodor Bocharov (4):
  shmem: pass anonymous shmem pagemap to add_shmem_area
  shmem: implement PME derived pages state tracking
  shmem: dump anon shared memory pages according to their PME derived
    states
  shmem: implement manual anon shared memory dedup

 criu/cr-dedup.c                   |  23 +-
 criu/cr-dump.c                    |   6 +-
 criu/include/mem.h                |   2 +
 criu/include/shmem.h              |   3 +-
 criu/mem.c                        |  35 ++-
 criu/shmem.c                      | 122 ++++++++--
 test/jenkins/criu-dedup.sh        |   5 +-
 test/zdtm/transition/Makefile     |   1 +
 test/zdtm/transition/maps008.c    | 484 ++++++++++++++++++++++++++++++++++++++
 test/zdtm/transition/maps008.desc |   1 +
 10 files changed, 632 insertions(+), 50 deletions(-)
 create mode 100644 test/zdtm/transition/maps008.c
 create mode 100644 test/zdtm/transition/maps008.desc

-- 
1.9.1



More information about the CRIU mailing list