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
This commit is contained in:
Gleb Smirnoff 2020-01-10 19:32:08 +00:00
parent ca4387843e
commit 9328cbc047

View File

@ -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++) {