• Fyodor Bocharov's avatar
    shmem: implement PME derived pages state tracking · 0ddfaa9b
    Fyodor Bocharov authored
    Anon shmem pages state tracking allows us not to dump unused
    anon shmem pages at all.
    
    To track anon anon shmem pages state we create a bitmap.
    Each 2 bits in this bitmap correspond to particular page.
    Each 2 bits store one page state:
    PST_DONT_DUMP, PST_DUMP, PST_ZERO, PST_DIRTY.
    This number of states is enough to decide what to do with the page
    on dump.
    
    With anon shmem there is a peculiarity. To decide what state page has
    we need to examine its PME bits in all the processes that share it.
    So page state derived from PME bits in one process may be overriden
    by page state derived from PME bits from another process.
    See implementation of this overrides in the patch.
    Signed-off-by: 's avatarFyodor Bocharov <fbocharov@yandex.ru>
    Signed-off-by: 's avatarEugene Batalov <eabatalov89@gmail.com>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
    0ddfaa9b
Name
Last commit
Last update
Documentation Loading commit data...
contrib Loading commit data...
coredump Loading commit data...
crit Loading commit data...
criu Loading commit data...
images Loading commit data...
lib Loading commit data...
scripts 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.install Loading commit data...
Makefile.versions Loading commit data...
README.md Loading commit data...