LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Kernel Compiling: Static vs. Module (https://www.linuxquestions.org/questions/linux-general-1/kernel-compiling-static-vs-module-745672/)

CoderMan 08-06-2009 06:20 PM

Kernel Compiling: Static vs. Module
 
I've read a few pages, like this one, which indicate that there are slight performance increases when you compile kernel components statically rather than as LKMs. This is supposed to be because there is less memory fragmentation. I was wondering if anyone knew about any studies providing performance statistics relating to that issue.

I don't need this for a research paper or anything... I just would like to have a little more insight next time I recompile my kernel.

Simon Bridge 08-08-2009 03:11 AM

The main advantage for having a static module is if something is needed very early in the boot process. File system modules for eg.

The performance difference is just machine cycles used to load the module, nothing fancy. You'll notice it on slow systems or those with very restricted resources. Or if you have a system which is constantly loading and unloading thousands of modules.

syg00 08-08-2009 03:33 AM

Crazy talk IMHO.
The kernel is page fixed - branching to/from loaded modules or "in-kernel" is going to be similar. I strip my kernels to make them faster to compile - that applies especially to modules. Rebuilding the modules for any of the "mega" distros take forever because there are so many of them. The only other "penalty" I can imagine is the time to load the module - insignificant in general.
I don't know of any papers - but I also don't know why anyone would bother testing this.


All times are GMT -5. The time now is 11:10 PM.