mdev

Denys Vlasenko vda.linux at googlemail.com
Sun Apr 19 22:03:36 UTC 2009


On Sunday 19 April 2009 23:07, Rob Landley wrote:
> On Sunday 19 April 2009 15:28:52 Vladimir Dronnikov wrote:
> > When envvar matching is added to mdev, the line should be placed at
> > the top of mdev.conf:
> >
> > -$MODALIAS=.+ 0:0 660 @modprobe "$MODALIAS"

I think it should NOT have dash. Since device does not exist
yet (in a sense "we don't yet have maj:min for it"),
we can't create /dev/foo. So we (mdev-as-hotplug) spawn
modprobe, and exit. Later we'll get another hotplug event,
with */dev file, but without $MODALIAS.
Correct me if I'm wrong.

Coldplugging currently does not work. Since by now I understand
that it basically means iterating through /sys/devices/...
and echo-ing "add" into files named "modalias",
the question is whethen we want it to be done by "mdev -m"
or shell script is better.

Let's hear people from the trenches. How is current version
working for you, Vladimir, Natanael?

> > This line requires reading/parsing and should be put to matching for
> > any device. This is much slower than analyzing $MODALIAS in C. Do we
> > really need to slow things down?

(but it allows to match any evn var, it is more versatile)

I doubt it is measurable.

"mdev -s" rereading conf file *for every device* is far bigger
performance problem, and even that one is nearly not noticeable:
people report that "mdev -s" seems to be fast for them.
--
vda


More information about the busybox mailing list