Re: which is faster (modules or monolithic)?

Andi Kleen (ak@muc.de)
11 Mar 1999 06:44:07 +0100


bgerst@quark.vpplus.com (Brian Gerst) writes:

> Paul Clyne wrote:
> > I understand the concept of a modular vs monolithic kernel.
> >
> > What is the speed tradeoff for each method ?.
>
> The only speed tradeoff for a modular kernel is the time it takes to
> auto-load a module. Once a module is in kernel memory, it is no
> different than if it were compiled in.

Wrong. It takes its own TLB entry (because the module code is in
vmalloced) space, which makes the precious TLB entry unavailable for
user programs. On most architectures the kernel is in one big page,
which means that all kernel code only uses one TLB. Also modules can
be only allocated with PAGE_SIZE (4K/8K) granuality, which means that
for small code a module is silly from the efficiency standpoint
(probably not from the debugging standpoint).

-Andi

-- 
This is like TV. I don't like TV.

- 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.tux.org/lkml/