summaryrefslogtreecommitdiffstats
path: root/sys/vm/uma_int.h
diff options
context:
space:
mode:
authorbmilekic <bmilekic@FreeBSD.org>2003-08-11 19:39:45 +0000
committerbmilekic <bmilekic@FreeBSD.org>2003-08-11 19:39:45 +0000
commit77b7809eb0123da6148657366ac52410c30839ee (patch)
tree601ef49b88fbb9dfc308acedb14ae029ee80dec8 /sys/vm/uma_int.h
parent91297961f690c3baf9fe8d1a9ced652dd60162fc (diff)
downloadFreeBSD-src-77b7809eb0123da6148657366ac52410c30839ee.zip
FreeBSD-src-77b7809eb0123da6148657366ac52410c30839ee.tar.gz
- When deciding whether to init the zone with small_init or large_init,
compare the zone element size (+1 for the byte of linkage) against UMA_SLAB_SIZE - sizeof(struct uma_slab), and not just UMA_SLAB_SIZE. Add a KASSERT in zone_small_init to make sure that the computed ipers (items per slab) for the zone is not zero, despite the addition of the check, just to be sure (this part submitted by: silby) - UMA_ZONE_VM used to imply BUCKETCACHE. Now it implies CACHEONLY instead. CACHEONLY is like BUCKETCACHE in the case of bucket allocations, but in addition to that also ensures that we don't setup the zone with OFFPAGE slab headers allocated from the slabzone. This means that we're not allowed to have a UMA_ZONE_VM zone initialized for large items (zone_large_init) because it would require the slab headers to be allocated from slabzone, and hence kmem_map. Some of the zones init'd with UMA_ZONE_VM are so init'd before kmem_map is suballoc'd from kernel_map, which is why this change is necessary.
Diffstat (limited to 'sys/vm/uma_int.h')
-rw-r--r--sys/vm/uma_int.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/uma_int.h b/sys/vm/uma_int.h
index 6066440..3554f0f 100644
--- a/sys/vm/uma_int.h
+++ b/sys/vm/uma_int.h
@@ -260,7 +260,7 @@ struct uma_zone {
#define UMA_ZFLAG_MALLOC 0x0008 /* Zone created by malloc */
#define UMA_ZFLAG_NOFREE 0x0010 /* Don't free data from this zone */
#define UMA_ZFLAG_FULL 0x0020 /* This zone reached uz_maxpages */
-#define UMA_ZFLAG_BUCKETCACHE 0x0040 /* Only allocate buckets from cache */
+#define UMA_ZFLAG_CACHEONLY 0x0040 /* Don't go to VM to allocate internal objs */
#define UMA_ZFLAG_HASH 0x0080 /* Look up slab via hash */
/* This lives in uflags */
OpenPOWER on IntegriCloud