Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Jul 1998 20:22:15 +0100 (BST)
From:      Doug Rabson <dfr@nlsystems.com>
To:        wjw@IAEhv.nl
Cc:        hackers@FreeBSD.ORG
Subject:   Re: SYSCTL .......
Message-ID:  <Pine.BSF.3.95q.980723201459.349E-100000@herring.nlsystems.com>
In-Reply-To: <199807231057.MAA10857@surf.IAE.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 23 Jul 1998, Willem Jan  Withagen wrote:

> Hi,
> 
> I was working on variant links .......
> Then I needed to expand the sysctl-naming space ......
> So I started looking into how to do that dynamicly ......
> 
> Turns out most of it is created by hardcoded structed which are
> joined in what I consider a gruesome hack with linker-sets.

The linker-set thing is certainly hard to understand but it does work very
well for statically configured data.  The linker does all the work of
building the tree.  As you have noticed, adding data dynamically is a
challenge.

> 
> I've already started thinking on what I would have build.
> (and actually started desiging some of the code)
> Until I just dicsussed some of the issues with some people here.
> 
> And one of the questions is:
> 
> 	Why did Mike Karels create such a difficult way of doing this?

I believe that Poul Henning did the linker set thing.  The original 4.4
code was even harder to extend...

> 
> There has to be a reason for it! What I did has some complexity in it, but
> it does require a PD to come up with a decend structure.
> 
> Or question:
> 	Are other people looking into this?
> 	How far are they?
> 	Am I free to redo the sysctl stuff as long as I can create
> 	a glue function between the old and new systemcall?

I have been avoiding doing this bit of work for literally years ;-).
I will be happy to review any code which you produce.

> 
> And the most important:
> 	Any body with suggestions and/or pitfalls to avoid?

Last time I was daydreaming about sysctl, I thought that using SYSINIT
functions to build the tree would be a good idea.  This would have the
benefit of trivially adding in sysctl variables in kernel modules loaded
using KLD since it runs SYSINITs in the loaded modules.  To support
unloading modules, a method of automatically disconnecting variables
defined by the module is needed. 

--
Doug Rabson				Mail:  dfr@nlsystems.com
Nonlinear Systems Ltd.			Phone: +44 181 951 1891
					Fax:   +44 181 381 1039


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95q.980723201459.349E-100000>