On Friday 25 January 2008 14:29:12 Tejun Heo wrote: > Rusty Russell wrote: > > On Friday 25 January 2008 09:02:53 Sam Ravnborg wrote: > >> From: Tejun Heo <htejun@xxxxxxxxx> > >> > >> When driver modules are loaded by udev, what comes first in > >> modules.alias file is selected. > > > > Actually, I had occasion to look at this the other day, and in the > > modprobe version here every match is selected. > > What do you mean by "every match is selected"? (I really can't tell if you're being facecious here, or you really don't know this, so I'll assume the latter...) modules.alias contains wildcards for what devices this module might match, eg. alias pci:v00008086d00002829sv*sd*bc*sc*i* ahci modprobe gets called to insert eg 'pci:v00008086d00002829sv000017AAsd000020A7bc01sc06i01'. After finding nothing in the normal config files, it looks for all matches in modules.alias, and inserts all those modules in the kernel. > > And they'll be loaded in reverse order of the module.alias file. > > What do you mean by 'loaded'? I mean modprobe loads the moduled into the kernel. Each module is loaded into memory, then sys_init_module() called to load the module, with args chosen from the modprobe.conf/modprobe.d files. > > Looks like Jon's latest git tree does the same. > > > > So, what does this patch actually fix? > > This patch makes kbuild generate modules.order and another patch makes > depmod generate modules.alias or whatever else according to the order > specified in modules.order, so that modprobe prefer modules which is > earlier in the linking order. That's what the patch does, and you've explained that clearly multiple times. But I can only ask again, "what does this patch actually fix?". ie. what system got messed up because of the current behaviour? Where's the problem we're fixing? This might fix it as a side effect, but let's try harder than that, OK? > So, are you saying that modprobe chooses modules in the reverse order of > modules.alias file? That is precisely what I'm saying, and more. Rusty. - To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html