svn commit: r344988 - in stable/12/sys: kern vm
Mark Johnston
markj at FreeBSD.org
Mon Mar 11 00:52:56 UTC 2019
Author: markj
Date: Mon Mar 11 00:52:55 2019
New Revision: 344988
URL: https://svnweb.freebsd.org/changeset/base/344988
Log:
MFC r344550:
Improve vmem tuning for platforms without a direct map.
Modified:
stable/12/sys/kern/subr_vmem.c
stable/12/sys/vm/vm_kern.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/kern/subr_vmem.c
==============================================================================
--- stable/12/sys/kern/subr_vmem.c Sun Mar 10 23:05:38 2019 (r344987)
+++ stable/12/sys/kern/subr_vmem.c Mon Mar 11 00:52:55 2019 (r344988)
@@ -689,9 +689,11 @@ vmem_startup(void)
/*
* Reserve enough tags to allocate new tags. We allow multiple
* CPUs to attempt to allocate new tags concurrently to limit
- * false restarts in UMA.
+ * false restarts in UMA. vmem_bt_alloc() allocates from a per-domain
+ * arena, which may involve importing a range from the kernel arena,
+ * so we need to keep at least 2 * BT_MAXALLOC tags reserved.
*/
- uma_zone_reserve(vmem_bt_zone, BT_MAXALLOC * (mp_ncpus + 1) / 2);
+ uma_zone_reserve(vmem_bt_zone, 2 * BT_MAXALLOC * mp_ncpus);
uma_zone_set_allocf(vmem_bt_zone, vmem_bt_alloc);
#endif
}
Modified: stable/12/sys/vm/vm_kern.c
==============================================================================
--- stable/12/sys/vm/vm_kern.c Sun Mar 10 23:05:38 2019 (r344987)
+++ stable/12/sys/vm/vm_kern.c Mon Mar 11 00:52:55 2019 (r344988)
@@ -124,8 +124,8 @@ SYSCTL_ULONG(_vm, OID_AUTO, max_kernel_address, CTLFLA
#if VM_NRESERVLEVEL > 0
#define KVA_QUANTUM_SHIFT (VM_LEVEL_0_ORDER + PAGE_SHIFT)
#else
-/* On non-superpage architectures want large import sizes. */
-#define KVA_QUANTUM_SHIFT (10 + PAGE_SHIFT)
+/* On non-superpage architectures we want large import sizes. */
+#define KVA_QUANTUM_SHIFT (8 + PAGE_SHIFT)
#endif
#define KVA_QUANTUM (1 << KVA_QUANTUM_SHIFT)
More information about the svn-src-all
mailing list