From owner-svn-src-head@FreeBSD.ORG Thu Aug 22 22:01:57 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 27296D66; Thu, 22 Aug 2013 22:01:57 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F09372788; Thu, 22 Aug 2013 22:01:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r7MM1uJr067521; Thu, 22 Aug 2013 22:01:56 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r7MM1upF067520; Thu, 22 Aug 2013 22:01:56 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201308222201.r7MM1upF067520@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 22 Aug 2013 22:01:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254673 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Aug 2013 22:01:57 -0000 Author: kib Date: Thu Aug 22 22:01:56 2013 New Revision: 254673 URL: http://svnweb.freebsd.org/changeset/base/254673 Log: Update the manual page for vm_page_grab(9). Reviewed and edited by: alc Sponsored by: The FreeBSD Foundation Modified: head/share/man/man9/vm_page_grab.9 Modified: head/share/man/man9/vm_page_grab.9 ============================================================================== --- head/share/man/man9/vm_page_grab.9 Thu Aug 22 20:29:57 2013 (r254672) +++ head/share/man/man9/vm_page_grab.9 Thu Aug 22 22:01:56 2013 (r254673) @@ -1,5 +1,9 @@ .\" .\" Copyright (C) 2001 Chad David . All rights reserved. +.\" Copyright (c) 2013 The FreeBSD Foundation +.\" +.\" Portions of this documentation were written by Konstantin Belousov +.\" under sponsorship from the FreeBSD Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -26,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 7, 2001 +.Dd August 23, 2013 .Dt VM_PAGE_GRAB 9 .Os .Sh NAME @@ -48,21 +52,31 @@ If the page exists and is busy, .Fn vm_page_grab will sleep while waiting for it. If the page does not exist, it is allocated. +The function sleeps until the allocation request can be satisfied. +.Pp +The function requires the +.Fa object +to be locked on entry, and returns with the object locked. +If the +.Fn vm_page_grab +function sleeps for any reason, the object lock is temporary dropped. .Pp -If -.Dv VM_ALLOC_RETRY -is not set in -.Fa allocflags -and the function sleeps, either getting the page from the object -or while allocating it, -.Dv NULL -is returned. +The +.Fn vm_page_grab +supports all of the flags supported by +.Xr vm_page_alloc . +In addition, +.Fn vm_page_grab +supports the following flags: +.Bl -tag -width ".Dv VM_ALLOC_IGN_SBUSY" +.It Dv VM_ALLOC_IGN_SBUSY +When waiting for the busy state of the existing page to drain, +only test for exclusive busy; ignore the shared busy counter. +.El .Sh RETURN VALUES -If successful, +The .Fn vm_page_grab -returns the page; otherwise, -.Dv NULL -is returned. +always returns the page. .Sh SEE ALSO .Xr vm_page_alloc 9 .Sh AUTHORS