Re: Drivers compiled into the kernel can reduce code size

From: Theodore Tso
Date: Tue Oct 13 2009 - 10:46:24 EST


On Tue, Oct 13, 2009 at 01:46:18PM +0800, éé wrote:
> Dear all,
>
> I has a question below:
>
> Why Drivers compiled into the kernel can reduce code size
> compared with Module ways?
>
> Kernel + Driver Module (Code Size) > Kernel(include Driver)

Each loadable kernel module is subject to rounding to 4k pages, where
as when a driver is built into the kernel, its text, data, and BSS
segments can be included into the kernel text, data, and BSS segments.

Drivers that are compiled into the kernel also can use the same single
huge page TLB entry for the kernel text segment, so using a fewer
kernel modules can also result in fewer TLB misses.

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