Subject: Re: Replacing the sysctl() interface.
To: None <itojun@iijlab.net>
From: Chris G. Demetriou <cgd@sibyte.com>
List: tech-kern
Date: 06/05/2000 09:29:25
itojun@iijlab.net writes:
> 	I really don't like the way freebsd did about malloc types, sysctls
> 	and kernel internal initialization ordering (based on special
> 	linker symbol).  it is too hard to track down mistakes in those
> 	declarations.

ordering based on 'special linker symbol' sounds ... special.
however, it seems reasonable to try to do it based on .init-like
sections.

note that, in general, requiring ordering in .init/CTORs which you
don't actually enforce yourself is ... likely to cause much trouble.

I don't necessarily think we should be trying to solve some horrible
dependency problem this way...  just providing a mechanism for e.g. a
bunch of system things to add themselves to global tables.


>       I wasted enough time debugging linker hack mistakes.
> 	I give my vote to current netbsd way than freebsd way.

So, FWIW, like i said, I've actually had people (researchers) express
to me that the fact that, in their opinion, having to hand-add things
to existing tables, and then maintain them over time as other things
got added to those tables and cause conflicts, was much more of a pain
than it had to be.


in general, this goes slightly further: what do we do if a third party
creating a kernel module or drop in driver .o decides that they _do_
need or want a new malloc type for their code?  (It's a perfectly
reasonable thing to want ... else why would there be so many in the
existing code 8-)  "they lose."



cgd