linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH 0/3] Extend the mincore() report bits
@ 2011-12-25 20:45 Pavel Emelyanov
  2011-12-25 20:45 ` [PATCH 1/3] mincore: Introduce named constant for existing bit Pavel Emelyanov
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Pavel Emelyanov @ 2011-12-25 20:45 UTC (permalink / raw)
  To: Linux MM, Hugh Dickins, Andrea Arcangeli, Johannes Weiner

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 majordomo@kvack.org.  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:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-12-27 22:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-25 20:45 [RFC][PATCH 0/3] Extend the mincore() report bits Pavel Emelyanov
2011-12-25 20:45 ` [PATCH 1/3] mincore: Introduce named constant for existing bit Pavel Emelyanov
2011-12-25 20:46 ` [PATCH 2/3] mincore: Introduce the MINCORE_ANON bit Pavel Emelyanov
2011-12-26  0:05   ` KOSAKI Motohiro
2011-12-26 16:07     ` Pavel Emelyanov
2011-12-26 16:35       ` KOSAKI Motohiro
2011-12-26 16:49         ` Pavel Emelyanov
2011-12-27 22:53           ` KOSAKI Motohiro
2011-12-25 20:46 ` [PATCH 3/3] mincore: Introduce the MINCORE_SWAP bit Pavel Emelyanov
2011-12-26  8:08   ` Konstantin Khlebnikov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).