From owner-freebsd-hackers Fri Dec 17 14:32:51 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from overcee.netplex.com.au (overcee.netplex.com.au [202.12.86.7]) by hub.freebsd.org (Postfix) with ESMTP id D41C11514D; Fri, 17 Dec 1999 14:32:42 -0800 (PST) (envelope-from peter@netplex.com.au) Received: from netplex.com.au (localhost [127.0.0.1]) by overcee.netplex.com.au (Postfix) with ESMTP id DED231CA0; Sat, 18 Dec 1999 06:32:23 +0800 (WST) (envelope-from peter@netplex.com.au) X-Mailer: exmh version 2.1.1 10/15/1999 To: Andrzej Bialecki Cc: adsharma@sharmas.dhs.org, hackers@freebsd.org, msmith@freebsd.org Subject: Re: Dynamic sysctls (Re: Per CPU timekeeping for SMP) In-Reply-To: Message from Andrzej Bialecki of "Fri, 17 Dec 1999 23:23:22 +0100." Date: Sat, 18 Dec 1999 06:32:23 +0800 From: Peter Wemm Message-Id: <19991217223223.DED231CA0@overcee.netplex.com.au> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Andrzej Bialecki wrote: > On Fri, 17 Dec 1999, Arun Sharma wrote: > > > I have also figured out how to dynamically register sysctl nodes. > > The trick is to basically malloc a sysctl_oid and fill in the right > > fields and calling sysctl_register_oid. The code is in a kernel > > module available from: > > > > http://sharmas.dhs.org/~adsharma/projects/freebsd/sysctl.tar.gz > > > > It really needs to go into the base kernel. Also, I think > > sysctl_register_long and its yet to be written friends (register_int) > > etc, need to go into kern_sysctl - so that others can reuse the code > > to dynamically create sysctl nodes. > > I was thinking exactly about the same, and I was going to implement them > myself... IMO these patches should go to the tree - without them the work > that Mike Smith put into sysctl infrastructure is much less useful for > average Joe Kernel Hacker... Err.. That was Doug Rabson (dfr) who fixed the sysctl stuff to finish making it dynamic. sysctl_register_xxx() are wrappers around sysctl_register_oid(), but I guess it's ok to make some helper functions to make the existing functionality to make it easier to use. Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message