Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Oct 2019 14:10:31 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r353884 - stable/12/sys/vm
Message-ID:  <201910221410.x9MEAV6B082417@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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];



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910221410.x9MEAV6B082417>