Date: Tue, 5 Feb 2002 18:54:45 -0500 (EST) From: Robert Watson <rwatson@FreeBSD.ORG> To: Matthew Dillon <dillon@apollo.backplane.com> Cc: "M. Warner Losh" <imp@village.org>, mike@FreeBSD.ORG, cjclark@alum.mit.edu, freebsd-arch@FreeBSD.ORG Subject: Re: Setting sysctl(8)'s in rc.conf Message-ID: <Pine.NEB.3.96L.1020205185411.67775A-100000@fledge.watson.org> In-Reply-To: <200202052147.g15LlAM30476@apollo.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Sounds good to me. I really meant to ask you about that when you originally did the auto-tuning, but it apparently skipped my mind. Robert N M Watson FreeBSD Core Team, TrustedBSD Project robert@fledge.watson.org NAI Labs, Safeport Network Services On Tue, 5 Feb 2002, Matthew Dillon wrote: > > :We also need to fix setting sysctl variables late in the boot process, > :maybe after modules have been loaded early in the process. I've > :punted on doing this right becuase of the bikeshed around the name for > :/etc/sysctl.conf's companion that would be done late in the process... > : > :Warner > > It occurs to me that somebody might try to set the boot-time tunable > kern.maxusers to 0, a case I do not currently handle. Right now I > only handle the kernel config's maxusers being set to 0. > > Perhaps something like the below is better. Comments? > > -Matt > Matthew Dillon > <dillon@backplane.com> > > Index: kern/subr_param.c > =================================================================== > RCS file: /home/ncvs/src/sys/kern/subr_param.c,v > retrieving revision 1.51 > diff -u -r1.51 subr_param.c > --- kern/subr_param.c 25 Jan 2002 01:54:16 -0000 1.51 > +++ kern/subr_param.c 5 Feb 2002 21:45:51 -0000 > @@ -133,14 +133,15 @@ > { > > /* Base parameters */ > - if ((maxusers = MAXUSERS) == 0) { > + maxusers = MAXUSERS; > + TUNABLE_INT_FETCH("kern.maxusers", &maxusers); > + if (maxusers == 0) { > maxusers = physpages / (2 * 1024 * 1024 / PAGE_SIZE); > if (maxusers < 32) > maxusers = 32; > if (maxusers > 384) > maxusers = 384; > } > - TUNABLE_INT_FETCH("kern.maxusers", &maxusers); > > /* > * The following can be overridden after boot via sysctl. Note: > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-arch" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1020205185411.67775A-100000>