From owner-svn-src-all@FreeBSD.ORG Sat Feb 27 17:11:15 2010 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 9FC741065670; Sat, 27 Feb 2010 17:11:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EFD48FC2C; Sat, 27 Feb 2010 17:11:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o1RHBFSV021269; Sat, 27 Feb 2010 17:11:15 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o1RHBFTU021267; Sat, 27 Feb 2010 17:11:15 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201002271711.o1RHBFTU021267@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 27 Feb 2010 17:11:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r204416 - head/share/man/man9 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: Sat, 27 Feb 2010 17:11:15 -0000 Author: kib Date: Sat Feb 27 17:11:15 2010 New Revision: 204416 URL: http://svn.freebsd.org/changeset/base/204416 Log: Update man page for vm_page_alloc(9). Based on the submission by: Giovanni Trematerra MFC after: 3 days Modified: head/share/man/man9/vm_page_alloc.9 Modified: head/share/man/man9/vm_page_alloc.9 ============================================================================== --- head/share/man/man9/vm_page_alloc.9 Sat Feb 27 17:09:28 2010 (r204415) +++ head/share/man/man9/vm_page_alloc.9 Sat Feb 27 17:11:15 2010 (r204416) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 13, 2001 +.Dd February 27, 2010 .Dt VM_PAGE_ALLOC 9 .Os .Sh NAME @@ -48,16 +48,26 @@ within .Fa object . It is assumed that a page has not already been allocated at .Fa pindex . -The page returned is inserted into the object, but is not inserted -into the pmap. +The page returned is inserted into the object, unless +.Dv VM_ALLOC_NOOBJ +is specified in the +.Fa page_req , +but is not inserted into a pmap. +The page may exists in the vm object cache, in which case it will +be reactivated instead, moving from the cache into the object page list. .Pp .Fn vm_page_alloc -will not block. +will not sleep. .Pp Its arguments are: .Bl -tag -width ".Fa page_req" .It Fa object The VM object to allocate the page for. +The +.Fa object +must be locked if +.Dv VM_ALLOC_NOOBJ +is not specified. .It Fa pindex The index into the object at which the page should be inserted. .It Fa page_req @@ -82,12 +92,24 @@ than zero. .It Dv VM_ALLOC_ZERO Indicate a preference for a pre-zeroed page. There is no guarantee that the page thus returned will be zeroed, but -it will be marked as such. +it will be marked by +.Dv PG_ZERO +flag if it is zeroed. .It Dv VM_ALLOC_NOOBJ -The page is associated with an unmanaged memory region, that is, there -is no backing VM object. -This is typically used to allocate pages within the kernel virtual -address space. +Do not associate the allocated page with a vm object. +The +.Fa object +argument is ignored. +.It Dv VM_ALLOC_NOBUSY +The page returned will not be busied. +.It Dv VM_ALLOC_WIRED +The returned page is wired. +.It Dv VM_ALLOC_IFNOTCACHED +Only allocate the page if it is not cached in the +.Fa object . +If the page at the specified +.Fa pindex +is cached, NULL is returned instead. .El .El .Sh RETURN VALUES