diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-03-18 17:17:51 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-03-18 17:17:51 +0000 |
commit | f1382dc4850bb459d24a81c6cb0ef93ea7bd4a79 (patch) | |
tree | 225271a3d5dcd4e9dea5ee393556abd754c964b1 /Documentation/kmod.txt | |
parent | 135b00fc2e90e605ac2a96b20b0ebd93851a3f89 (diff) |
o Merge with Linux 2.1.90.
o Divide L1 cache sizes by 1024 before printing, makes the numbers a
bit more credible ...
Diffstat (limited to 'Documentation/kmod.txt')
-rw-r--r-- | Documentation/kmod.txt | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/Documentation/kmod.txt b/Documentation/kmod.txt new file mode 100644 index 000000000..3deeeaed8 --- /dev/null +++ b/Documentation/kmod.txt @@ -0,0 +1,47 @@ +Kmod: The Kernel Module Loader +Kirk Petersen + +Kmod is a simple replacement for kerneld. It consists of a +request_module() replacement and a kernel thread called kmod. When the +kernel requests a module, the kmod wakes up and execve()s modprobe, +passing it the name that was requested. After a configurable period of +time, kmod will have delete_module() remove any unused modules. + +Kmod is configurable through two entries in /proc/sys/kernel. You can +set the path of modprobe (where the kernel looks for it) by doing: + + echo "/sbin/modprobe" > /proc/sys/kernel/modprobe + +To tell kmod when to unload unused modules, do something like: + + echo "120" > /proc/sys/kernel/kmod_unload_delay + +Kmod only loads and unloads modules. Kerneld could do more (although +nothing in the standard kernel used its other features). If you +require features such as request_route, we suggest that you take +a similar approach. A simple request_route function could be called, +and a kroute kernel thread could be sent off to do the work. But +we should probably keep this to a minimum. + +Kerneld also had a mechanism for storing device driver settings. This +can easily be done with modprobe. When a module is unloaded, modprobe +could look at a per-driver-configurable location (/proc/sys/drivers/blah) +for device driver settings and save them to a file. When a module +is loaded, simply cat that file back to that location in the proc +filesystem. Or perhaps a script could be a setting in /etc/modules.conf. +There are many user-land methods that will work (I prefer using /proc, +myself). + +If kerneld worked, why replace it? + +- kerneld used sysv ipc, which can now be made into a module. Besides, + sysv ipc is ugly and should therefore be avoided (well, certainly for + kernel level stuff) + +- both kmod and kerneld end up doing the same thing (calling modprobe), + so why not skip the middle man? + +- removing kerneld related stuff from ipc/msg.c made it 40% smaller + +- kmod reports errors through the normal kernel mechanisms, which avoids + the chicken and egg problem of kerneld and modular unix domain sockets |