svn commit: r353884 - stable/12/sys/vm

Mark Johnston markj at FreeBSD.org
Tue Oct 22 14:10:32 UTC 2019


Author: markj
Date: Tue Oct 22 14:10:31 2019
New Revision: 353884
URL: https://svnweb.freebsd.org/changeset/base/353884

Log:
  MFC r353734:
  Further constrain the use of per-CPU caches for free pages.
  
  PR:	241048

Modified:
  stable/12/sys/vm/vm_page.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/vm/vm_page.c
==============================================================================
--- stable/12/sys/vm/vm_page.c	Tue Oct 22 14:06:42 2019	(r353883)
+++ stable/12/sys/vm/vm_page.c	Tue Oct 22 14:10:31 2019	(r353884)
@@ -199,10 +199,12 @@ vm_page_init_cache_zones(void *dummy __unused)
 		vmd = VM_DOMAIN(domain);
 
 		/*
-		 * Don't allow the page caches to take up more than .25% of
-		 * memory.
+		 * Don't allow the page caches to take up more than .1875% of
+		 * memory.  A UMA bucket contains at most 256 free pages, and we
+		 * have two buckets per CPU per free pool.
 		 */
-		if (vmd->vmd_page_count / 400 < 256 * mp_ncpus * VM_NFREEPOOL)
+		if (vmd->vmd_page_count / 600 < 2 * 256 * mp_ncpus *
+		    VM_NFREEPOOL)
 			continue;
 		for (pool = 0; pool < VM_NFREEPOOL; pool++) {
 			pgcache = &vmd->vmd_pgcache[pool];


More information about the svn-src-all mailing list