Re: hmm. insmod => single device configuration ?

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Thu, 16 Jul 1998 13:57:43 +0100


Paul Barton-Davis <pbd@Op.Net> wrote:
> It seems from a user-level simplicity point of view that one should be
> able to "insert" a module multiple times if the module options are
> different.

You can do this already. It's quite convenient (I do it).
You may need to force a different name for each instance of the module.

> Obviously, the first load is special, since it actually
> gets the module code linked into the kernel, but beyond that,
> subsequent insmod()'s should be possible, and in effect say "cook me
> another interface configured *this* way ..."

Drivers that are likely to be configured for multiple devices tend to
have code to support that, though as you say, you have to specify them
all at once, or have them probed at once.

Most drivers don't do this as it makes the code more complicated, and
larger in the usual case (just one device).

If you load a module more than once at the moment, the code is present
more than once.

With some changes to the kernel module code, multiple identical modules
could be made to share read-only pages (= code and strings). I don't
think anybody's found it worth doing: __initdata hasn't been
implemented for modules either.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html