Page MenuHomeFreeBSD

D22765.diff
No OneTemporary

D22765.diff

Index: head/sys/vm/uma_core.c
===================================================================
--- head/sys/vm/uma_core.c
+++ head/sys/vm/uma_core.c
@@ -335,6 +335,8 @@
static void
bucket_enable(void)
{
+
+ KASSERT(booted >= BOOT_BUCKETS, ("Bucket enable before init"));
bucketdisable = vm_page_count_min();
}
@@ -2299,10 +2301,10 @@
/*
* Count how many pages do we need to bootstrap. VM supplies
* its need in early zones in the argument, we add up our zones,
- * which consist of: UMA Slabs, UMA Hash and 9 Bucket zones. The
+ * which consist of the UMA Slabs and UMA Hash zones. The
* zone of zones and zone of kegs are accounted separately.
*/
-#define UMA_BOOT_ZONES 11
+#define UMA_BOOT_ZONES 2
/* Zone of zones and zone of kegs have arbitrary alignment. */
#define UMA_BOOT_ALIGN 32
static int zsize, ksize;
@@ -2417,8 +2419,6 @@
sizeof(struct slabhead *) * UMA_HASH_SIZE_INIT,
NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZFLAG_INTERNAL);
- bucket_init();
-
booted = BOOT_STRAPPED;
}
@@ -2439,8 +2439,9 @@
#ifdef DIAGNOSTIC
printf("Entering %s with %d boot pages left\n", __func__, boot_pages);
#endif
- booted = BOOT_BUCKETS;
sx_init(&uma_reclaim_lock, "umareclaim");
+ bucket_init();
+ booted = BOOT_BUCKETS;
bucket_enable();
}

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 26, 8:42 PM (2 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26225286
Default Alt Text
D22765.diff (1 KB)

Event Timeline