Re: Modularize kernel



On Sat, 9 Sep 2006, Howard Su wrote:

On 9/9/06, Robert Watson <rwatson@xxxxxxxxxxx> wrote:

On Fri, 8 Sep 2006, M. Warner Losh wrote:

One of the biggest concerns I have with moving towards a heavily modularized default kernel is that we may find we need to explore improving our automatic loading of modules. For example, if we want to de-populate the base kernel with respect to device drivers, which take up quite a lot of space, we'll want to look both at how to handle early boot, and later loading if hardware turns up -- issues we've largely avoided by virtue of compiling them in. We may, for example, want to look at Apple's approach of loading all the available modules sequentially early in the boot to see what attachs, unload the idle modules, and then provide demand loading later.

How about you can add one entry into TODO list with some clarification to encourage some volunteers to work on it.

I think that coming up with a more clear tasking is important before this go on the todo list. I've noticed that often patches turn up for TODO list items that capture the literal intent of the item, but sometimes not the spirit, which has the effect of discouraging everyone involved when it doesn't get quickly committed, and/or requires significant reworking. There are some tricky architectural issues here precisely because we presumably want to end up with something fairly clean and intuitive, rather than something baroque and obscure. If we get this wrong, we make life harder for everyone. :-)

I'm not sure I have a clear understanding of the requirements from the device driver side -- on the general service side, it's fairly straight forward because you simply say "If you want this service, load this module", or in the case of management tools, the module is loaded on demand by the management tool. This works well because the model is basically driven from user space already. The driver problem is trickier because it interacts with the early boot, before there is a user space, because it's driven by hardware-originated events, and because the model for determing what module to load isn't well-defined in the general case. Apple has a model that stores device information in parseable XML associated with the driver, which helps their kext management daemon decide what to load in order to attach a recently discovered device. They also have a module reference count model that allows them to easily load a pile of drivers, then tell all the ones that never attached to anything to unload. Perhaps Warner and others can speak more to whether something like this makes sense for us, or how similar notions might map into what we have today.

Robert N M Watson
Computer Laboratory
University of Cambridge
_______________________________________________
freebsd-arch@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Vista update not working
    ... any ideas before I reformat and start loading all over again. ... I am running 2 hard drivers in a raid 0 stripping, when I load Vista it ... driver but when I go to load it I get error code 80070103. ... Now this would not be a problem but everytime I boot windows it wants ...
    (microsoft.public.windowsupdate)
  • Re: [ALSA 1/2] continue on IS_ERR from platform device registration
    ... loading when no devices are found at loading time. ... A platform device on the other hand only "exists" by virtue of a driver creating it because it might want to drive it. ... If we keep it registered even after failing a probe, then /sys/devices/platform turns into a view of "what drivers did we load" rather then "what's present in this system". ...
    (Linux-Kernel)
  • [ALSA] 2.6.21 loading of module snd_ymfpci takes 2 minutes
    ... computer had halted after loading snd_ymfpci, but what happens is that it ... driver I decided to replace the ymfpci_main.c from 2.6.21 with the one from ... These are the messages I get from the kernel when I load the driver: ... This is the info I got for the sound card, ...
    (Linux-Kernel)
  • Re: Load hid.o module synchronously?
    ... > What I want is to load a driver and not proceed until it has finished ... It also would not allow you to bind a driver to a device while the ... > 1) Loading hid.o to talk to the keyboard, ... Run your dhcp connect script after the device is bound to the driver ...
    (Linux-Kernel)
  • Re: Stop Error IRQL_NOT_LESS_OR_EQUAL (0xA)
    ... > Having no trouble with any other programs load. ... which specific driver is causing the following error message: ... Device drivers that statically allocate either the IO_WORKITEM structure or ...
    (microsoft.public.win2000.hardware)