From: Zheng Liu <gnehzuil.liu@gmail.com>
To: Dave Hansen <dave@sr71.net>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH] mm: madvise: MADV_POPULATE for quick pre-faulting
Date: Tue, 2 Jul 2013 14:06:56 +0800 [thread overview]
Message-ID: <20130702060655.GA3924@gmail.com> (raw)
In-Reply-To: <51D25A71.3060007@sr71.net>
On Mon, Jul 01, 2013 at 09:43:29PM -0700, Dave Hansen wrote:
> On 07/01/2013 07:37 PM, Zheng Liu wrote:
> > FWIW, it would be great if we can let MAP_POPULATE flag support shared
> > mappings because in our product system there has a lot of applications
> > that uses mmap(2) and then pre-faults this mapping. Currently these
> > applications need to pre-fault the mapping manually.
>
> Are you sure it doesn't? From a cursory look at the code, it looked to
> me like it would populate anonymous and file-backed, but I didn't
> double-check experimentally.
Thanks for pointing it out. I write a program to test this issue, and it
seems to me that it can populate a shared mapping. But in manpage it
describes as below:
MAP_POPULATE (since Linux 2.5.46)
Populate (prefault) page tables for a mapping. For a file mapping,
this causes read-ahead on the file. Later accesses to the mapping
will not be blocked by page faults. MAP_POPULATE is only supported
for private mappings since Linux 2.6.23.
This page is part of release 3.24 of the Linux man-pages project. I am
not sure whether it has been updated or not.
Regards,
- Zheng
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2013-07-02 5:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-27 23:16 [RFC][PATCH] mm: madvise: MADV_POPULATE for quick pre-faulting Dave Hansen
2013-06-28 5:47 ` Zheng Liu
2013-06-28 15:48 ` Dave Hansen
2013-06-29 2:20 ` Zheng Liu
2013-07-01 16:16 ` Dave Hansen
2013-07-02 2:37 ` Zheng Liu
2013-07-02 4:43 ` Dave Hansen
2013-07-02 6:06 ` Zheng Liu [this message]
2013-07-14 3:12 ` Sam Ben
2013-07-15 0:22 ` Zheng Liu
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=20130702060655.GA3924@gmail.com \
--to=gnehzuil.liu@gmail.com \
--cc=dave@sr71.net \
--cc=linux-kernel@vger.kernel.org \
--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).