linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Emelyanov <xemul@parallels.com>
To: Linux MM <linux-mm@kvack.org>, Hugh Dickins <hughd@google.com>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Johannes Weiner <hannes@cmpxchg.org>
Subject: [RFC][PATCH 0/3] Extend the mincore() report bits
Date: Mon, 26 Dec 2011 00:45:30 +0400	[thread overview]
Message-ID: <4EF78B6A.8020904@parallels.com> (raw)

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>

             reply	other threads:[~2011-12-25 20:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-25 20:45 Pavel Emelyanov [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EF78B6A.8020904@parallels.com \
    --to=xemul@parallels.com \
    --cc=aarcange@redhat.com \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@google.com \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).