svn commit: r226766 - stable/8/lib/libc/sys

Alan Cox alc at FreeBSD.org
Tue Oct 25 23:29:36 UTC 2011


Author: alc
Date: Tue Oct 25 23:29:36 2011
New Revision: 226766
URL: http://svn.freebsd.org/changeset/base/226766

Log:
  MFC r211937
    Add the MAP_PREFAULT_READ option to mmap(2).

Modified:
  stable/8/lib/libc/sys/mmap.2
Directory Properties:
  stable/8/lib/libc/   (props changed)
  stable/8/lib/libc/stdtime/   (props changed)

Modified: stable/8/lib/libc/sys/mmap.2
==============================================================================
--- stable/8/lib/libc/sys/mmap.2	Tue Oct 25 23:28:16 2011	(r226765)
+++ stable/8/lib/libc/sys/mmap.2	Tue Oct 25 23:29:36 2011	(r226766)
@@ -28,7 +28,7 @@
 .\"	@(#)mmap.2	8.4 (Berkeley) 5/11/95
 .\" $FreeBSD$
 .\"
-.Dd July 26, 2009
+.Dd August 28, 2010
 .Dt MMAP 2
 .Os
 .Sh NAME
@@ -207,6 +207,19 @@ implements a coherent file system buffer
 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


More information about the svn-src-all mailing list