Page MenuHomeFreeBSD

D23487.diff
No OneTemporary

D23487.diff

Index: head/sys/vm/uma_core.c
===================================================================
--- head/sys/vm/uma_core.c
+++ head/sys/vm/uma_core.c
@@ -323,6 +323,9 @@
static uint64_t uma_zone_get_allocs(uma_zone_t zone);
+static SYSCTL_NODE(_vm, OID_AUTO, debug, CTLFLAG_RD, 0,
+ "Memory allocation debugging");
+
#ifdef INVARIANTS
static uint64_t uma_keg_get_allocs(uma_keg_t zone);
static inline struct noslabbits *slab_dbg_bits(uma_slab_t slab, uma_keg_t keg);
@@ -332,9 +335,6 @@
static void uma_dbg_free(uma_zone_t zone, uma_slab_t slab, void *item);
static void uma_dbg_alloc(uma_zone_t zone, uma_slab_t slab, void *item);
-static SYSCTL_NODE(_vm, OID_AUTO, debug, CTLFLAG_RD, 0,
- "Memory allocation debugging");
-
static u_int dbg_divisor = 1;
SYSCTL_UINT(_vm_debug, OID_AUTO, divisor,
CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &dbg_divisor, 0,
@@ -362,6 +362,12 @@
SYSCTL_INT(_vm, OID_AUTO, zone_warnings, CTLFLAG_RWTUN, &zone_warnings, 0,
"Warn when UMA zones becomes full");
+static int multipage_slabs = 1;
+TUNABLE_INT("vm.debug.uma_multipage_slabs", &multipage_slabs);
+SYSCTL_INT(_vm_debug, OID_AUTO, uma_multipage_slabs,
+ CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &multipage_slabs, 0,
+ "UMA may choose larger slab sizes for better efficiency");
+
/*
* Select the slab zone for an offpage slab with the given maximum item count.
*/
@@ -1993,7 +1999,7 @@
break;
}
- if (kl.eff >= UMA_MIN_EFF ||
+ if (kl.eff >= UMA_MIN_EFF || !multipage_slabs ||
slabsize >= SLAB_MAX_SETSIZE * rsize ||
(keg->uk_flags & (UMA_ZONE_PCPU | UMA_ZONE_CONTIG)) != 0)
break;

File Metadata

Mime Type
text/plain
Expires
Fri, Feb 14, 12:31 PM (20 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16642555
Default Alt Text
D23487.diff (1 KB)

Event Timeline