shmem: implement PME derived pages state tracking
shmem: implement PME derived pages state tracking

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: Fyodor Bocharov <a27cde000565307013cc2099fc7a062271855638@yandex.ru>
Signed-off-by: Eugene Batalov <7a4372f440491fdba11e6e9c63b691b267a65e67@gmail.com>
Signed-off-by: Pavel Emelyanov <c9a32589e048e044184536f7ac71ef92fe82df3e@virtuozzo.com>

eabatalov/criu,eabatalov/criu,eabatalov/criu,eabatalov/criu,eabatalov/criu,eabatalov/criu