Re: module-init-tools/udev and module auto-loading

From: Rusty Russell
Date: Sun Feb 01 2004 - 19:48:17 EST


In message <1075674718.27454.17.camel@xxxxxxxxxxxxx> you write:
> A quick question on module-init-tools/udev and module auto-loading ...
> lets say I have a module called 'foo', that I want the kernel to
> auto-load.

The *idea* of udev et al is that the kernel finds the devices,
/sbin/hotplug loads the driver etc.

This does not cover the class of things which are entirely created by
the driver (eg. dummy devices, socket families), so cannot be
"detected". Many of these (eg. socket families) can be handled by
explicit request_module() in the core and MODULE_ALIAS in the driver.
Some of them cannot at the moment: the first the kernel knows of them
is an attempt to open the device. Some variant of devfs would solve
this.

> Then a distant related issue - anybody thought about dynamic major
> numbers of 2.7/2.8 (?) and the 'alias char-major-<whatever>-* whatever'
> type modprobe rules (as the whole fact of them being dynamic, will make
> that alias type worthless ...)?

Yes. This could be changed to probe by device name, not number
though. And most names can't be dynamic: /dev/null has certain, fixed
semantics.

The "I found this hardware, who will drive it?" mechanism of udev, and
the "User asked for this, who will supply it?" mechanism of kmod have
some overlap, but I think both will end up being required.

Cheers,
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
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/