Skip to content

RFC Extend the mincore() report bits

Pavel Emelyanov linux-mm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3mincore: Introduce named constant for existing bitinclude/linux/mman.h mm/huge_memory.c mm/mincore.c+8 -60 replies
2/3mincore: Introduce the MINCORE_ANON bitinclude/linux/mman.h mm/mincore.c+14 -25 replies
3/3mincore: Introduce the MINCORE_SWAP bitinclude/linux/mman.h mm/mincore.c+2 -11 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC][PATCH 0/3] Extend the mincore() report bits

Hi.

We're currently working on the "Checkpoint-Restart in the Userspace" project. The aim of the project is to dump a full (as full as possible) state of a running process set (e.g. an application or a container) and recreate them at exactly the same state later [1]

One of the parts of this state-dumping is dumping the memory of the processes. Since apps usually mmap() more memory, than they actually use, dumping the whole mapping contents is too expensive. To reduce this data we currently use the mincore() syscall to check which pages are currently in memory and should be dumped, and which are not and can be skipped. This simple trick reduces the dump size greatly, buy has three problems.

1. File pages, that were not mapped by a task, but that were brought to page cache somehow (readahead or shared lib usage by other task) are reported as present and we dump them, while we can skip them, since reading the page from file again at restore time gives the correct page;
2. File pages, that are mapped by private mapping but that are not yet cow-ed are also reported as present, but we can skip them as well -- they can be re-read from disk;
2. Pages, that are swapped out are not reported by existing mincore(), and we skip them, and this is a bug :(

That said, I propose to add 2 more bits to the mincore per-page report to address these problems. Plz, find details in the respective patches.

[1]
The project homepage is at http://criu.org
The project sources can be found here:

tools:  https://github.com/cyrillos/crtools
kernel: https://github.com/cyrillos/linux-2.6

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>