From owner-freebsd-arch Mon Jan 15 10:38:16 2001 Delivered-To: freebsd-arch@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 9B4B937B402; Mon, 15 Jan 2001 10:37:57 -0800 (PST) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id f0FIbvh11454; Mon, 15 Jan 2001 10:37:57 -0800 (PST) Date: Mon, 15 Jan 2001 10:37:57 -0800 From: Alfred Perlstein To: Hajimu UMEMOTO Cc: arch@FreeBSD.org Subject: dynamic vs static sysctls? Message-ID: <20010115103757.B7240@fw.wintelcom.net> References: <20010116.025742.74757685.ume@FreeBSD.org> <20010115100618.Y7240@fw.wintelcom.net> <20010116.033215.41625863.ume@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010116.033215.41625863.ume@FreeBSD.org>; from ume@FreeBSD.org on Tue, Jan 16, 2001 at 03:32:15AM +0900 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [moved to -arch] * Hajimu UMEMOTO [010115 10:33] wrote: > Hi, > > >>>>> On Mon, 15 Jan 2001 10:06:18 -0800 > >>>>> Alfred Perlstein said: > > bright> * Hajimu UMEMOTO [010115 10:00] wrote: > > Hi, > > > > I wish to obtain number of processes forked since boot from userland. > > So, I made a patch to intend to commit. > > Any comment? > > bright> Why not just use a dynamic sysctl for this? > > I think dynamic sysctl is useful for dynamic context. But, here is > just static and it seems there is no advantage. Isn't it? Well all the sysctl's I've added have been dynamic, I think the only reason for the 'static' sysctls is to give sysctl() a numeric way to get at the sysctls, which isn't very useful when we have getsysctlbyname(). Using a dynamic sysctl It would reduce the delta by quite a bit. The stuff your patch does seems to allow programs to use the old (IMHO) depricated sysctl() versus getsysctlbyname() function. No one I know wants to use sysctl instead of getsysctlbyname afaik, however, I would like to know if my opinions are the what we're aiming for. Any other comments? Besideds the way the sysctl is done, the change is pretty nice to see, but will need mplocking later. -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message