Re: udev is too slow creating devices

From: Marc Ballarin
Date: Tue Sep 14 2004 - 17:23:53 EST


On Tue, 14 Sep 2004 22:43:41 +0200
"Giacomo A. Catenazzi" <cate@xxxxxxxxxxxx> wrote:

>
> After a brief discussion with debian udev maintainer, I've an
> other proposal/opinion.
>
> The "bug" appear only in two places: at udev start and after
> a modprobe, so IMHO we should correct these two place, so that:

This cannot be fixed easily and there would be little gain but great
risks. For example, I have a device where reading partition tables can
take up to two seconds. Other devices could be broken and modprobe would
never return. This would effectively freeze the system when it happens in
boot scripts.

> - from a user side perspective it is the right thing!
> (after a successful modprobe, I expect module and devices
> are created sussesfully)

This assumption is wrong, even with a completely static /dev.
Common example:
modprobe usb-storage / ppa / whatever
Now, for any reason the kernel is unable to read the partition table.
The script tries to access /dev/sda1 => boom
In fact, udev is even an improvement here. Instead of checking the device
node repeatedly you simply wait for udev to call you. When it does you can
be sure that the device node exists and is valid.

> Else every distribution should create a script for
> every init.d script that would eventually use (also
> indirectly) a kernel module.

Why not? This is the best way to achieve true and reliable hotplug
support.

Regards
-
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/