On 12-Nov-2008, at 9:57 AM, Andrew Doran wrote:
The x86 GENERIC kernels have become bloated. The plan is to start moving much functionality out of the main binary and into kernel modules (new stylemodules, not LKMs).
I hope you mean "NetBSD GENERIC kernels" and that you don't have blinders on to ignore all the other platforms! x86 perhaps suffers more due to the abundance of x86-specific hardware & drivers, but this is a far more "generic" problem. If we are to have this kind of capability and tool then I would welcome seeing it ported to all NetBSD ports uniformly. :-)
The first component to be moved is POSIX semaphores. The GENERIC kernel no longer has the P1003_1B_SEMAPHORE option. If POSIX semaphores are used, the ksem kernel module will be automatically loaded. The same will happen forcompat code and other facilities as time goes by.
I too am concerned about bloat -- it would be ideal to be able to unload or not ever load drivers and other facilities for which there will never be a runtime use for and to do so without having to compile a complete kernel every time from scratch.
I am concerned however about the runtime loading of such modules -- I would much prefer to have some kind of option for this to be locked into a procedure that can only ever work at boot time.
Perhaps a compromise would be some security level / kauth flag which would disable further loading of modules in a reliable, sure and secure way.
On the other hand of course there are interesting possibilities here for runtime unloading and reloading of modules in order to achieve availability and reliability standards well beyond anything ever possible with traditional systems.
To build and install modules: cd src/sys/modules make make installI am open to ideas about how this can be automated either via the kernelmakefile, or build.sh.
This is one of the not-so-nice parts of how it all works on FreeBSD too. The more files that need to be updated and installed the more chance for mistakes and bad interactions.
Note that if you are configuring your own kernels you can do what you wish. Specifically, you don't need to use modules. Also note that modules do not need to match basic kernel compile options like DIAGNOSTIC/DEBUG/ LOCKDEBUG. If those options cause problems with modules it is a bug so please file aPR.
Yay! This is a very good thing! -- Greg A. Woods; Planix, Inc. <woods%planix.ca@localhost>
Description: This is a digitally signed message part