svn commit: r242443 - user/alfred/9-alfred/sys/kern
Alfred Perlstein
alfred at FreeBSD.org
Thu Nov 1 17:22:41 UTC 2012
Author: alfred
Date: Thu Nov 1 17:22:41 2012
New Revision: 242443
URL: http://svn.freebsd.org/changeset/base/242443
Log:
Merge r242029: scale maxusers past 384 for mbufs.
Modified:
user/alfred/9-alfred/sys/kern/subr_param.c
Directory Properties:
user/alfred/9-alfred/sys/ (props changed)
Modified: user/alfred/9-alfred/sys/kern/subr_param.c
==============================================================================
--- user/alfred/9-alfred/sys/kern/subr_param.c Thu Nov 1 17:19:07 2012 (r242442)
+++ user/alfred/9-alfred/sys/kern/subr_param.c Thu Nov 1 17:22:41 2012 (r242443)
@@ -278,8 +278,16 @@ init_param2(long physpages)
maxusers = physpages / (2 * 1024 * 1024 / PAGE_SIZE);
if (maxusers < 32)
maxusers = 32;
- if (maxusers > 384)
- maxusers = 384;
+ /*
+ * Clips maxusers to 384 on machines with <= 4GB RAM or 32bit.
+ * Scales it down 6x for large memory machines.
+ */
+ if (maxusers > 384) {
+ if (sizeof(void *) <= 4)
+ maxusers = 384;
+ else
+ maxusers = 384 + ((maxusers - 384) / 6);
+ }
}
/*
More information about the svn-src-user
mailing list