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

Mark Johnston markj at FreeBSD.org
Sun Sep 20 16:49:48 UTC 2020


Author: markj
Date: Sun Sep 20 16:49:48 2020
New Revision: 365928
URL: https://svnweb.freebsd.org/changeset/base/365928

Log:
  MFC r365841:
  Increase the default vm.max_user_wired value.

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

Modified: stable/12/sys/vm/vm_pageout.c
==============================================================================
--- stable/12/sys/vm/vm_pageout.c	Sun Sep 20 16:11:38 2020	(r365927)
+++ stable/12/sys/vm/vm_pageout.c	Sun Sep 20 16:49:48 2020	(r365928)
@@ -2040,7 +2040,7 @@ vm_pageout_init_domain(int domain)
 static void
 vm_pageout_init(void)
 {
-	u_int freecount;
+	u_long freecount;
 	int i;
 
 	/*
@@ -2073,8 +2073,13 @@ vm_pageout_init(void)
 	if (vm_pageout_update_period == 0)
 		vm_pageout_update_period = 600;
 
+	/*
+	 * Set the maximum number of user-wired virtual pages.  Historically the
+	 * main source of such pages was mlock(2) and mlockall(2).  Hypervisors
+	 * may also request user-wired memory.
+	 */
 	if (vm_page_max_user_wired == 0)
-		vm_page_max_user_wired = freecount / 3;
+		vm_page_max_user_wired = 4 * freecount / 5;
 }
 
 /*


More information about the svn-src-all mailing list