From owner-svn-src-all@FreeBSD.ORG Mon Dec 22 08:59:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B6BDB83; Mon, 22 Dec 2014 08:59:45 +0000 (UTC) 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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D80C390B; Mon, 22 Dec 2014 08:59:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBM8xjlb009114; Mon, 22 Dec 2014 08:59:45 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBM8xjXB009113; Mon, 22 Dec 2014 08:59:45 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201412220859.sBM8xjXB009113@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 22 Dec 2014 08:59:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276054 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 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: Mon, 22 Dec 2014 08:59:45 -0000 Author: glebius Date: Mon Dec 22 08:59:44 2014 New Revision: 276054 URL: https://svnweb.freebsd.org/changeset/base/276054 Log: Document flags of vm_page allocation functions. Reviewed by: alc Modified: head/sys/vm/vm_page.h Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Mon Dec 22 04:54:57 2014 (r276053) +++ head/sys/vm/vm_page.h Mon Dec 22 08:59:44 2014 (r276054) @@ -376,22 +376,35 @@ extern long first_page; /* first physi vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa); -/* page allocation classes: */ +/* + * Page allocation parameters for vm_page for the functions + * vm_page_alloc(), vm_page_grab(), vm_page_alloc_contig() and + * vm_page_alloc_freelist(). Some functions support only a subset + * of the flags, and ignore others, see the flags legend. + * + * Bits 0 - 1 define class. + * Bits 2 - 15 dedicated for flags. + * Legend: + * (a) - vm_page_alloc() supports the flag. + * (c) - vm_page_alloc_contig() supports the flag. + * (f) - vm_page_alloc_freelist() supports the flag. + * (g) - vm_page_grab() supports the flag. + * Bits above 15 define the count of additional pages that the caller + * intends to allocate. + */ #define VM_ALLOC_NORMAL 0 #define VM_ALLOC_INTERRUPT 1 #define VM_ALLOC_SYSTEM 2 #define VM_ALLOC_CLASS_MASK 3 -/* page allocation flags: */ -#define VM_ALLOC_WIRED 0x0020 /* non pageable */ -#define VM_ALLOC_ZERO 0x0040 /* Try to obtain a zeroed page */ -#define VM_ALLOC_NOOBJ 0x0100 /* No associated object */ -#define VM_ALLOC_NOBUSY 0x0200 /* Do not busy the page */ -#define VM_ALLOC_IFCACHED 0x0400 /* Fail if the page is not cached */ -#define VM_ALLOC_IFNOTCACHED 0x0800 /* Fail if the page is cached */ -#define VM_ALLOC_IGN_SBUSY 0x1000 /* vm_page_grab() only */ -#define VM_ALLOC_NODUMP 0x2000 /* don't include in dump */ -#define VM_ALLOC_SBUSY 0x4000 /* Shared busy the page */ - +#define VM_ALLOC_WIRED 0x0020 /* (acfg) Allocate non pageable page */ +#define VM_ALLOC_ZERO 0x0040 /* (acfg) Try to obtain a zeroed page */ +#define VM_ALLOC_NOOBJ 0x0100 /* (acg) No associated object */ +#define VM_ALLOC_NOBUSY 0x0200 /* (acg) Do not busy the page */ +#define VM_ALLOC_IFCACHED 0x0400 /* (ag) Fail if page is not cached */ +#define VM_ALLOC_IFNOTCACHED 0x0800 /* (ag) Fail if page is cached */ +#define VM_ALLOC_IGN_SBUSY 0x1000 /* (g) Ignore shared busy flag */ +#define VM_ALLOC_NODUMP 0x2000 /* (ag) don't include in dump */ +#define VM_ALLOC_SBUSY 0x4000 /* (acg) Shared busy the page */ #define VM_ALLOC_COUNT_SHIFT 16 #define VM_ALLOC_COUNT(count) ((count) << VM_ALLOC_COUNT_SHIFT)