Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Nov 2012 13:35:20 -0700
From:      Alfred Perlstein <alfred@freebsd.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r242520 - head/sys/kern
Message-ID:  <201210250146.q9P1kLi8043704@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: alfred
Date: Sat Nov  3 18:21:40 2012
New Revision: 242520
URL: http://svn.freebsd.org/changeset/base/242520

Log:
  Retire MAXUSERS.

  Approved by: peter, meetBSD

Modified:
  head/sys/sparc64/sparc64/vm_machdep.c
  head/sys/netinet/ip_input.c
  head/sys/boot/forth/loader.conf
  head/sys/boot/common/loader.8
  head/sys/sys/systm.h
  head/sys/powerpc/booke/vm_machdep.c
  head/sys/powerpc/aim/vm_machdep.c
  head/sys/arm/arm/vm_machdep.c
  head/sys/i386/i386/vm_machdep.c
  head/sys/netinet6/ip6_input.c
  head/sys/conf/makeLINT.sed
  head/sys/conf/options
  head/sys/conf/NOTES
  head/sys/net/flowtable.c
  head/sys/kern/kern_mib.c
  head/sys/kern/subr_param.c
  head/sys/kern/kern_mbuf.c
  head/sys/mips/conf/RT305X
  head/sys/mips/mips/vm_machdep.c

Index: head/sys/sparc64/sparc64/vm_machdep.c
===================================================================
--- head/sys/sparc64/sparc64/vm_machdep.c	(Sat Nov  3 18:21:32 2012)
+++ head/sys/sparc64/sparc64/vm_machdep.c	(Sat Nov  3 18:21:40 2012)
@@ -85,7 +85,7 @@
 #include <machine/tstate.h>
 
 #ifndef NSFBUFS
-#define	NSFBUFS		(512 + maxusers * 16)
+#define	NSFBUFS		(512 + maxbikesheds * 16)
 #endif
 
 static void	sf_buf_init(void *arg);
Index: head/sys/netinet/ip_input.c
===================================================================
--- head/sys/netinet/ip_input.c	(Sat Nov  3 18:21:32 2012)
+++ head/sys/netinet/ip_input.c	(Sat Nov  3 18:21:40 2012)
@@ -315,7 +315,7 @@
 		/*
 		 * round up to the next power of 2
 		 */
-		V_ip_output_flowtable_size = 1 << fls((1024 + maxusers * 64)-1);
+		V_ip_output_flowtable_size = 1 << fls((1024 + maxbikesheds * 64)-1);
 	}
 	V_ip_ft = flowtable_alloc("ipv4", V_ip_output_flowtable_size, FL_PCPU);
 #endif
Index: head/sys/boot/forth/loader.conf
===================================================================
--- head/sys/boot/forth/loader.conf	(Sat Nov  3 18:21:32 2012)
+++ head/sys/boot/forth/loader.conf	(Sat Nov  3 18:21:40 2012)
@@ -104,7 +104,7 @@
 #kern.maxssiz=""		# Set the max stack size
 #kern.maxswzone=""		# Set the max swmeta KVA storage
 #kern.maxtsiz=""		# Set the max text size
-#kern.maxusers="32"		# Set size of various static tables
+#kern.maxbikesheds="32"		# Set size of various static tables
 #kern.msgbufsize="65536"	# Set size of kernel message buffer
 #kern.nbuf=""			# Set the number of buffer headers
 #kern.ncallout=""		# Set the maximum # of timer events
Index: head/sys/boot/common/loader.8
===================================================================
--- head/sys/boot/common/loader.8	(Sat Nov  3 18:21:32 2012)
+++ head/sys/boot/common/loader.8	(Sat Nov  3 18:21:40 2012)
@@ -591,7 +591,7 @@
 enabled correctly by the device driver.
 Tunable value set to ON (1) by default, but this may cause problems
 with some peripherals.
-.It Va kern.maxusers
+.It Va kern.maxbikesheds
 Set the size of a number of statically allocated system tables; see
 .Xr tuning 7
 for a description of how to select an appropriate value for this
Index: head/sys/sys/systm.h
===================================================================
--- head/sys/sys/systm.h	(Sat Nov  3 18:21:32 2012)
+++ head/sys/sys/systm.h	(Sat Nov  3 18:21:40 2012)
@@ -61,7 +61,7 @@
 extern int boothowto;		/* reboot flags, from console subsystem */
 extern int bootverbose;		/* nonzero to print verbose messages */
 
-extern int maxusers;		/* system tune hint */
+extern int maxbikesheds;		/* system tune hint */
 extern int ngroups_max;		/* max # of supplemental groups */
 extern int vm_guest;		/* Running as virtual machine guest? */
 
Index: head/sys/powerpc/booke/vm_machdep.c
===================================================================
--- head/sys/powerpc/booke/vm_machdep.c	(Sat Nov  3 18:21:32 2012)
+++ head/sys/powerpc/booke/vm_machdep.c	(Sat Nov  3 18:21:40 2012)
@@ -134,7 +134,7 @@
 #include <vm/vm_extern.h>
 
 #ifndef NSFBUFS
-#define NSFBUFS		(512 + maxusers * 16)
+#define NSFBUFS		(512 + maxbikesheds * 16)
 #endif
 
 static void sf_buf_init(void *arg);
Index: head/sys/powerpc/aim/vm_machdep.c
===================================================================
--- head/sys/powerpc/aim/vm_machdep.c	(Sat Nov  3 18:21:32 2012)
+++ head/sys/powerpc/aim/vm_machdep.c	(Sat Nov  3 18:21:40 2012)
@@ -108,7 +108,7 @@
  */
 
 #ifndef NSFBUFS
-#define NSFBUFS         (512 + maxusers * 16)
+#define NSFBUFS         (512 + maxbikesheds * 16)
 #endif
 
 static void sf_buf_init(void *arg);
Index: head/sys/arm/arm/vm_machdep.c
===================================================================
--- head/sys/arm/arm/vm_machdep.c	(Sat Nov  3 18:21:32 2012)
+++ head/sys/arm/arm/vm_machdep.c	(Sat Nov  3 18:21:40 2012)
@@ -74,7 +74,7 @@
 #include <machine/md_var.h>
 
 #ifndef NSFBUFS
-#define NSFBUFS		(512 + maxusers * 16)
+#define NSFBUFS		(512 + maxbikesheds * 16)
 #endif
 
 #ifndef ARM_USE_SMALL_ALLOC
Index: head/sys/i386/i386/vm_machdep.c
===================================================================
--- head/sys/i386/i386/vm_machdep.c	(Sat Nov  3 18:21:32 2012)
+++ head/sys/i386/i386/vm_machdep.c	(Sat Nov  3 18:21:40 2012)
@@ -103,7 +103,7 @@
 #endif
 
 #ifndef NSFBUFS
-#define	NSFBUFS		(512 + maxusers * 16)
+#define	NSFBUFS		(512 + maxbikesheds * 16)
 #endif
 
 CTASSERT((struct thread **)OFFSETOF_CURTHREAD ==
Index: head/sys/netinet6/ip6_input.c
===================================================================
--- head/sys/netinet6/ip6_input.c	(Sat Nov  3 18:21:32 2012)
+++ head/sys/netinet6/ip6_input.c	(Sat Nov  3 18:21:40 2012)
@@ -196,7 +196,7 @@
 		/*
 		 * round up to the next power of 2
 		 */
-		V_ip6_output_flowtable_size = 1 << fls((1024 + maxusers * 64)-1);
+		V_ip6_output_flowtable_size = 1 << fls((1024 + maxbikesheds * 64)-1);
 	}
 	V_ip6_ft = flowtable_alloc("ipv6", V_ip6_output_flowtable_size, FL_IPV6|FL_PCPU);
 #endif	
Index: head/sys/conf/makeLINT.sed
===================================================================
--- head/sys/conf/makeLINT.sed	(Sat Nov  3 18:21:32 2012)
+++ head/sys/conf/makeLINT.sed	(Sat Nov  3 18:21:40 2012)
@@ -1,7 +1,7 @@
 #!/usr/bin/sed -E -n -f
 # $FreeBSD$
 
-/^(machine|files|ident|(no)?device|(no)?makeoption(s)?|(no)?option(s)?|profile|cpu|maxusers)[[:space:]]/ {
+/^(machine|files|ident|(no)?device|(no)?makeoption(s)?|(no)?option(s)?|profile|cpu|maxbikesheds)[[:space:]]/ {
     s/[[:space:]]*#.*$//
     p
 }
Index: head/sys/conf/options
===================================================================
--- head/sys/conf/options	(Sat Nov  3 18:21:32 2012)
+++ head/sys/conf/options	(Sat Nov  3 18:21:40 2012)
@@ -289,7 +289,7 @@
 NSFBUFS		opt_param.h
 VM_BCACHE_SIZE_MAX	opt_param.h
 VM_SWZONE_SIZE_MAX	opt_param.h
-MAXUSERS
+MAXBIKESHEDS
 DFLDSIZ		opt_param.h
 MAXDSIZ		opt_param.h
 MAXSSIZ		opt_param.h
Index: head/sys/conf/NOTES
===================================================================
--- head/sys/conf/NOTES	(Sat Nov  3 18:21:32 2012)
+++ head/sys/conf/NOTES	(Sat Nov  3 18:21:40 2012)
@@ -2,7 +2,7 @@
 #
 # NOTES -- Lines that can be cut/pasted into kernel and hints configs.
 #
-# Lines that begin with 'device', 'options', 'machine', 'ident', 'maxusers',
+# Lines that begin with 'device', 'options', 'machine', 'ident', 'maxbikesheds',
 # 'makeoptions', 'hints', etc. go into the kernel configuration that you
 # run config(8) with.
 #
@@ -43,12 +43,12 @@
 ident		LINT
 
 #
-# The `maxusers' parameter controls the static sizing of a number of
+# The `maxbikesheds' parameter controls the static sizing of a number of
 # internal system tables by a formula defined in subr_param.c.
 # Omitting this parameter or setting it to 0 will cause the system to
 # auto-size based on physical memory.
 #
-maxusers	10
+maxbikesheds	10
 
 # To statically compile in device wiring instead of /boot/device.hints
 #hints		"LINT.hints"		# Default places to look for devices.
@@ -2615,7 +2615,7 @@
 
 # Set the number of sf_bufs to allocate. sf_bufs are virtual buffers
 # for sendfile(2) that are used to map file VM pages, and normally
-# default to a quantity that is roughly 16*MAXUSERS+512. You would
+# default to a quantity that is roughly 16*MAXBIKESHEDS+512. You would
 # typically want about 4 of these for each simultaneous file send.
 #
 options 	NSFBUFS=1024
Index: head/sys/net/flowtable.c
===================================================================
--- head/sys/net/flowtable.c	(Sat Nov  3 18:21:32 2012)
+++ head/sys/net/flowtable.c	(Sat Nov  3 18:21:40 2012)
@@ -1607,7 +1607,7 @@
 flowtable_init_vnet(const void *unused __unused)
 {
 
-	V_flowtable_nmbflows = 1024 + maxusers * 64 * mp_ncpus;
+	V_flowtable_nmbflows = 1024 + maxbikesheds * 64 * mp_ncpus;
 	V_flow_ipv4_zone = uma_zcreate("ip4flow", sizeof(struct flentry_v4),
 	    NULL, NULL, NULL, NULL, 64, UMA_ZONE_MAXBUCKET);
 	V_flow_ipv6_zone = uma_zcreate("ip6flow", sizeof(struct flentry_v6),
Index: head/sys/kern/kern_mib.c
===================================================================
--- head/sys/kern/kern_mib.c	(Sat Nov  3 18:21:32 2012)
+++ head/sys/kern/kern_mib.c	(Sat Nov  3 18:21:40 2012)
@@ -115,8 +115,8 @@
 SYSCTL_INT(_kern, KERN_MAXPROCPERUID, maxprocperuid, CTLFLAG_RW,
     &maxprocperuid, 0, "Maximum processes allowed per userid");
 
-SYSCTL_INT(_kern, OID_AUTO, maxusers, CTLFLAG_RDTUN,
-    &maxusers, 0, "Hint for kernel tuning");
+SYSCTL_INT(_kern, OID_AUTO, maxbikesheds, CTLFLAG_RDTUN,
+    &maxbikesheds, 0, "Hint for kernel tuning");
 
 SYSCTL_INT(_kern, KERN_ARGMAX, argmax, CTLFLAG_RD|CTLFLAG_CAPRD,
     0, ARG_MAX, "Maximum bytes of argument to execve(2)");
Index: head/sys/kern/subr_param.c
===================================================================
--- head/sys/kern/subr_param.c	(Sat Nov  3 18:21:32 2012)
+++ head/sys/kern/subr_param.c	(Sat Nov  3 18:21:40 2012)
@@ -39,7 +39,7 @@
 
 #include "opt_param.h"
 #include "opt_msgbuf.h"
-#include "opt_maxusers.h"
+#include "opt_maxbikesheds.h"
 
 #include <head/sys/param.h>
 #include <head/sys/systm.h>
@@ -71,7 +71,7 @@
 #    define	HZ_VM HZ
 #  endif
 #endif
-#define	NPROC (20 + 16 * maxusers)
+#define	NPROC (20 + 16 * maxbikesheds)
 #ifndef NBUF
 #define NBUF 0
 #endif
@@ -83,7 +83,7 @@
 
 int	hz;
 int	tick;
-int	maxusers;			/* base tunable */
+int	maxbikesheds;			/* base tunable */
 int	maxproc;			/* maximum # of processes */
 int	maxprocperuid;			/* max # of procs per user */
 int	maxfiles;			/* sys. wide open files limit */
@@ -272,27 +272,27 @@
 {
 
 	/* Base parameters */
-	maxusers = MAXUSERS;
-	TUNABLE_INT_FETCH("kern.maxusers", &maxusers);
-	if (maxusers == 0) {
-		maxusers = physpages / (2 * 1024 * 1024 / PAGE_SIZE);
-		if (maxusers < 32)
-			maxusers = 32;
+	maxbikesheds = MAXBIKESHEDS;
+	TUNABLE_INT_FETCH("kern.maxbikesheds", &maxbikesheds);
+	if (maxbikesheds == 0) {
+		maxbikesheds = physpages / (2 * 1024 * 1024 / PAGE_SIZE);
+		if (maxbikesheds < 32)
+			maxbikesheds = 32;
 		/*
-		 * Clips maxusers to 384 on machines with <= 4GB RAM or 32bit.
+		 * Clips maxbikesheds to 384 on machines with <= 4GB RAM or 32bit.
 		 * Scales it down 6x for large memory machines.
 		 */
-		if (maxusers > 384) {
+		if (maxbikesheds > 384) {
 			if (sizeof(void *) <= 4)
-			    maxusers = 384;
+			    maxbikesheds = 384;
 			else
-			    maxusers = 384 + ((maxusers - 384) / 6);
+			    maxbikesheds = 384 + ((maxbikesheds - 384) / 6);
 		}
 	}
 
 	/*
 	 * The following can be overridden after boot via sysctl.  Note:
-	 * unless overriden, these macros are ultimately based on maxusers.
+	 * unless overriden, these macros are ultimately based on maxbikesheds.
 	 */
 	maxproc = NPROC;
 	TUNABLE_INT_FETCH("kern.maxproc", &maxproc);
Index: head/sys/kern/kern_mbuf.c
===================================================================
--- head/sys/kern/kern_mbuf.c	(Sat Nov  3 18:21:32 2012)
+++ head/sys/kern/kern_mbuf.c	(Sat Nov  3 18:21:40 2012)
@@ -114,7 +114,7 @@
 	/* This has to be done before VM init. */
 	TUNABLE_INT_FETCH("kern.ipc.nmbclusters", &nmbclusters);
 	if (nmbclusters == 0)
-		nmbclusters = 1024 + maxusers * 64;
+		nmbclusters = 1024 + maxbikesheds * 64;
 
 	TUNABLE_INT_FETCH("kern.ipc.nmbjumbop", &nmbjumbop);
 	if (nmbjumbop == 0)
Index: head/sys/mips/conf/RT305X
===================================================================
--- head/sys/mips/conf/RT305X	(Sat Nov  3 18:21:32 2012)
+++ head/sys/mips/conf/RT305X	(Sat Nov  3 18:21:40 2012)
@@ -72,7 +72,7 @@
 
 # Options for making kernel less hangry
 makeoptions	INLINE_LIMIT=1024
-options		MAXUSERS=3
+options		MAXBIKESHEDS=3
 options		MAXFILES=512
 options		NSFBUFS=256
 options		SHMALL=128
Index: head/sys/mips/mips/vm_machdep.c
===================================================================
--- head/sys/mips/mips/vm_machdep.c	(Sat Nov  3 18:21:32 2012)
+++ head/sys/mips/mips/vm_machdep.c	(Sat Nov  3 18:21:40 2012)
@@ -80,7 +80,7 @@
 #include <head/sys/sf_buf.h>
 
 #ifndef NSFBUFS
-#define	NSFBUFS		(512 + maxusers * 16)
+#define	NSFBUFS		(512 + maxbikesheds * 16)
 #endif
 
 #ifndef __mips_n64



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