LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 08-06-2009, 07:20 PM   #1
CoderMan
Member
 
Registered: Jan 2009
Location: Gemini Capsule 25164
Distribution: Gentoo
Posts: 375
Blog Entries: 24

Rep: Reputation: 43
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.
 
Old 08-08-2009, 04:11 AM   #2
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
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.
 
Old 08-08-2009, 04:33 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,504

Rep: Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079Reputation: 1079
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling a module separately without compiling entire kernel kushalkoolwal Linux - Kernel 8 08-06-2008 02:45 AM
How to link a static library to a kernel module pallava Linux - Newbie 1 09-26-2007 09:25 PM
netfilter/iptables in kernel: module vs static -Nw- neX Linux - Security 5 03-25-2005 07:44 PM
true way on compiling kernel and static iptables klog2_k Linux - Software 0 07-15-2003 11:21 PM
Kernel compiling and module compiling tarballed Linux - General 1 12-22-2002 06:31 PM


All times are GMT -5. The time now is 06:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration