From 9328cbc047a607ed479c15720b3e881944af9e56 Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Fri, 10 Jan 2020 19:32:08 +0000 Subject: Always multiple vm.pgcache_zone_max to number of CPUs, and rename it respectively. The tunable controls how big is the size of per-cpu vm page cache. Previously the value was split for all CPUs in system, so configuring same value on machines with different count of CPUs yielded in different cache size available to a particular CPU. Reviewed by: markj Obtained from: Netflix --- sys/vm/vm_page.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 2425d8e5a4f8a..1c6a1515e0472 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -228,7 +228,8 @@ vm_page_init_cache_zones(void *dummy __unused) int cache, domain, maxcache, pool; maxcache = 0; - TUNABLE_INT_FETCH("vm.pgcache_zone_max", &maxcache); + TUNABLE_INT_FETCH("vm.pgcache_zone_max_pcpu", &maxcache); + maxcache *= mp_ncpus; for (domain = 0; domain < vm_ndomains; domain++) { vmd = VM_DOMAIN(domain); for (pool = 0; pool < VM_NFREEPOOL; pool++) { -- cgit v1.3