About two years ago, there was some talk on the Busybox mailing-list
about the need for a version of "mdev" that would not use a separate
process for every uevent (as a hotplug manager does) but that would act
as a daemon, able to handle a series of uevents - typically read from
the netlink.
 One of the goals of such a program was to reduce boot time on slow /
resource-constrained devices that don't like creating hundreds of
processes at the same time - especially when they contend for a
sequence number.

 I took a quick look at the time, but came to the conclusion that the
way mdev was coded made it very difficult. Basically, mdev gets its
uevent variables from the environment, then reads and processes its
config file, performing actions as it goes. A quick hack to add
"daemon mode" support to mdev would still make it process the config
file for every event, similarly to what "mdev -s" does; this would
remove the forks but still be pretty inefficient, not to mention
particularly ugly. To implement "daemon mode mdev" in a clean way, a
full rewrite was needed. So I shelved the idea at the time.

 Until now.
 mdevd is an uevent manager reading a sequence of uevents and handling
them without forking, that understands the full /etc/mdev.conf format.

 "mdevd-coldplug | mdevd" is equivalent to "mdev -s".
 "mdevd-netlink | mdevd" is a daemon that listens to the netlink and
processes uevents sequentially, without the need for mdev.seq hacks
coming from the kernel spawning hotplug managers in parallel.

 You can find it here:


 Since it's a full rewrite with a very different architecture from mdev
and little code reusability with the rest of Busybox, it did not make
sense to include it in Busybox, which is why it's provided as a
separate package.

 Bug-reports welcome.
 mdevd is still considered beta for some functionality I could not
extensively test, such as firmware loading. If your setup uses firmware
loading or otherwise obscure mdev features, I'm especially interested
in your reports and/or comments. (mdevd comes with a dry run mode, so
you don't have to be a reckless cowboy to test it.)



Reply via email to