summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2013-03-21 16:19:46 +0000
committerglebius <glebius@FreeBSD.org>2013-03-21 16:19:46 +0000
commit22bd645df5a40221f99bed0e0e207bd817e30aa9 (patch)
tree96a6aedebbc8282aeaff701c350e64b14013d18e /share
parent04d26633fafb44f4345aa47c3a34303a5bc78861 (diff)
downloadFreeBSD-src-22bd645df5a40221f99bed0e0e207bd817e30aa9.zip
FreeBSD-src-22bd645df5a40221f99bed0e0e207bd817e30aa9.tar.gz
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.
Diffstat (limited to 'share')
-rw-r--r--share/man/man9/zone.954
1 files changed, 54 insertions, 0 deletions
diff --git a/share/man/man9/zone.9 b/share/man/man9/zone.9
index e0d6d04..03bb33b 100644
--- a/share/man/man9/zone.9
+++ b/share/man/man9/zone.9
@@ -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
OpenPOWER on IntegriCloud