*** SUBJECT HERE ***
Subsystems (21)
cover *** SUBJECT HERE ***
module-init-tools on most distributions ships with a file that contains a large list of aliases to auto-load modules on demand, either by matching a MODALIAS string from the kernel uevent, or by the {block,char}-major-* aliases requested by the kernel when device nodes are opened.
There are convenient macros for defining these inside the kernel modules themselves, so they are exported by file2alias and put into the files created by depmod. This is far preferable to a file in another package that has to be parsed every time modprobe is called (many, many times on a typical boot) and may get out of date.
The majority of these are of the type that cause modules to be loaded when devices are opened, which are not generally needed in a udev system. If the maintainers feel they aren't warranted, so be it.
Some match network protocols instead, it'd be nice if they could be merged.
And one (sg) is a missing match from a device driver to a MODALIAS, we'd definitely like that one to be merged.
Thanks!
Scott
Scott James Remnant (30):
bridge: Auto-load bridge module when socket opened.
netlink: Auto-load af_netlink module when socket opened.
wanrouter: Auto-load wanrouter module when socket opened.
netfilter: Auto-load ip_queue module when socket opened.
netfilter: Auto-load ip6_queue module when socket opened.
connector: Auto-load cn module when socket opened.
scsi: Auto-load scsi_transport_iscsi module when socket opened.
mtd: Auto-load ftl module when device opened.
paride: Auto-load pcd module when device opened.
paride: Auto-load pf module when device opened.
mtd: Auto-load nftl module when device opened.
input: Auto-load mousedev module when psaux device opened.
input: Auto-load mousedev module when /dev/input/mice opened.
hw_random: Auto-load rng-core module when device opened.
sbus: Auto-load openprom module when device opened.
applicom: Auto-load applicom module when device opened.
toshiba: Auto-load toshiba module when device opened.
cyclades: Auto-load cyclades module when device opened.
riscom8: Auto-load riscom8 module when device opened.
specialix: Auto-load specialix module when device opened.
video: Auto-load videodev module when device opened.
i2c: Auto-load i2c_dev module when device opened.
mtd: Auto-load mtdchar module when device opened.
paride: Auto-load pt module when device opened.
paride: Auto-load pg module when device opened.
usb: Auto-load cdc_acm module when device opened.
x86: Auto-load msr module when device opened.
x86: Auto-load cpuid module when device opened.
mwave: Auto-load mwave module when device opened.
scsi: Add scsi type modalias to ch.
Tim Gardner (1):
esp: Auto-load esp module when device opened.
arch/x86/kernel/cpuid.c | 1 + arch/x86/kernel/msr.c | 1 + drivers/block/paride/pcd.c | 1 + drivers/block/paride/pf.c | 1 + drivers/block/paride/pg.c | 1 + drivers/block/paride/pt.c | 1 + drivers/char/applicom.c | 1 + drivers/char/cyclades.c | 2 ++ drivers/char/esp.c | 3 +++ drivers/char/hw_random/core.c | 1 + drivers/char/mwave/mwavedd.c | 1 + drivers/char/riscom8.c | 2 ++ drivers/char/specialix.c | 1 + drivers/char/toshiba.c | 1 + drivers/connector/connector.c | 2 ++ drivers/i2c/i2c-dev.c | 1 + drivers/input/mousedev.c | 3 +++ drivers/media/video/v4l2-dev.c | 1 + drivers/mtd/ftl.c | 2 ++ drivers/mtd/mtdchar.c | 1 + drivers/mtd/nftlcore.c | 2 ++ drivers/sbus/char/openprom.c | 1 + drivers/scsi/ch.c | 1 + drivers/scsi/scsi_transport_iscsi.c | 3 +++ drivers/usb/class/cdc-acm.c | 2 +- net/bridge/br.c | 2 ++ net/ipv4/netfilter/ip_queue.c | 2 ++ net/ipv6/netfilter/ip6_queue.c | 1 + net/netlink/af_netlink.c | 2 ++ net/wanrouter/wanmain.c | 1 + 30 files changed, 44 insertions(+), 1 deletions(-)
PATCH 1/31 bridge: Auto-load bridge module when socket opened.
The bridge module is missing the net-pf-7 alias that would cause it to be auto-loaded when a socket of that type is opened. This patch adds the alias.
--- net/bridge/br.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
net/bridge/br.c +2 -0
@@ -16,6 +16,7 @@#include <linux/netdevice.h> #include <linux/etherdevice.h> #include <linux/init.h> +#include <linux/net.h> #include <linux/llc.h> #include <net/llc.h> #include <net/stp.h>
@@ -108,3 +109,4 @@ module_init(br_init) module_exit(br_deinit) MODULE_LICENSE("GPL");MODULE_VERSION (BR_VERSION ); +MODULE_ALIAS_NETPROTO (PF_BRIDGE );
Signature · 1 line
1.6.0.5
Re: [PATCH 01/31] bridge: Auto-load bridge module when socket opened.
Quoted 23 lines · On Mon, 2 Mar 2009 16:40:10 +0000 Scott James Remnant <[email protected]>…
The bridge module is missing the net-pf-7 alias that would cause it to be auto-loaded when a socket of that type is opened. This patch adds the alias.
Signed-off-by Scott James Remnant <[email protected]>Signed-off-by Tim Gardner <[email protected]>--- net/bridge/br.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)net/bridge/br.c +1
-0@@ -16,6 +16,7 @@#include <linux/netdevice.h> #include <linux/etherdevice.h> #include <linux/init.h> +#include <linux/net.h> #include <linux/llc.h> #include <net/llc.h> #include <net/stp.h>
net/bridge/br.c module_init(br_init) · line 112
Quoted 4 lines
net/bridge/br.c +1
-0@@ -108,3 +109,4 @@ module_init(br_init) module_exit(br_deinit) MODULE_LICENSE("GPL");MODULE_VERSION (BR_VERSION ); +MODULE_ALIAS_NETPROTO (PF_BRIDGE );
Hmm. It looks okay, but there is not real direct socket interface for PF_BRIDGE/AF_BRIDGE.
David Miller
maintainerRe: [PATCH 01/31] bridge: Auto-load bridge module when socket opened.
In reply to Scott James RemnantFrom: Scott James Remnant <[email protected]>
Date: Mon, 2 Mar 2009 16:40:10 +0000
Quoted 6 lines
The bridge module is missing the net-pf-7 alias that would cause it to be auto-loaded when a socket of that type is opened. This patch adds the alias.
Signed-off-by Scott James Remnant <[email protected]>Signed-off-by Tim Gardner <[email protected]>
Bridging has no sockets, so this patch won't do anything.
Did you verify that these changes actually do something? Or did you blindly run around peppering source files with these annotations?
Re: [PATCH 01/31] bridge: Auto-load bridge module when socket opened.
Quoted 7 lines · On Fri, 13 Mar 2009 14:27:18 -0700 (PDT) David Miller <[email protected]>…
From: Scott James Remnant <[email protected]>
Date: Mon, 2 Mar 2009 16:40:10 +0000Quoted 4 lines
The bridge module is missing the net-pf-7 alias that would cause it to be auto-loaded when a socket of that type is opened. This patch adds the alias.
Quoted 8 lines
Quoted 2 lines
Signed-off-by Scott James Remnant <[email protected]>Signed-off-by Tim Gardner <[email protected]>Bridging has no sockets, so this patch won't do anything.
Did you verify that these changes actually do something? Or did you blindly run around peppering source files with these annotations?
I think this all started when I was debugging a problem where LLC was not getting autoloaded properly. It turned out that distro's like Debian (and therefore Ubuntu) had incorrect modprobe.d/alias file entries. I raised the bug that, "hey you have wrong data and you really don't need these alias entries at all anymore". There was some comparison of what was being shipped versus what was in the kernel and the Debian/Ubuntu guys stepped in to try and unify this.
Let's be supportive of Ubuntu maintainers actually working on upstream resolution for a change. The normal distro maintainer is "patch and ignore". In this case, many of these are correct, but several of them are cases where there is no point in having a module alias because there is no functiona user visible API. You can try and open a PF_BRIDGE socket, there just is no point.
David Miller
maintainerRe: [PATCH 01/31] bridge: Auto-load bridge module when socket opened.
From: Stephen Hemminger <[email protected]>
Date: Fri, 13 Mar 2009 15:12:00 -0700
Quoted 3 lines
Let's be supportive of Ubuntu maintainers actually working on upstream resolution for a change. The normal distro maintainer is "patch and ignore".
This has nothing to do with being supportive or not.
If the changes are wrong, many of these in fact were, and they were not even tested on top of it, I cannot be happy at all about that.
And that goes for anyone submitting patches here.
Re: [PATCH 01/31] bridge: Auto-load bridge module when socket opened.
In reply to David MillerQuoted 4 lines · David Miller
Did you verify that these changes actually do something? Or did you blindly run around peppering source files with these annotations?
I converted existing modprobe aliases that most distributions are carrying around into the one-line kernel patches.
I tested the important ones such as the floppy and ch changes.
If the patches are wrong, which I personally suspected many of them were, then it's a good example as to why distributions shouldn't hack around the kernel in userspace, or keep their own patches.
So yes, they're a bit stinky (hell, I even fluffed up the covering mail subject line <g>) - but distros including Ubuntu were trying to do these aliases in modprobe rules, so it's a good thing to find out that they're wrong; no?
Scott
Signature · 2 lines
Scott James Remnant [email protected]
PATCH 2/31 netlink: Auto-load af_netlink module when socket opened.
In reply to Scott James RemnantThe af_netlink module is missing the net-pf-16 alias that would cause it to be auto-loaded when a socket of that type is opened. This patch adds the alias.
While we normally build this module in, some users may choose to reconfigure their kernel with this as a module.
--- net/netlink/af_netlink.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
net/netlink/af_netlink.c +2 -0
@@ -2007,3 +2007,5 @@ panic: }core_initcall (netlink_proto_init); + +MODULE_ALIAS_NETPROTO (PF_NETLINK );
Signature · 1 line
1.6.0.5
David Miller
maintainerRe: [PATCH 02/31] netlink: Auto-load af_netlink module when socket opened.
From: Scott James Remnant <[email protected]>
Date: Mon, 2 Mar 2009 16:44:00 +0000
Quoted 9 lines
The
af_netlinkmodule is missing the net-pf-16 alias that would cause it to be auto-loaded when a socket of that type is opened. This patch adds the alias.While we normally build this module in, some users may choose to reconfigure their kernel with this as a module.
Signed-off-by Scott James Remnant <[email protected]>Signed-off-by Tim Gardner <[email protected]>
If you can get netlink to be built modular, impressive. :-)
It's always built statically into the kernel so there is no reason for this patch.
PATCH 3/31 wanrouter: Auto-load wanrouter module when socket opened.
In reply to Scott James RemnantThe wanrouter module is missing the net-pf-25 alias that would cause it to be auto-loaded when a socket of that type is opened. This patch adds the alias.
--- net/wanrouter/wanmain.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
net/wanrouter/wanmain.c +1 -0
@@ -777,6 +777,7 @@ EXPORT_SYMBOL(register_wan_device);EXPORT_SYMBOL (unregister_wan_device);MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_NETPROTO (PF_WANPIPE );/* * End
Signature · 1 line
1.6.0.5
David Miller
maintainerRe: [PATCH 03/31] wanrouter: Auto-load wanrouter module when socket opened.
From: Scott James Remnant <[email protected]>
Date: Mon, 2 Mar 2009 16:47:46 +0000
Quoted 6 lines
The wanrouter module is missing the net-pf-25 alias that would cause it to be auto-loaded when a socket of that type is opened. This patch adds the alias.
Signed-off-by Scott James Remnant <[email protected]>Signed-off-by Tim Gardner <[email protected]>
This module has no sockets, this patch doesn't do anything.
These patches really stink, and have been prepared in a really careless manner, sorry.
PATCH 4/31 netfilter: Auto-load ip_queue module when socket opened.
In reply to Scott James RemnantThe ip_queue module is missing the net-pf-16-proto-3 alias that would causae it to be auto-loaded when a socket of that type is opened. This patch adds the alias.
--- net/ipv4/netfilter/ip_queue.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
net/ipv4/netfilter/ip_queue.c +2 -0
@@ -24,6 +24,7 @@#include <linux/proc_fs.h> #include <linux/seq_file.h> #include <linux/security.h> +#include <linux/net.h> #include <linux/mutex.h> #include <net/net_namespace.h> #include <net/sock.h>
@@ -640,6 +641,7 @@ static void __exit ip_queue_fini(void)MODULE_DESCRIPTION ("IPv4 packet queue handler" );MODULE_AUTHOR ("James Morris <[email protected]>" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_NET_PF_PROTO (PF_NETLINK ,NETLINK_FIREWALL );module_init (ip_queue_init);module_exit (ip_queue_fini);
Signature · 1 line
1.6.0.5
Re: [PATCH 04/31] netfilter: Auto-load ip_queue module when socket opened.
Quoted 3 lines · Scott James Remnant
The
ip_queuemodule is missing the net-pf-16-proto-3 alias that would causae it to be auto-loaded when a socket of that type is opened. This patch adds the alias.
Also applied, thanks.
PATCH 5/31 netfilter: Auto-load ip6_queue module when socket opened.
In reply to Scott James RemnantThe ip6_queue module is missing the net-pf-16-proto-13 alias that would cause it to be auto-loaded when a socket of that type is opened. This patch adds the alias.
--- net/ipv6/netfilter/ip6_queue.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
net/ipv6/netfilter/ip6_queue.c +1 -0
@@ -643,6 +643,7 @@ static void __exit ip6_queue_fini(void)MODULE_DESCRIPTION ("IPv6 packet queue handler" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_NET_PF_PROTO (PF_NETLINK ,NETLINK_IP6_FW );module_init (ip6_queue_init);module_exit (ip6_queue_fini);
Signature · 1 line
1.6.0.5
Patrick McHardy
AppliedRe: [PATCH 05/31] netfilter: Auto-load ip6_queue module when socket opened.
Quoted 3 lines · Scott James Remnant
The
ip6_queuemodule is missing the net-pf-16-proto-13 alias that would cause it to be auto-loaded when a socket of that type is opened. This patch adds the alias.
Applied, thanks.
PATCH 6/31 connector: Auto-load cn module when socket opened.
In reply to Scott James RemnantThe cn module is missing the net-pf-16-proto-11 alias that would cause it to be auto-loaded when a socket of that type is opened. This patch adds the alias.
--- drivers/connector/connector.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/connector/connector.c +2 -0
@@ -23,6 +23,7 @@#include <linux/module.h> #include <linux/list.h> #include <linux/skbuff.h> +#include <linux/net.h> #include <linux/netlink.h> #include <linux/moduleparam.h> #include <linux/connector.h>
@@ -35,6 +36,7 @@MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Evgeniy Polyakov <[email protected]>" );MODULE_DESCRIPTION ("Generic userspace <-> kernelspace connector." ); +MODULE_ALIAS_NET_PF_PROTO (PF_NETLINK ,NETLINK_CONNECTOR );static u32 cn_idx =CN_IDX_CONNECTOR ;static u32 cn_val =CN_VAL_CONNECTOR ;
Signature · 1 line
1.6.0.5
PATCH 7/31 scsi: Auto-load scsi_transport_iscsi module when socket opened.
In reply to Scott James RemnantThe scsi_transport_iscsi module is missing the net-pf-16-proto-8 alias that would cause it to be auto-loaded when a socket of that type is opened. This patch adds the alias.
--- drivers/scsi/scsi_transport_iscsi.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/scsi/scsi_transport_iscsi.c +3 -0
@@ -22,6 +22,8 @@*/ #include <linux/module.h> #include <linux/mutex.h> +#include <linux/net.h> +#include <linux/netlink.h> #include <net/tcp.h> #include <scsi/scsi.h> #include <scsi/scsi_host.h>
@@ -2013,3 +2015,4 @@ MODULE_AUTHOR("Mike Christie <[email protected]>, "MODULE_DESCRIPTION ("iSCSI Transport Interface" );MODULE_LICENSE ("GPL" );MODULE_VERSION (ISCSI_TRANSPORT_VERSION ); +MODULE_ALIAS_NET_PF_PROTO (PF_NETLINK ,NETLINK_ISCSI );
Signature · 1 line
1.6.0.5
PATCH 8/31 mtd: Auto-load ftl module when device opened.
In reply to Scott James RemnantThe ftl module is missing the block-major-44-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
--- drivers/mtd/ftl.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/mtd/ftl.c +2 -0
@@ -69,6 +69,7 @@#include <linux/init.h> #include <linux/hdreg.h> #include <linux/vmalloc.h> +#include <linux/blkdev.h> #include <linux/blkpg.h> #include <asm/uaccess.h>
@@ -1116,3 +1117,4 @@ module_exit(cleanup_ftl);MODULE_LICENSE ("Dual MPL/GPL" );MODULE_AUTHOR ("David Hinds <[email protected]>" );MODULE_DESCRIPTION ("Support code for Flash Translation Layer, used on PCMCIA devices" ); +MODULE_ALIAS_BLOCKDEV_MAJOR (FTL_MAJOR );
Signature · 1 line
1.6.0.5
PATCH 9/31 paride: Auto-load pcd module when device opened.
In reply to Scott James RemnantThe pcd module is missing the block-major-46-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
--- drivers/block/paride/pcd.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/block/paride/pcd.c +1 -0
@@ -967,5 +967,6 @@ static void __exit pcd_exit(void) }MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_BLOCKDEV_MAJOR (PCD_MAJOR );module_init (pcd_init)module_exit (pcd_exit)
Signature · 1 line
1.6.0.5
PATCH 10/31 paride: Auto-load pf module when device opened.
In reply to Scott James RemnantThe pf module is missing the block-major-47-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
--- drivers/block/paride/pf.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/block/paride/pf.c +1 -0
@@ -988,5 +988,6 @@ static void __exit pf_exit(void) }MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_BLOCKDEV_MAJOR (PF_MAJOR );module_init (pf_init)module_exit (pf_exit)
Signature · 1 line
1.6.0.5
PATCH 11/31 mtd: Auto-load nftl module when device opened.
In reply to Scott James RemnantThe nftl module is missing the block-major-93-* alias that would cause it to be auto-loaded when a nftl of that type is opened. This patch adds the alias.
--- drivers/mtd/nftlcore.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/mtd/nftlcore.c +2 -0
@@ -20,6 +20,7 @@#include <linux/slab.h> #include <linux/init.h> #include <linux/hdreg.h> +#include <linux/blkdev.h> #include <linux/kmod.h> #include <linux/mtd/mtd.h>
@@ -818,3 +819,4 @@ module_exit(cleanup_nftl);MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("David Woodhouse <[email protected]>, Fabrice Bellard <[email protected]> et al." );MODULE_DESCRIPTION ("Support code for NAND Flash Translation Layer, used on M-Systems DiskOnChip 2000 and Millennium" ); +MODULE_ALIAS_BLOCKDEV_MAJOR (NFTL_MAJOR );
Signature · 1 line
1.6.0.5
PATCH 12/31 input: Auto-load mousedev module when psaux device opened.
In reply to Scott James RemnantThe mousedev module is missing the char-major-10-1 alias that would cause it to be auto-loaded when the /dev/psaux device is opened. This patch adds the alias.
--- drivers/input/mousedev.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/input/mousedev.c +2 -0
@@ -1065,6 +1065,8 @@ static struct miscdevice psaux_mouse = {PSMOUSE_MINOR ,"psaux" , &mousedev_fops };static int psaux_registered; + +MODULE_ALIAS_MISCDEV (PSMOUSE_MINOR );#endif static int __init mousedev_init (void )
Signature · 1 line
1.6.0.5
Dmitry Torokhov
maintainerRe: [PATCH 12/31] input: Auto-load mousedev module when psaux device opened.
Hi Scott,
Quoted 4 lines · On Tuesday 03 March 2009 07:32:15 Scott James Remnant wrote:
The mousedev module is missing the char-major-10-1 alias that would cause it to be auto-loaded when the
/dev/psauxdevice is opened. This patch adds the alias.
I think we are trying to go in the different direction that what you are proposing - we should automatically load mousedev and other input handlers when input device that is compatible with that handler is registered with input core, not the other way around. This way you won't need static device node in your /dev, udev will create it for you as needed.
Same goes for your other patch.
Signature · 1 line
Dmitry
PATCH 13/31 input: Auto-load mousedev module when /dev/input/mice opened.
In reply to Scott James RemnantThe mousedev module is missing the char-major-13-31 alias that would cause it to be auto-loaded when the /dev/input/mice device is opened. This patch adds the alias.
--- drivers/input/mousedev.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/input/mousedev.c +1 -0
@@ -29,6 +29,7 @@MODULE_AUTHOR ("Vojtech Pavlik <[email protected]>" );MODULE_DESCRIPTION ("Mouse (ExplorerPS/2) device interfaces" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_CHARDEV (INPUT_MAJOR ,MOUSEDEV_MIX );#ifndef CONFIG_INPUT_MOUSEDEV_SCREEN_X #define CONFIG_INPUT_MOUSEDEV_SCREEN_X 1024
Signature · 1 line
1.6.0.5
PATCH 14/31 hw_random: Auto-load rng-core module when device opened.
In reply to Scott James RemnantThe rng-core module is missing the char-major-10-183 alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
--- drivers/char/hw_random/core.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/char/hw_random/core.c +1 -0
@@ -347,3 +347,4 @@ EXPORT_SYMBOL_GPL(hwrng_unregister);MODULE_DESCRIPTION ("H/W Random Number Generator (RNG) driver" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_MISCDEV (RNG_MISCDEV_MINOR );
Signature · 1 line
1.6.0.5
PATCH 15/31 sbus: Auto-load openprom module when device opened.
In reply to Scott James RemnantThe openprom module is missing the char-major-10-139 alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
--- drivers/sbus/char/openprom.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/sbus/char/openprom.c +1 -0
@@ -51,6 +51,7 @@ MODULE_AUTHOR("Thomas K. Dyas ([email protected]) and Eddie C. Dost (ecd@skMODULE_DESCRIPTION ("OPENPROM Configuration Driver" );MODULE_LICENSE ("GPL" );MODULE_VERSION ("1.0" ); +MODULE_ALIAS_MISCDEV (SUN_OPENPROM_MINOR );/* Private data kept by the driver for each descriptor. */ typedef struct openprom_private_data
Signature · 1 line
1.6.0.5
David Miller
maintainerRe: [PATCH 15/31] sbus: Auto-load openprom module when device opened.
From: Scott James Remnant <[email protected]>
Date: Mon, 2 Mar 2009 18:23:13 +0000
Quoted 6 lines
The openprom module is missing the char-major-10-139 alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
Signed-off-by Scott James Remnant <[email protected]>Signed-off-by Tim Gardner <[email protected]>
Although I am sure you didn't test this, this patch is actually correct so applied.
Thanks.
PATCH 16/31 applicom: Auto-load applicom module when device opened.
In reply to Scott James RemnantThe applicom module is missing the char-major-10-157 alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
--- drivers/char/applicom.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/char/applicom.c +1 -0
@@ -75,6 +75,7 @@ MODULE_DEVICE_TABLE(pci, applicom_pci_tbl);MODULE_AUTHOR ("David Woodhouse & Applicom International" );MODULE_DESCRIPTION ("Driver for Applicom Profibus card" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_MISCDEV (AC_MINOR );MODULE_SUPPORTED_DEVICE ("ac" );
Signature · 1 line
1.6.0.5
PATCH 17/31 toshiba: Auto-load toshiba module when device opened.
In reply to Scott James RemnantThe toshiba module is missing the char-major-10-181 alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
--- drivers/char/toshiba.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/char/toshiba.c +1 -0
@@ -77,6 +77,7 @@ MODULE_LICENSE("GPL");MODULE_AUTHOR ("Jonathan Buzzard <[email protected]>" );MODULE_DESCRIPTION ("Toshiba laptop SMM driver" );MODULE_SUPPORTED_DEVICE ("toshiba" ); +MODULE_ALIAS_MISCDEV (TOSH_MINOR_DEV );static int tosh_fn;module_param_named (fn, tosh_fn, int,0 );
Signature · 1 line
1.6.0.5
PATCH 29/31 esp: Auto-load esp module when device opened.
In reply to Scott James RemnantThe esp module is missing the char-major-57-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
--- drivers/char/esp.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/char/esp.c +3 -0
@@ -51,6 +51,7 @@#include <linux/serialP.h> #include <linux/serial_reg.h> #include <linux/major.h> +#include <linux/device.h> #include <linux/string.h> #include <linux/fcntl.h> #include <linux/ptrace.h>
@@ -85,6 +86,8 @@ static unsigned int rx_timeout = ESP_RX_TMOUT;static unsigned int pio_threshold =ESP_PIO_THRESHOLD ;MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_CHARDEV_MAJOR (ESP_IN_MAJOR ); +module_param_array (irq, int,NULL ,0 );module_param_array (divisor, uint,NULL ,0 );
Signature · 1 line
1.6.0.5
Alan Cox
NAKRe: [PATCH 29/31] esp: Auto-load esp module when device opened.
Quoted 3 lines · On Wed, 4 Mar 2009 20:55:52 -0700 Tim Gardner <[email protected]> wrote:
The esp module is missing the char-major-57-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
NAK - the default esp behaviour is to do unsafe ISA probes to find the ports. We don't want it autoloading therefore.
Re: [PATCH 29/31] esp: Auto-load esp module when device opened.
Quoted 10 lines · Alan Cox
Quoted 3 lines · On Wed, 4 Mar 2009 20:55:52 -0700 Tim Gardner <[email protected]> wrote:
The esp module is missing the char-major-57-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
NAK - the default esp behaviour is to do unsafe ISA probes to find the ports. We don't want it autoloading therefore.
Good point. Its been awhile since I had to think about ISA probing.
Signature · 1 line
Tim Gardner [email protected]
PATCH 18/31 cyclades: Auto-load cyclades module when device opened.
In reply to Scott James RemnantThe cyclades module is missing the char-major-19-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
--- drivers/char/cyclades.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/char/cyclades.c +2 -0
@@ -646,6 +646,7 @@#include <linux/spinlock.h> #include <linux/bitops.h> #include <linux/firmware.h> +#include <linux/device.h> #include <asm/system.h> #include <linux/io.h>
@@ -5422,3 +5423,4 @@ module_exit(cy_cleanup_module);MODULE_LICENSE ("GPL" );MODULE_VERSION (CY_VERSION ); +MODULE_ALIAS_CHARDEV_MAJOR (CYCLADES_MAJOR );
Signature · 1 line
1.6.0.5
PATCH 19/31 riscom8: Auto-load riscom8 module when device opened.
In reply to Scott James RemnantThe riscom8 module is missing the char-major-48-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
--- drivers/char/riscom8.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/char/riscom8.c +2 -0
@@ -48,6 +48,7 @@#include <linux/delay.h> #include <linux/tty_flip.h> #include <linux/spinlock.h> +#include <linux/device.h> #include <linux/uaccess.h>
@@ -1524,6 +1525,7 @@ module_param(iobase2, int, 0);module_param (iobase3, int,0 );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_CHARDEV_MAJOR (RISCOM8_NORMAL_MAJOR );#endif /* MODULE */ /*
Signature · 1 line
1.6.0.5
PATCH 20/31 specialix: Auto-load specialix module when device opened.
In reply to Scott James RemnantThe specialix module is missing the char-major-75-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
--- drivers/char/specialix.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/char/specialix.c +1 -0
@@ -2365,3 +2365,4 @@ module_init(specialix_init_module);module_exit (specialix_exit_module);MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_CHARDEV_MAJOR (SPECIALIX_NORMAL_MAJOR );
Signature · 1 line
1.6.0.5
Re: [PATCH 20/31] specialix: Auto-load specialix module when device opened.
Quoted 6 lines · Scott James Remnant
The specialix module is missing the char-major-75-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
Signed-off-by Scott James Remnant <[email protected]>Signed-off-by Tim Gardner <[email protected]>
Signature · 6 lines
** [email protected] ** http://www.BitWizard.nl/ ** +31-15-2600998 ** ** Delftechpark 26 2628 XH Delft, The Netherlands. KVK: 27239233 ** *-- BitWizard writes Linux device drivers for any device you may have! --* Q: It doesn't work. A: Look buddy, doesn't work is an ambiguous statement. Does it sit on the couch all day? Is it unemployed? Please be specific! Define 'it' and what it isn't doing. --------- Adapted from lxrbot FAQ
PATCH 21/31 video: Auto-load videodev module when device opened.
In reply to Scott James RemnantThe videodev module is missing the char-major-81-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
--- drivers/media/video/v4l2-dev.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/media/video/v4l2-dev.c +1 -0
@@ -582,6 +582,7 @@ module_exit(videodev_exit)MODULE_AUTHOR ("Alan Cox, Mauro Carvalho Chehab <[email protected]>" );MODULE_DESCRIPTION ("Device registrar for Video4Linux drivers v2" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_CHARDEV_MAJOR (VIDEO_MAJOR );/*
Signature · 1 line
1.6.0.5
Re: [PATCH 21/31] video: Auto-load videodev module when device opened.
On Montag, 2. März 2009, Scott James Remnant wrote:
Hi Scott!
Quoted 3 lines
The videodev module is missing the char-major-81-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
The patch looks fine, but if videodev is not yet loaded, will loading videodev get any devices registered? For that to happen normally some pci video bridge adapter driver is needed, and that registers at videodev module.
Without modprobe.conf tricks this still is not loaded then.
Regards
Matthias
PATCH 22/31 i2c: Auto-load i2c_dev module when device opened.
In reply to Scott James RemnantThe i2c_dev module is missing the char-major-89-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
--- drivers/i2c/i2c-dev.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/i2c/i2c-dev.c +1 -0
@@ -618,6 +618,7 @@ MODULE_AUTHOR("Frodo Looijaard <[email protected]> and " "Simon G. Vogl <simon-nD9nYVNVf00W+b/[email protected]>");MODULE_DESCRIPTION ("I2C /dev entries driver" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_CHARDEV_MAJOR (I2C_MAJOR );module_init (i2c_dev_init);module_exit (i2c_dev_exit);
Signature · 1 line
1.6.0.5
Re: [PATCH 22/31] i2c: Auto-load i2c_dev module when device opened.
Scott,
Your clock is off by a significant number of days, isn't it?
Quoted 3 lines · Scott James Remnant
The
i2c_devmodule is missing the char-major-89-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
Why not, however this is pretty pointless nowadays as /dev nodes tend to be created dynamically by udev, so there is no way i2c-dev will auto-load.
Quoted 18 lines
Signed-off-by Scott James Remnant <[email protected]>Signed-off-by Tim Gardner <[email protected]>--- drivers/i2c/i2c-dev.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)drivers/i2c/i2c-dev.c +1
-0@@ -618,6 +618,7 @@ MODULE_AUTHOR("Frodo Looijaard <[email protected]> and " "Simon G. Vogl <simon-nD9nYVNVf00W+b/[email protected]>");MODULE_DESCRIPTION ("I2C /dev entries driver" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_CHARDEV_MAJOR (I2C_MAJOR );module_init (i2c_dev_init);module_exit (i2c_dev_exit);
Signature · 1 line
Jean Delvare
Re: [PATCH 22/31] i2c: Auto-load i2c_dev module when device opened.
Quoted 2 lines · Jean Delvare
Your clock is off by a significant number of days, isn't it?
No, I've just been carefully testing them - and then waited until they were in the jaunty kernel and a couple of thousand other users not-so-carefully tested them too <g>
Scott
Signature · 2 lines
Scott James Remnant [email protected]
PATCH 23/31 mtd: Auto-load mtdchar module when device opened.
In reply to Scott James RemnantThe mtdchar module is missing the char-major-90-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alia..
--- drivers/mtd/mtdchar.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/mtd/mtdchar.c +1 -0
@@ -825,3 +825,4 @@ module_exit(cleanup_mtdchar);MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("David Woodhouse <[email protected]>" );MODULE_DESCRIPTION ("Direct character-device access to MTD devices" ); +MODULE_ALIAS_CHARDEV_MAJOR (MTD_CHAR_MAJOR );
Signature · 1 line
1.6.0.5
PATCH 24/31 paride: Auto-load pt module when device opened.
In reply to Scott James RemnantThe pt module is missing the char-major-96-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
--- drivers/block/paride/pt.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/block/paride/pt.c +1 -0
@@ -1008,5 +1008,6 @@ static void __exit pt_exit(void) }MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_CHARDEV_MAJOR (PT_MAJOR );module_init (pt_init)module_exit (pt_exit)
Signature · 1 line
1.6.0.5
PATCH 25/31 paride: Auto-load pg module when device opened.
In reply to Scott James RemnantThe pg module is missing the char-major-97-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
--- drivers/block/paride/pg.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/block/paride/pg.c +1 -0
@@ -718,5 +718,6 @@ static void __exit pg_exit(void) }MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_CHARDEV_MAJOR (PG_MAJOR );module_init (pg_init)module_exit (pg_exit)
Signature · 1 line
1.6.0.5
PATCH 26/31 usb: Auto-load cdc_acm module when device opened.
In reply to Scott James RemnantThe cdc_acm module is missing the char-major-166-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
--- drivers/usb/class/cdc-acm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/usb/class/cdc-acm.c +1 -1
@@ -1493,4 +1493,4 @@ module_exit(acm_exit);MODULE_AUTHOR (DRIVER_AUTHOR );MODULE_DESCRIPTION (DRIVER_DESC );MODULE_LICENSE ("GPL" ); - +MODULE_ALIAS_CHARDEV_MAJOR (ACM_TTY_MAJOR );
Signature · 1 line
1.6.0.5
Re: [PATCH 26/31] usb: Auto-load cdc_acm module when device opened.
Quoted 3 lines · Scott James Remnant
The
cdc_acmmodule is missing the char-major-166-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
You really have users that are using a static /dev that need this kind of fix? I thought we were phasing out the char-major- aliases as they don't make any sense anymore.
thanks,
greg k-h
Re: [PATCH 26/31] usb: Auto-load cdc_acm module when device opened.
Quoted 9 lines · Greg KH
Quoted 3 lines · Scott James Remnant
The
cdc_acmmodule is missing the char-major-166-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.You really have users that are using a static /dev that need this kind of fix? I thought we were phasing out the char-major- aliases as they don't make any sense anymore.
I don't think so.
But since we had aliases to support users, I wasn't going to drop them without at least sending a patch upstream to see if they cared about such things.
(and there are many modules which do have the char-major aliases, so at least someone is trying to put them in).
As noted in the cover, feel free to drop these - I can use your reply when a user complains <g>
Scott
Signature · 2 lines
Scott James Remnant [email protected]
Re: [PATCH 26/31] usb: Auto-load cdc_acm module when device opened.
Quoted 16 lines · Scott James Remnant
Quoted 9 lines · Greg KH
Quoted 3 lines · Scott James Remnant
The
cdc_acmmodule is missing the char-major-166-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.You really have users that are using a static /dev that need this kind of fix? I thought we were phasing out the char-major- aliases as they don't make any sense anymore.
I don't think so.
But since we had aliases to support users, I wasn't going to drop them without at least sending a patch upstream to see if they cared about such things.
Quoted 5 lines
(and there are many modules which do have the char-major aliases, so at least someone is trying to put them in).
As noted in the cover, feel free to drop these - I can use your reply when a user complains <g>
Yeah, we should put them into the module, where they belong, or just remove them all. :) They surely do not belong into disconnected userspace config files.
We are going to delete all kernel module configurations from the userspace packages, and the only alternative for the kernel to provide the autoload-by-open facility to users who like to use that, would be that the kernel installs a modprobe config file which is maintained by the kernel maintainers. Not sure if someone wants to do that instead. :)
The new modprobe does not really care how many aliases we have, the time to lookup the aliases depends mainly on the length of the alias lookup string, not the number of strings to match against, so this should all be fine.
Thanks,
Kay
PATCH 27/31 x86: Auto-load msr module when device opened.
In reply to Scott James RemnantThe msr module is missing the char-major-202-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
--- arch/x86/kernel/msr.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/x86/kernel/msr.c +1 -0
@@ -249,3 +249,4 @@ module_exit(msr_exit)MODULE_AUTHOR ("H. Peter Anvin <[email protected]>" );MODULE_DESCRIPTION ("x86 generic MSR driver" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_CHARDEV_MAJOR (MSR_MAJOR );
Signature · 1 line
1.6.0.5
PATCH 28/31 x86: Auto-load cpuid module when device opened.
In reply to Scott James RemnantThe cpuid module is missing the char-major-203-* alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias.
--- arch/x86/kernel/cpuid.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/x86/kernel/cpuid.c +1 -0
@@ -237,3 +237,4 @@ module_exit(cpuid_exit);MODULE_AUTHOR ("H. Peter Anvin <[email protected]>" );MODULE_DESCRIPTION ("x86 generic CPUID driver" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_CHARDEV_MAJOR (CPUID_MAJOR );
Signature · 1 line
1.6.0.5
PATCH 30/31 mwave: Auto-load mwave module when device opened.
In reply to Scott James RemnantThe mwave module is missing the char-major-10-219 alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias
--- drivers/char/mwave/mwavedd.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/char/mwave/mwavedd.c +1 -0
@@ -67,6 +67,7 @@MODULE_DESCRIPTION ("3780i Advanced Communications Processor (Mwave) driver" );MODULE_AUTHOR ("Mike Sullivan and Paul Schroeder" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_MISCDEV (MWAVE_MINOR );/* * These parameters support the setting of MWave resources. Note that no
Signature · 1 line
1.6.0.5
Alan Cox
NAKRe: [PATCH 30/31] mwave: Auto-load mwave module when device opened.
Quoted 3 lines · On Thu, 5 Mar 2009 15:31:24 +0000 Scott James Remnant <[email protected]>…
The mwave module is missing the char-major-10-219 alias that would cause it to be auto-loaded when a device of that type is opened. This patch adds the alias
NAK - another one we don't want autoprobing by default.
PATCH 31/31 scsi: Add scsi type modalias to ch.
In reply to Scott James RemnantThe ch module is missing the scsi:t-0x08* alias that would cause it to be auto-loaded when a device of that type if found by udev, requiring udev to have a specific rule just for this one module. This patch adds the alias.
--- drivers/scsi/ch.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/scsi/ch.c +1 -0
@@ -41,6 +41,7 @@ MODULE_DESCRIPTION("device driver for scsi media changer devices");MODULE_AUTHOR ("Gerd Knorr <[email protected]>" );MODULE_LICENSE ("GPL" );MODULE_ALIAS_CHARDEV_MAJOR (SCSI_CHANGER_MAJOR ); +MODULE_ALIAS_SCSI_DEVICE (TYPE_MEDIUM_CHANGER );static int init =1 ;module_param (init, int,0444 );
Signature · 1 line
1.6.0.5
Quoted 10 lines · Scott James Remnant
module-init-tools on most distributions ships with a file that contains a large list of aliases to auto-load modules on demand, either by matching a MODALIAS string from the kernel uevent, or by the {block,char}-major-* aliases requested by the kernel when device nodes are opened.
There are convenient macros for defining these inside the kernel modules themselves, so they are exported by file2alias and put into the files created by depmod. This is far preferable to a file in another package that has to be parsed every time modprobe is called (many, many times on a typical boot) and may get out of date.
I don't get how it could make any difference in terms of performance. As far as I know, all the module aliases that come from the kernel are assembled into /lib/modules/$version/modules.alias when the kernel is installed, and that file must be processed by modprobe the exact same way another configuration file would. Or am I missing something?
Signature · 1 line
Jean Delvare
Quoted 6 lines · Jean Delvare
I don't get how it could make any difference in terms of performance. As far as I know, all the module aliases that come from the kernel are assembled into
/lib/modules/$version/modules.aliaswhen the kernel is installed, and that file must be processed by modprobe the exact same way another configuration file would. Or am I missing something?
With current modprobe those files are turned into a binary index that can be read and processed *much* faster.
Scott
Signature · 2 lines
Scott James Remnant [email protected]
Re: [PATCH 00/31] Add a lot of module alias statements
Quoted 10 lines · Scott James Remnant
Quoted 5 lines · Jean Delvare
I don't get how it could make any difference in terms of performance. As far as I know, all the module aliases that come from the kernel are assembled into
/lib/modules/$version/modules.aliaswhen the kernel is installed, and that file must be processed by modprobe the exact same way another configuration file would. Or am I missing something?With current modprobe those files are turned into a binary index that can be read and processed *much* faster.
What would prevent the same binary index from being generated from user-provided module aliases?
Signature · 1 line
Jean Delvare
Re: [PATCH 00/31] Add a lot of module alias statements
Quoted 9 lines · Jean Delvare
Quoted 8 lines · Scott James Remnant
Quoted 5 lines · Jean Delvare
I don't get how it could make any difference in terms of performance. As far as I know, all the module aliases that come from the kernel are assembled into
/lib/modules/$version/modules.aliaswhen the kernel is installed, and that file must be processed by modprobe the exact same way another configuration file would. Or am I missing something?
Quoted 6 lines
Quoted 2 lines
With current modprobe those files are turned into a binary index that can be read and processed *much* faster.
What would prevent the same binary index from being generated from user-provided module aliases?
Why go to all that effort when adding the alias to the kernel is just a one-line change, and then it shows up along with all of the other aliases that depmod generates the existing binary index from?
Scott
Signature · 2 lines
Scott James Remnant [email protected]
Re: [PATCH 00/31] Add a lot of module alias statements
Quoted 13 lines · Scott James Remnant
Quoted 12 lines · Jean Delvare
Quoted 10 lines · Scott James Remnant
Quoted 5 lines · Jean Delvare
I don't get how it could make any difference in terms of performance. As far as I know, all the module aliases that come from the kernel are assembled into
/lib/modules/$version/modules.aliaswhen the kernel is installed, and that file must be processed by modprobe the exact same way another configuration file would. Or am I missing something?With current modprobe those files are turned into a binary index that can be read and processed *much* faster.
Quoted 6 lines
Quoted 3 lines
What would prevent the same binary index from being generated from user-provided module aliases?
Why go to all that effort when adding the alias to the kernel is just a one-line change, and then it shows up along with all of the other aliases that depmod generates the existing binary index from?
The problem, with a new kernel or module, we know for forever, that we have to run depmod, but this is not the case for depmod config files, and not really to manage, to require a binary index update here.
But the main point is that we want to put information where it
belongs: in the module itself. Just look at the crap we ship in /etc/modprobe* and you know that externally maintained configs for kernel modules just don't work. :)
Thanks,
Kay
Re: [PATCH 00/31] Add a lot of module alias statements
Quoted 6 lines · Kay Sievers
Quoted 5 lines · Scott James Remnant
Quoted 4 lines · Jean Delvare
Quoted 2 lines · Scott James Remnant
With current modprobe those files are turned into a binary index that can be read and processed *much* faster.
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
What would prevent the same binary index from being generated from user-provided module aliases?
Why go to all that effort when adding the alias to the kernel is just a one-line change, and then it shows up along with all of the other aliases that depmod generates the existing binary index from?
Well, _you_ used the performance improvement as one of the arguments to explain why your patches would be good to have. It's only fair to let us know if and why there is a relation between where the modalias comes from (kernel module or user config) and the possibility to improve performance.
Quoted 3 lines
The problem, with a new kernel or module, we know for forever, that we have to run depmod, but this is not the case for depmod config files, and not really to manage, to require a binary index update here.
You are not really clear, sorry. As Scott said before, modprobe is run many many times during boot, so it would seem fair to build a binary index for all configuration files if it helps with performance. A simple time comparison between all configuration files and the index should be much faster than parsing all configuration files each time modprobe is run, shouldn't it?
Quoted 4 lines
But the main point is that we want to put information where it
belongs: in the module itself. Just look at the crap we ship in/etc/modprobe*and you know that externally maintained configs for kernel modules just don't work. :)
This I certainly agree with (for module aliases which do have an interest, that is), no question about that.
Signature · 1 line
Jean Delvare
Re: [PATCH 00/31] Add a lot of module alias statements
Quoted 24 lines · Jean Delvare
Quoted 6 lines · Kay Sievers
Quoted 5 lines · Scott James Remnant
Quoted 4 lines · Jean Delvare
Quoted 2 lines · Scott James Remnant
With current modprobe those files are turned into a binary index that can be read and processed *much* faster.
Quoted 6 lines
Quoted 6 lines
Quoted 2 lines
What would prevent the same binary index from being generated from user-provided module aliases?
Why go to all that effort when adding the alias to the kernel is just a one-line change, and then it shows up along with all of the other aliases that depmod generates the existing binary index from?
Well, _you_ used the performance improvement as one of the arguments to explain why your patches would be good to have. It's only fair to let us know if and why there is a relation between where the modalias comes from (kernel module or user config) and the possibility to improve performance.
Quoted 3 lines
The problem, with a new kernel or module, we know for forever, that we have to run depmod, but this is not the case for depmod config files, and not really to manage, to require a binary index update here.
Quoted 6 lines
You are not really clear, sorry. As Scott said before, modprobe is run many many times during boot, so it would seem fair to build a binary index for all configuration files if it helps with performance. A simple time comparison between all configuration files and the index should be much faster than parsing all configuration files each time modprobe is run, shouldn't it?
It's the long list of fnmatch() calls which is expensive, not the reading/parsing of the files. It could certainly be implemented, but it would heavily complicate things. You would need to ignore the binary index if one config file does not match the current index, or re-generate it silently, or do other rather complicated stuff to make things predictable. We would likely better go with a modprobe daemon, than doing anything like this. But the goal is to have almost no config files, so we do not need complex optimizations for them. At least that looks like the best compromise today. :)
Quoted 7 lines
Quoted 4 lines
But the main point is that we want to put information where it
belongs: in the module itself. Just look at the crap we ship in/etc/modprobe*and you know that externally maintained configs for kernel modules just don't work. :)This I certainly agree with (for module aliases which do have an interest, that is), no question about that.
Yeah, and there should only be a few things needed. Most of the content of /etc/modprobe* are missing kernel aliases, module options which should be made the default in the module, and kernel driver bugs which should be fixed in the kernel, not in module config files.
Thanks,
Kay