Date: Sat, 5 Jul 2003 03:01:57 -0700 (PDT) From: jkoshy@FreeBSD.ORG (Joseph Koshy) To: John <jwd@freebsd.org> Cc: freebsd-current@freebsd.org Subject: Re: [review request] New config.5 manual page Message-ID: <20030705100157.B56B437B401@hub.freebsd.org> In-Reply-To: Your message of "Fri, 04 Jul 2003 11:36:22 -0400." <20030704153622.GA93986@BSDWins.Com>
next in thread | previous in thread | raw e-mail | index | archive | help
> placed on the value should be similar/identical. Any differences in the
> way the value is treated should be well documented (or fixed). As we
> move into larger memory systems our current limitations need to be either
> removed or increased.
Yes, you are right. It doesn't make sense to restrict the value of maxusers
at configuration time, when the kernel can be configured to use larger values
at boot time.
I think it makes sense to remove the maximum bound on a statically
configured 'maxusers' value. The lower bound could be retained
as a sanity check.
Something like this?
Index: mkoptions.c
===================================================================
RCS file: /cvs/FreeBSD/src/usr.sbin/config/mkoptions.c,v
retrieving revision 1.30
diff -u -r1.30 mkoptions.c
--- mkoptions.c 15 Feb 2003 02:26:13 -0000 1.30
+++ mkoptions.c 5 Jul 2003 04:42:44 -0000
@@ -52,11 +52,7 @@
#include "config.h"
#include "y.tab.h"
-static struct users {
- int u_default;
- int u_min;
- int u_max;
-} users= { 8, 2, 512 };
+#define U_MIN 2
static char *lower(char *);
static void read_options(void);
@@ -79,13 +75,10 @@
SLIST_INSERT_HEAD(&opt, op, op_next);
}
- if (maxusers == 0) {
- /* printf("maxusers not specified; will auto-size\n"); */
- } else if (maxusers < users.u_min) {
- printf("minimum of %d maxusers assumed\n", users.u_min);
- maxusers = users.u_min;
- } else if (maxusers > users.u_max)
- printf("warning: maxusers > %d (%d)\n", users.u_max, maxusers);
+ if (maxusers && maxusers < U_MIN) {
+ printf("minimum of %d maxusers assumed\n", U_MIN);
+ maxusers = U_MIN;
+ }
/* Fake MAXUSERS as an option. */
op = (struct opt *)malloc(sizeof(*op));
--
Joseph Koshy <jkoshy@freebsd.org>
Developer, The FreeBSD Project http://people.freebsd.org/~jkoshy/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030705100157.B56B437B401>
