From owner-svn-src-all@FreeBSD.ORG Tue Oct 25 23:29:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1CA41065673; Tue, 25 Oct 2011 23:29:36 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 908E58FC15; Tue, 25 Oct 2011 23:29:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9PNTagR021715; Tue, 25 Oct 2011 23:29:36 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9PNTaEf021713; Tue, 25 Oct 2011 23:29:36 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201110252329.p9PNTaEf021713@svn.freebsd.org> From: Alan Cox Date: Tue, 25 Oct 2011 23:29:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226766 - stable/8/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 23:29:36 -0000 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