On Tuesday 03 June 2008 17:58, Denys Vlasenko wrote:
> On Tuesday 03 June 2008 16:44, Bernard Blackham wrote:
> > Hi,
> > 
> > When I switched from udev+udevd to mdev, booting was much faster and it 
> > shaved a decent amount from the total image size. However, I've recently 
> > noticed device nodes sometimes disappearing on boot. The specific 
> > scenario is:
> > 
> > 1. /dev/ttyS1 exists as a device node in the filesystem on boot - prior 
> > to the actual device existing, and prior to mdev being called.
> > 
> > 2. echo /bin/mdev > /proc/sys/kernel/hotplug
> > 
> > 3. a module is loaded that provides ttyS1
> > 
> > When this module is loaded, most of the time the existing ttyS1 remains. 
> > Sometimes however, it is unlinked from the filesystem and is never seen 
> > again (until mdev -s is run, or next boot, maybe).
> > 
> > I pointed my hotplug to a script to log what mdev was being called as, 
> > and found that when the module is loaded, there is actually a remove 
> > event emitted followed by an add event. As there is no locking with 
> > mdev, sometimes mdev runs the remove after the add and thus the device 
> > node goes missing.
> > 
> > udev seems to have gotten around this using a daemon that serialises 
> > events based on the sequence number provided by the kernel.

Latest udev I have seems to use netlink.

>From older udev-030:

        subsystem = get_subsystem(argv[1]);
        if (subsystem == NULL) {
                dbg("no subsystem");
                goto exit;
        }
        dbg("subsystem = '%s'", subsystem);

        devpath = get_devpath();
        if (devpath == NULL) {
                dbg("no devpath");
                goto exit;
        }
        dbg("DEVPATH = '%s'", devpath);

        action = get_action();
        if (action == NULL) {
                dbg("no action");
                goto exit;
        }
        dbg("ACTION = '%s'", action);

        seqnum = get_seqnum();
        if (seqnum == NULL)
                seq = -1;
        else
                seq = atoi(seqnum);
        dbg("SEQNUM = '%d'", seq);

You did some debugging and I suspect you can answer this:
is SEQNUM per DEVPATH or is it global? Is there events without SEQNUM at all?
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to