Re: kmod and modules which require other modules

Adam J. Richter (adam@yggdrasil.com)
Sat, 18 Apr 1998 23:12:59 -0700


In article <m2af9j0zq6.fsf@netmeg.net> you write:
>I have just upgraded to kernel 2.1.96 and kmod. I am unclear about
>something, and can;t find anything on the newsgroups about this.
>
>say i have PPP modularized. First you need to load slhc, then PPP,
>then maybe a compressor.
>
>okay. all that worked swell with kerneld and appropriate entries in
>conf.modules.
>
>same with printer. if i used lpr, kerneld started first the
>appropriate parpot modules, then loaded lp.
>
>but what about kmod? it doesnt seem to handle the recursive
>requirements correctly. is one supposed to keep using kerneld also?
>are there new requirements for cond.modules? whats up???

This is a known problem with the stock kmod daemon. Because
it has only a single thread of execution and no work queue, calls to
request_module() made from the initialization phase of another module
being loaded by request_module() are lost, such as in the examples you
cite and also in a number of cases relating to SCSI support.

This is the principal problem solved by the daemonless kmod
patches that I have posted to this list, which is based on input and
contributions from the kmod hackers Kirk Petersen, Greg Zornester and
Mikael Pettersson and others (sorry to whomever I'm forgetting here).
It also simplifies kmod significantly. Earlier today, I posted a
patch for the latest version against 2.1.97, so use that.

The one caveat is that automatic module unloading is now moved
to userland. So, if you want automatic module unloading, put a line
like the following in root's crontab:

0-59/5 * * * * /sbin/rmmod -a

I have submitted the daemonless kmod patches to Linus, for
inclusion (hopefully) in main 2.1 kernel branch.

This should solve your problem.

-- 
Adam J. Richter     __     ______________   4880 Stevens Creek Blvd, Suite 205
adam@yggdrasil.com     \ /                  San Jose, California 95129-1034
+1 408 261-6630         | g g d r a s i l   United States of America
fax +1 408 261-6631      "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.rutgers.edu