Subject: Re: A potential step towards modularisation
To: Christoph Hellwig <hch@infradead.org>
From: Pavel Cahyna <pcah8322@artax.karlin.mff.cuni.cz>
List: tech-kern
Date: 02/09/2004 18:59:14
Hello,

> 
> That's exactly how bus probing works in Linux.  Each driver registers an
> tables IDs it's interested in for further probing with the bus driver.
> 
> Of course this doesn't work if the driver is not loaded at all, so you
> have a few choices:
> 
> (a) always load all drivers by either compiling them statically into the
>     kernel or loading all modular drivers
>      + no userspace involvement
>      - wastes lots of memory

That's what we have in *BSD, and it works okay, but there is no
modularisation, so memory is wasted.

> 
> (b) load only the modules you have hardware for
>      + doesn't waste memory
>      - userspace needs to know what hardware exists
>      - requires manual intervention when adding new hardware

That's what I know from Linux 2.2 or 2.4 (unless everything is compiled
statically). As I said before, IMHO it sucks.

> 
> (c) kernel does a userspace upcall when new hardware is found
>      + doesn't waste memory
>      + works fine with later added hardware (even while the kernel
>        is running)
>      - needs good coordination between kernel and userland.

That, I would eventually expect from the new framework in NetBSD. I
don't know this from Linux (is this a 2.6 feature? On 2.4 it works only
for USB AFAIK.)

Bye	Pavel