devfs vs udev/hotplug

Matthew Dillon dillon at apollo.backplane.com
Thu Apr 22 10:31:06 PDT 2004


: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).

					-Matt
					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>





More information about the Kernel mailing list