On Mon, 24 Jan 2005 14:36:10 -0800, 
David Mosberger <[EMAIL PROTECTED]> wrote:
>Keith,
>
>I didn't see any followup to your message.  My apologies if I missed
>something.
>
>You wrote:
>
> Keith> inter_module_* and __symbol_* solve these class of problems:
>
> Keith> Module A can use module B if B is loaded, but A does not
> Keith> require module B to do its work.  B is optional.
>
> Keith> The kernel can use code in module C is C is loaded, but the
> Keith> base kernel does not require module C.  C is optional.
>
>Why isn't this handled via weak references?  If the reference comes
>out as 0, you know the underlying module/facility isn't there and
>proceed accordingly.

Weak references are only done once, when the module is loaded.  We
already use weak references for static determination of symbol
availability.  inter_module_* and __symbol_* are aimed at the dynamic
reference problem, not static.

Module A can use module B if B is loaded, but A does not require module
B to do its work.  B can be loaded at any time, or even unloaded at any
time, although that is much rarer.  Dynamic references require a
register/unregister style interface, thus inter_module_* and
__symbol_*.

Does the kernel code really need optional dynamic references between
modules or kernel -> modules?  That depends on how people code their
modules.  If the rest of the kernel no longer needs dynamic symbol
reference then drop inter_module_* and __symbol_*.

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

Reply via email to