From owner-freebsd-current Tue Apr 24 12:58:56 2001 Delivered-To: freebsd-current@freebsd.org Received: from meow.osd.bsdi.com (meow.osd.bsdi.com [204.216.28.88]) by hub.freebsd.org (Postfix) with ESMTP id 41F3F37B422 for ; Tue, 24 Apr 2001 12:58:50 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: from laptop.baldwin.cx (john@jhb-laptop.osd.bsdi.com [204.216.28.241]) by meow.osd.bsdi.com (8.11.2/8.11.2) with ESMTP id f3OJwfG73008; Tue, 24 Apr 2001 12:58:41 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200104241859.LAA02506@usr08.primenet.com> Date: Tue, 24 Apr 2001 12:58:03 -0700 (PDT) From: John Baldwin To: Terry Lambert Subject: RE: PATCH to make maxfiles, maxfiles per proc boot-time tunable Cc: terry@lambert.org, current@FreeBSD.org Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 24-Apr-01 Terry Lambert 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: > > > -------------------------------------------------------------------------- > 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 */ Why assign them the value of 0? Why not just stick them in the BSS? The SI_SUB_TUNABLE checks will initialize them to a value anyways.. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message