DragonFly BSD
DragonFly kernel List (threaded) for 2004-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: devfs vs udev/hotplug

From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 22 Apr 2004 10:30:52 -0700 (PDT)

:There's one thing that devfs did and udev can't do (and it won't
:do because it's not its task; but there's not a replacement)
:With devfs you can "unload" (or not load at all) modules, so when
:a program try to access ej: a (already connected) USB stick
:devfs loads its module and all works. udev however relies on
:all modules being loaded; if a module isn't loaded and a 
:program try to access that usb stick it will fail because
:nobody will load the module (and hence udev will not create
:the device node). This seems to be important on embedded
:devices where memory is a precious resource and you wouldn't
:want to load all the modules at the same time to save a few
:KB of mem.
:How would solve this the (future) Dragonfly's VFS model?

    Well, I see no reason why the appropriate module could not
    be loaded e.g. by usbd or udev when the device is detected.
    Why wait for initial access?  In fact, it could be argued that
    the module should probably be loaded at detection time rather
    then on initial access because there are many things that can
    trigger an access and you have a more deterministic system 
    when you load at detection time.

    Generally speaking, there's also nothing wrong with preloading
    modules.   Modules are simply a convenience that allows you to 
    avoid having to compile them into the kernel and reboot your system
    every time you add something new.  They were never designed to be 
    dynamic entities (or if they were, it's a very bad design).

					Matthew Dillon 

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]