From: Pavel Emelyanov <xemul@parallels.com>
To: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Hugh Dickins <hughd@google.com>, Rik van Riel <riel@redhat.com>
Subject: Re: [PATCH 2/2] proc: report page->index instead of pfn for non-linear mappings in /proc/pid/pagemap
Date: Fri, 27 Apr 2012 17:37:06 +0400 [thread overview]
Message-ID: <4F9AA102.8060103@parallels.com> (raw)
In-Reply-To: <20120427123910.2132.7022.stgit@zurg>
On 04/27/2012 04:39 PM, Konstantin Khlebnikov wrote:
> Currently there is no way to find out current layout of non-linear mapping.
> Also there is no way to distinguish ordinary file mapping from non-linear mapping.
>
> Now in pagemap non-linear pte can be recognized as present swapped file-backed,
> or as non-present non-swapped file-backed for non-present non-linear file-pte:
>
> present swapped file data description
> 0 0 0 null non-present
> 0 0 1 page-index non-linear file-pte
> 0 1 0 swap-entry anon-page in swap, migration or hwpoison
> 0 1 1 swap-entry file-page in migration or hwpoison
> 1 0 0 page-pfn present private-anon or special page
> 1 0 1 page-pfn present file or shared-anon page
> 1 1 0 none impossible combination
> 1 1 1 page-index non-linear file-page
>
> [ the last unused combination 1-1-0 can be used for special pages, if anyone want this ]
This means that
a) Any application doing if (pme & PAGE_IS_XXX) checks will get ... broken
b) In order to determine that a mapping is non-linear we'll have to scan it
ALL and check. Currently in CRIU we just don't read the pagemap for shared
file maps but will have to. This is not very optimal. I'd prefer having
this linear/nonlinear info in /proc/pid/smaps or smth like this.
> Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
> Cc: Pavel Emelyanov <xemul@parallels.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Hugh Dickins <hughd@google.com>
> Cc: Rik van Riel <riel@redhat.com>
--
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>
next prev parent reply other threads:[~2012-04-27 13:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-20 19:44 [PATCH] proc: Report PageAnon in last left bit of /proc/pid/pagemap Pavel Emelyanov
2012-04-20 20:32 ` Rik van Riel
2012-04-20 20:36 ` Pavel Emelyanov
2012-04-27 12:39 ` [PATCH 1/2] proc: report file/anon bit in /proc/pid/pagemap Konstantin Khlebnikov
2012-04-27 13:37 ` Pavel Emelyanov
2012-04-27 23:40 ` Andrew Morton
2012-04-28 13:32 ` KOSAKI Motohiro
2012-04-29 8:28 ` Konstantin Khlebnikov
2012-04-27 12:39 ` [PATCH 2/2] proc: report page->index instead of pfn for non-linear mappings " Konstantin Khlebnikov
2012-04-27 13:37 ` Pavel Emelyanov [this message]
2012-04-30 10:48 ` [PATCH v3] proc: report file/anon bit " Konstantin Khlebnikov
2012-04-30 20:32 ` KOSAKI Motohiro
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=4F9AA102.8060103@parallels.com \
--to=xemul@parallels.com \
--cc=akpm@linux-foundation.org \
--cc=hughd@google.com \
--cc=khlebnikov@openvz.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=riel@redhat.com \
/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