summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2010-08-28 16:57:07 +0000
committeralc <alc@FreeBSD.org>2010-08-28 16:57:07 +0000
commit115cb6b29fac1d05cd165127e0c586a5da89e98b (patch)
treed4abb08d97bb3bfebf99cc70214a916561996d4d /lib/libc
parent76d72447281953457a8a3a319fdc80070bc5152c (diff)
downloadFreeBSD-src-115cb6b29fac1d05cd165127e0c586a5da89e98b.zip
FreeBSD-src-115cb6b29fac1d05cd165127e0c586a5da89e98b.tar.gz
Add the MAP_PREFAULT_READ option to mmap(2).
Reviewed by: jhb, kib
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/sys/mmap.215
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/libc/sys/mmap.2 b/lib/libc/sys/mmap.2
index b633cb1..0b1f35f 100644
--- a/lib/libc/sys/mmap.2
+++ b/lib/libc/sys/mmap.2
@@ -28,7 +28,7 @@
.\" @(#)mmap.2 8.4 (Berkeley) 5/11/95
.\" $FreeBSD$
.\"
-.Dd November 6, 2009
+.Dd August 28, 2010
.Dt MMAP 2
.Os
.Sh NAME
@@ -211,6 +211,19 @@ implements a coherent file system buffer cache.
However, it may be
used to associate dirty VM pages with file system buffers and thus cause
them to be flushed to physical media sooner rather than later.
+.It Dv MAP_PREFAULT_READ
+Immediately update the calling process's lowest-level virtual address
+translation structures, such as its page table, so that every memory
+resident page within the region is mapped for read access.
+Ordinarily these structures are updated lazily.
+The effect of this option is to eliminate any soft faults that would
+otherwise occur on the initial read accesses to the region.
+Although this option does not preclude
+.Fa prot
+from including
+.Dv PROT_WRITE ,
+it does not eliminate soft faults on the initial write accesses to the
+region.
.It Dv MAP_PRIVATE
Modifications are private.
.It Dv MAP_SHARED
OpenPOWER on IntegriCloud