mmap2: Clarify MAP_POPULATE

David Rientjes has noticed that MAP_POPULATE wording might promise
much more than the kernel actually provides and intend to provide.
The primary usage of the flag is to pre-fault the range. There is
no guarantee that no major faults will happen later on. The pages
might have been reclaimed by the time the process tries to access
them.

Reviewed-by: Eric B Munson <emunson@akamai.com>
Signed-off-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michal Hocko 2015-05-13 16:38:12 +02:00 committed by Michael Kerrisk
parent 7e3786bcdc
commit bbebbb6d56
1 changed files with 1 additions and 1 deletions

View File

@ -310,7 +310,7 @@ private writable mappings.
.BR 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.
This will help to reduce blocking on page faults later.
.BR MAP_POPULATE
is supported for private mappings only since Linux 2.6.23.
.TP