Re: udev is too slow creating devices

From: Chris Meadors
Date: Tue Sep 14 2004 - 14:41:32 EST


On Tue, 2004-09-14 at 20:33 +0200, Giacomo A. Catenazzi wrote:
> Hello people!
>
> When I load a module (with modprobe) the relative device is too
> slowly created with udev, so modprobe return before the device
> is really created. Because of this my init.d script will
> fail with modular microcode + udev
>
> test case:
>
> udev + modular microcode:
> $ modprobe -r microcode
> $ modprobe microcode ; microcode_ctl -u
> => microcode_ctl does NOT find the device
>
> $ modprobe -r microcode
> $ modprobe microcode ; sleep 3; microcode_ctl -u
> => microcode_ctl FIND the device
>
> [without udev it is OK, so I assume no errors
> in modprobe]
>
> Is it a bug of udev?
> Else what workaround I can use? (sleep is to slow for
> an already to sloow system initialitation)

I don't know of a proper fix, but a better work around would be to
use...

while [ ! -c /dev/cpu/microcode ]; do sleep 0; done

...in place of your "sleep 3". Replacing the /dev/cpu/microcode with
the actual character device that microcode_ctl is looking for.

--
Chris

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/