Re: modules problems

Albert Cahalan (albert@ccs.neu.edu)
Sat, 21 Sep 1996 01:11:18 -0400 (EDT)


> Modules should only need to determine if a kernel is SMP for locking
> (or threading) issues. There shouldn't be any need to recompile a
> module for SMP machines, if kernel interfaces are defined properly.
>
> As someone who has to support a binary-only kernel module (AFS), this
> requirement really strains my resources. So, not only do I need to
> recompile the module for differences in the kernel version, but I also
> have to recompile for various configurations as well! Uggh.

He is somewhat right I think. I would not normally want to run a module
with SMP overhead, but I ought to be able to load one. That means the
normal kernel should have some dummy functions for SMP locking that are
only used by modules with SMP support. The rest of the kernel can still
skip the SMP code. Then he could just set SMP support in the Makefile
and everyone would be able to use the modules.

The reverse is true too. Digital Unix did something like it for a
filesystem a few years back. The code was not safe for SMP, so they
made it run on the boot CPU only. An SMP Linux system could run
normal modules by stopping other CPUs for a moment. Depending on how
much that module gets used, stopping the other CPUs may be acceptable.