svn commit: r242981 - user/andre/tcp_workqueue/sys/kern
Andre Oppermann
andre at FreeBSD.org
Tue Nov 13 16:37:24 UTC 2012
Author: andre
Date: Tue Nov 13 16:37:24 2012
New Revision: 242981
URL: http://svnweb.freebsd.org/changeset/base/242981
Log:
Scaling maxfiles to physpages / 8 seems more appropriate.
Modified:
user/andre/tcp_workqueue/sys/kern/subr_param.c
Modified: user/andre/tcp_workqueue/sys/kern/subr_param.c
==============================================================================
--- user/andre/tcp_workqueue/sys/kern/subr_param.c Tue Nov 13 16:35:44 2012 (r242980)
+++ user/andre/tcp_workqueue/sys/kern/subr_param.c Tue Nov 13 16:37:24 2012 (r242981)
@@ -309,11 +309,11 @@ init_param2(long physpages)
* physical page but not less than 16 times maxusers.
* At most it can be 1/6 the number of physical pages.
*/
- maxfiles = imax(MAXFILES, physpages / 12);
+ maxfiles = imax(MAXFILES, physpages / 8);
TUNABLE_INT_FETCH("kern.maxfiles", &maxfiles);
- if (maxfiles > (physpages / 6))
- maxfiles = physpages / 6;
- maxfilesperproc = (maxfiles * 9) / 10;
+ if (maxfiles > (physpages / 4))
+ maxfiles = physpages / 4;
+ maxfilesperproc = (maxfiles / 10) * 9;
/*
* Cannot be changed after boot.
@@ -337,8 +337,8 @@ init_param2(long physpages)
VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS);
maxmbufmem = realmem / 2;
TUNABLE_LONG_FETCH("kern.maxmbufmem", &maxmbufmem);
- if (maxmbufmem > realmem / 4 * 3)
- maxmbufmem = realmem / 4 * 3;
+ if (maxmbufmem > (realmem / 4) * 3)
+ maxmbufmem = (realmem / 4) * 3;
/*
* The default for maxpipekva is min(1/64 of the kernel address space,
More information about the svn-src-user
mailing list