[PATCH] Bug #975

Rob Landley rob at landley.net
Tue Aug 22 23:48:13 UTC 2006


On Tuesday 22 August 2006 4:11 pm, Yann E. MORIN wrote:
> Natanael,
> All,
> 
> On Tuesday 22 August 2006 003, Natanael Copa wrote:
> > On Mon, 2006-08-21 at 23:10 +0200, Yann E. MORIN wrote:
> > > Bug #975 is about udev spawning multiple modprobes at cold-plugging-time 
(that
> > > is boot time). The problem occurs when two devices require the same 
module
> > > (eg. two or more same PCI cards, two or more same USB keys, etc...).
> > Does this affect mdev too? mdev -s?
> 
> I don't know, I haven't yet used mdev in BusyBox... :-/
> Rob, could you enlighten us on this topic, please?

Our mdev doesn't call modprobe.  (I believe that's what the diethotplug stuff 
Erik ported from Greg KH woulda done.  The code that's GPLv2 only and we have 
to work out the license for before merging?  It's on the todo heap.)

If a mdev.conf shellout calls modprobe they'd see the failure, but they 
currently have no way of aborting the create/delete.

> > How do you coldplug? 
> 
> My Debian etch simply uses a combination of udevtrigger (launches the 
coldplug
> handling) followed by a udevsettle (waits for the event queue to be empty).
> 
> > Would it affect if you coldplug like this?:
> > find /sys -name uevent | while read i ; do 
> >   echo "add" > $if ;
> Maybe: s/\$if/\$i/;
> > done
> 
> Don't know, I haven't got any BusyBox system doing coldplug right now...
> Again: Rob?

If you register mdev as /proc/sys/kernel/hotplug we get the hotplug events and 
we're called as /sbin/hotplug so you can do a "pidof mdev" to see when there 
are no more instances running.  (Although mdev -s just scans /sys to find 
devices and creates the ones it finds from one process, so this isn't the 
normal usage pattern.)

And somewhere I have a patch submitted to do the netlink stuff and if we 
really _need_ it I can dredge that up and add a config option.  But so far 
not a whole lot of "busybox on numa" demand has manifested itself, and 
calling /sbin/hotplug is plenty scalable outside of that.

> Regards,
> Yann E. MORIN.

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list