Patch: module-init-tools-0.6/modprobe.c - support subdirectories

From: Adam J. Richter (adam@yggdrasil.com)
Date: Mon Nov 18 2002 - 10:32:47 EST


        The following untested patch adds subdirectory support to
module-init-tools-0.6/modprobe.c. I really need this for tools that I
use for building initial ramdisks to do things like select all SCSI
and IDE drivers without having to release a new version of the ramdisk
maker every time a new SCSI or IDE driver is added. The patch is a net
addition of four lines to modprobe.c.

        I am sorry I was not able to test this change, but it would be
a lot of work for me to bring up a system without module device ID
table support. I know your ChangeLog says that support is coming. I
wonder if it would break your module utilities to leave the old macros
device ID macros in place and let people run the existing depmod.

        I also worry about about the latency of reading the
kernel symbols for all modules every time modprobe is called. If I
want to have all of the modules installed, that's at least 1143
modules on x86, and this might be the standard installation of a Linux
distribution. Here again, the existing depmod program could be used.
What would be needed would be some code to make modprobe try
modules.dep first if it exists.

        Finally, I am skeptical of the benefits being worth the cost
of putting an ELF relocator and symbol table parser in the kernel. We
don't need to do that just have try_mod_inc_use_count or to lock
modules during a load that a new module depends on. I'd much
apportioning this complexity to user space, where it does not consume
unswappable memory, where it is easier to make changes, where there is
slightly more protection against bugs. The user space code already
has to do a little ELF parsing to figure out the dependecies. I would
be interested in knowing what new thing I can do with my computer, or
what performance gain or other real benefit all of this additional
kernel code will buy.

-- 
Adam J. Richter     __     ______________   575 Oroville Road
adam@yggdrasil.com     \ /                  Milpitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America
                         "Free Software For The Rest Of Us."


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



This archive was generated by hypermail 2b29 : Sat Nov 23 2002 - 22:00:22 EST