From owner-svn-src-all@FreeBSD.ORG Thu Mar 21 16:19:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D9DDE8DE; Thu, 21 Mar 2013 16:19:46 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B404078A; Thu, 21 Mar 2013 16:19:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2LGJksn038818; Thu, 21 Mar 2013 16:19:46 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2LGJkmB038816; Thu, 21 Mar 2013 16:19:46 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201303211619.r2LGJkmB038816@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 21 Mar 2013 16:19:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248588 - 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-all@freebsd.org X-Mailman-Version: 2.1.14 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: Thu, 21 Mar 2013 16:19:46 -0000 Author: glebius Date: Thu Mar 21 16:19:46 2013 New Revision: 248588 URL: http://svnweb.freebsd.org/changeset/base/248588 Log: Document some flags to the uma_zcreate(). Not all flags are documented, only those that at least are used in the kernel, or that definitely work. Modified: head/share/man/man9/zone.9 Modified: head/share/man/man9/zone.9 ============================================================================== --- head/share/man/man9/zone.9 Thu Mar 21 16:15:34 2013 (r248587) +++ head/share/man/man9/zone.9 Thu Mar 21 16:19:46 2013 (r248588) @@ -139,6 +139,60 @@ and .Fn uma_zfree but rather in a batch mode on several objects. .Pp +The +.Fa flags +argument of the +.Fn uma_zcreate +is a subset of the following flags: +.Bl -tag -width "foo" +.It Dv UMA_ZONE_NOFREE +Slabs of the zone are never returned back to VM. +.It Dv UMA_ZONE_REFCNT +Each item in the zone would have internal reference counter associated with it. +See +.Fn uma_find_refcnt . +.It Dv UMA_ZONE_NODUMP +Pages belonging to the zone will not be included into mini-dumps. +.It Dv UMA_ZONE_OFFPAGE +By default book-keeping of items within a slab is done in the slab page itself. +This flag explicitly tells subsystem that book-keeping structure should be +allocated separately from special internal zone. +This flag requires either +.Dv UMA_ZONE_VTOSLAB +or +.Dv UMA_ZONE_HASH , +since subsystem requires a mechanism to find a book-keeping structure +to an item beeing freed. +The subsystem may choose to prefer offpage book-keeping for certain zones +implicitly. +.It Dv UMA_ZONE_ZINIT +The zone will have its +.Ft uma_init +method set to internal method that initializes a new allocated slab +to all zeros. +Don't mistake +.Ft uma_init +method with +.Ft uma_ctor . +A zone with +.Dv UMA_ZONE_ZINIT +flag would not return zeroed memory on every +.Fn uma_zalloc . +.It Dv UMA_ZONE_HASH +The zone should use an internal hash table to find slab book-keeping +structure where an allocation being freed belongs to. +.It Dv UMA_ZONE_VTOSLAB +The zone should use special field of +.Vt vm_page_t +to find slab book-keeping structure where an allocation being freed belongs to. +.It Dv UMA_ZONE_MALLOC +The zone is for the +.Xr malloc 9 +subsystem. +.It Dv UMA_ZONE_VM +The zone is for the VM subsystem. +.El +.Pp To allocate an item from a zone, simply call .Fn uma_zalloc with a pointer to that zone