Subject: Re: foo_init()s in main() [was: CVS commit: src/sys]
To: Bill Studenmund <>
From: Martin Husemann <>
List: tech-kern
Date: 11/24/2005 00:41:59
On Wed, Nov 23, 2005 at 02:51:12PM -0800, Bill Studenmund wrote:
> My concern is that with some dependnecy orders, we can end
> up gobbling up a lot of kernel stack and blow it, whereas with another
> order order the exact same modules load with little stack.

I like the coded-dependency/init-at-first-use aproach. It also sounds
easy to implement without major changes in our tree, on a subsystem-
by-subsytem basis.

I don't think the kernel stack and unpredictable initialization call
stacks will be a big problem, since most initializations will happen
early at certain events

 - during outconfig (network driver attaches -> networking is initialized)
 - during certain syscalls (mount_msdos initializes msdos file system)

and it can be pushed even further - like having IPv6 in the kernel but
not initializing it untill the first IPv6 route is added (or interface
address assigned; which then would, of course, cause link local addresses
to pop up on all interfaces). I'm not sure we want to go there, but
the flexibility sounds like a good think to have.