From owner-freebsd-current Tue Apr 24 12:25:12 2001 Delivered-To: freebsd-current@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 6846B37B423 for ; Tue, 24 Apr 2001 12:25:09 -0700 (PDT) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id f3OJP8N12392; Tue, 24 Apr 2001 12:25:08 -0700 (PDT) Date: Tue, 24 Apr 2001 12:25:08 -0700 From: Alfred Perlstein To: Terry Lambert Cc: current@FreeBSD.ORG, terry@lambert.org Subject: Re: PATCH to make maxfiles, maxfiles per proc boot-time tunable Message-ID: <20010424122508.U1790@fw.wintelcom.net> References: <200104241859.LAA02506@usr08.primenet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200104241859.LAA02506@usr08.primenet.com>; from tlambert@primenet.com on Tue, Apr 24, 2001 at 06:59:38PM +0000 X-all-your-base: are belong to us. Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Terry Lambert [010424 11:59] wrote: > It seems to me that these things are not boot-time tunable, and > should be (really, they should be runtime tunable, but there > are some nasty pageable region allocations for networking that > appear to require contiguous regions for no good reason which I > can discern). That means that the best we can do right now is > boot-time, so here it is: This looks good except that ncallout is still based on MAXFILES, without this being fixed I think people might get bitten by raising the tuneable too high then being unable to allocate enough callouts. Can you take a look at this and make sure there's nothing else using MAXFILES like that? > > > -------------------------------------------------------------------------- > Index: conf/param.c > =================================================================== > RCS file: /home/cvs/local_repo/FreeBSD/sys.releng4/conf/param.c,v > retrieving revision 1.1.1.1 > diff -c -r1.1.1.1 param.c > *** conf/param.c 2001/03/21 00:50:42 1.1.1.1 > --- conf/param.c 2001/04/19 20:57:59 > *************** > *** 44,49 **** > --- 44,51 ---- > #include "opt_param.h" > > #include > + #include /* getenv_int */ > + #include /* TUNABLE_INT_DECL */ > > /* > * System parameter formulae. > *************** > *** 67,74 **** > #endif > int maxproc = NPROC; /* maximum # of processes */ > int maxprocperuid = NPROC-1; /* maximum # of processes per user */ > ! int maxfiles = MAXFILES; /* system wide open files limit */ > ! int maxfilesperproc = MAXFILES; /* per-process open files limit */ > int ncallout = 16 + NPROC + MAXFILES; /* maximum # of timer events */ > int mbuf_wait = 32; /* mbuf sleep time in ticks */ > > --- 69,78 ---- > #endif > int maxproc = NPROC; /* maximum # of processes */ > int maxprocperuid = NPROC-1; /* maximum # of processes per user */ > ! int maxfiles = 0; /* system wide open files limit */ > ! TUNABLE_INT_DECL("kern.maxfiles", MAXFILES, maxfiles); > ! int maxfilesperproc = 0; /* per-process open files limit */ > ! TUNABLE_INT_DECL("kern.maxfilesperproc", MAXFILES, maxfilesperproc); > int ncallout = 16 + NPROC + MAXFILES; /* maximum # of timer events */ > int mbuf_wait = 32; /* mbuf sleep time in ticks */ > > -------------------------------------------------------------------------- > > > Terry Lambert > terry@lambert.org > --- > Any opinions in this posting are my own and not those of my present > or previous employers. > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message -- -Alfred Perlstein - [alfred@freebsd.org] Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message