aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2020-09-21 00:31:06 +0000
committerMark Johnston <markj@FreeBSD.org>2020-09-21 00:31:06 +0000
commit54acd65f6f6162873aa3f9b4c6a115ad50bb0d84 (patch)
tree1d1e2dfe3fc4dcdd79a0587779c6efcb860f7398
parent2967f72f70ce858090ddb8f74408093a3e7f933f (diff)
downloadsrc-54acd65f6f6162873aa3f9b4c6a115ad50bb0d84.tar.gz
src-54acd65f6f6162873aa3f9b4c6a115ad50bb0d84.zip
MFS r365928:
MFC r365841: Increase the default vm.max_user_wired value. Approved by: re (gjb)
Notes
Notes: svn path=/releng/12.2/; revision=365933
-rw-r--r--sys/vm/vm_pageout.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index 813f20237d1d..fc7219d868bb 100644
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -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;
}
/*