From: Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
To: "Michael Kerrisk (man-pages)"
<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Andy Lutomirski <luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org>,
linux-man <linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] remap_file_pages.2: Not actually useful on real files.
Date: Mon, 19 May 2014 07:48:56 -0700 [thread overview]
Message-ID: <20140519144856.GA23758@infradead.org> (raw)
In-Reply-To: <CAKgNAkhPJ+w0Kur57bJeTOrLdgaLRebk9Yr0PsE4czqcGFudwQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Thu, May 08, 2014 at 03:29:32PM +0200, Michael Kerrisk (man-pages) wrote:
> > I think the whole man page for remap_file_pages is a litt confusing I
> > have to say, the concept of a VMA is purely kernel internal and doesn't
> > really have a meaning for applications and thus shouldn't appear in a
> > man page.
>
> I agree it could be better. Do you have a suggested text?
Does the patch below look good? I tries to explain it in user visible
behavior:
diff --git a/man2/remap_file_pages.2 b/man2/remap_file_pages.2
index 67251e3..716b911 100644
--- a/man2/remap_file_pages.2
+++ b/man2/remap_file_pages.2
@@ -46,8 +46,7 @@ The advantage of using
.BR remap_file_pages ()
over using repeated calls to
.BR mmap (2)
-is that the former approach does not require the kernel to create
-additional VMA (Virtual Memory Area) data structures.
+is that the kernel can implement it more efficiently.
To create a nonlinear mapping we perform the following steps:
.TP 3
@@ -160,11 +159,18 @@ Since Linux 2.6.23,
.BR remap_file_pages ()
creates non-linear mappings only
on in-memory file systems such as tmpfs, hugetlbfs or ramfs.
+
On filesystems with a backing store,
.BR remap_file_pages ()
is not much more efficient than using
.BR mmap (2)
to adjust which parts of the file are mapped to which addresses.
+
+Non-linear mappings created by
+.BR remap_file_pages ()
+do not count against the limit of memory mappings set in
+.I /proc/sys/vm/max_map_count
+unless the above mentioned emulation is used.
.SH SEE ALSO
.BR getpagesize (2),
.BR mmap (2),
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-05-19 14:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5de30c3a21531919712fc7df213c18b46e521225.1355955125.git.luto@amacapital.net>
[not found] ` <536B5221.60407@gmail.com>
[not found] ` <536B5221.60407-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-05-08 12:50 ` [PATCH] remap_file_pages.2: Not actually useful on real files Christoph Hellwig
[not found] ` <20140508125032.GA24087-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2014-05-08 13:29 ` Michael Kerrisk (man-pages)
[not found] ` <CAKgNAkhPJ+w0Kur57bJeTOrLdgaLRebk9Yr0PsE4czqcGFudwQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-08 20:38 ` Andy Lutomirski
[not found] ` <CALCETrWjAoK_xo1-NTn5S4u=nK2EpH7oh6_JQOgU4BBieV7o+A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-09 5:31 ` Michael Kerrisk (man-pages)
[not found] ` <536C682F.2060000-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-05-10 0:57 ` Andy Lutomirski
[not found] ` <CALCETrVxCRJuczMkmmpC81D-R0WVXuGwggpdWRJkx3fb4SOuLg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-05-10 17:44 ` Michael Kerrisk (man-pages)
2014-05-19 14:48 ` Christoph Hellwig [this message]
[not found] ` <20140519144856.GA23758-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2014-05-19 16:31 ` Andy Lutomirski
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=20140519144856.GA23758@infradead.org \
--to=hch-wegcikhe2lqwvfeawa7xhq@public.gmane.org \
--cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org \
--cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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).