From owner-freebsd-current@FreeBSD.ORG Sat Jul 5 03:01:57 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 729) id B56B437B401; Sat, 5 Jul 2003 03:01:57 -0700 (PDT) X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: John In-Reply-To: Your message of "Fri, 04 Jul 2003 11:36:22 -0400." <20030704153622.GA93986@BSDWins.Com> Mime-Version: 1.0 Content-Type: text/plain Message-Id: <20030705100157.B56B437B401@hub.freebsd.org> Date: Sat, 5 Jul 2003 03:01:57 -0700 (PDT) From: jkoshy@FreeBSD.ORG (Joseph Koshy) cc: freebsd-current@freebsd.org Subject: Re: [review request] New config.5 manual page X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jul 2003 10:01:58 -0000 > 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 Developer, The FreeBSD Project http://people.freebsd.org/~jkoshy/