Skip to content
Commit 52242be3 authored by Pavel Emelyanov's avatar Pavel Emelyanov
Browse files

dump: Stop using mincore and switch to /proc/pid/pagemap



We use mincore to check which pages we should take with us into
the image. The anonymour present or swapped should go, file present
but not cow-ed should not.

The mincore syscall wasn't very helpful with this -- it didn't detect
swap, but did detect some non present pages (pagecache). Plus it
didn't know anything about cow-ing filemaps.

Andrey Morton suggested to use the pagemap file in proc, but it lacked
the importaint stuff -- the cow filemap bit. Now it's there and we
can switch to using it.

The mincore usage for shared memory is still there, as for _that_ case
it's correct.

Signed-off-by: default avatarPavel Emelyanov <xemul@parallels.com>
parent cee5e817
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment