• Pavel Emelyanov's avatar
    mem: Delayed vma/pr restore (v2) · 91388fce
    Pavel Emelyanov authored
    Performance experiments show, that we spend (relatively) a lot of time
    mremap-ing areas from premap area into their proper places. This time
    depends on the task being restored, but for those with many vmas this
    can be up to 20%.
    
    The thing is that premapping is only needed to restore cow pages since
    we don't have any API in the kernel to share a page between two or more
    anonymous vmas. For non-cowing areas we map mmap() them directly in
    place. But for such cases we'll also need to restore the page's contents
    also from the pie code.
    
    Doing the whole page-read code from PIE is way too complex (for now), so
    the proposal is to optimize the case when we have a single local pagemap
    layer. This is what pr.pieok boolean stands for.
    
    v2:
    * Fixed ARM compiling (vma addresses formatting)
    * Unused tail of premapped area was left in task after restore
    * Preadv-ing pages in restorer context worked on corrupted iovs
      due to mistakes in pointer arithmetics
    * AIO mapping skipped at premap wasn't mapped in pie
    * Growsdown VMAs should sometimes (when they are "guarded" by
      previous VMA and guard page's contents cannot be restored in
      place) be premmaped
    * Always premmap for lazy-pages restore
    Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
    Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
    91388fce
Name
Last commit
Last update
Documentation Loading commit data...
compel Loading commit data...
contrib Loading commit data...
coredump Loading commit data...
crit Loading commit data...
criu Loading commit data...
images Loading commit data...
include/common Loading commit data...
lib Loading commit data...
scripts Loading commit data...
soccr Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
INSTALL.md Loading commit data...
Makefile Loading commit data...
Makefile.compel Loading commit data...
Makefile.config Loading commit data...
Makefile.install Loading commit data...
Makefile.versions Loading commit data...
README.md Loading commit data...