View previous topic :: View next topic |
Author |
Message |
kaega2 n00b
Joined: 29 Nov 2004 Posts: 60 Location: Ontario, Canada
|
Posted: Sat Jun 25, 2005 2:40 am Post subject: Compile in kernel, or as module? |
|
|
I was wondering what the advantages and disadvantages are of compiling a kernel feature in the kernel or as a module.
I would think that compiling in the kernel would always be better unless you didn't plan to load the module all the time (which I don't have). Most of the documentation I read always tells you to compile as a module and I'm curious if there's a reason for that.
Thanks |
|
Back to top |
|
|
psylence Tux's lil' helper
Joined: 08 May 2004 Posts: 113 Location: Midwest, USA
|
Posted: Sat Jun 25, 2005 3:12 am Post subject: |
|
|
If your goal is super long uptime, modules are best, as you can update the driver, and reload it without rebooting.
As far as the kernel is concerned, the difference is negligable, performance differences are also minimal... Personally I make a big fat kernel w/exactly what I need for my system and a few modules for stuff I might need (NTFS, FAT filesystems, stuff like that), and call it good. |
|
Back to top |
|
|
wetter n00b
Joined: 13 Jan 2004 Posts: 26 Location: amsterdam
|
Posted: Sat Jun 25, 2005 4:06 pm Post subject: |
|
|
yes, modules make it flexible. so if you have hardware that you rarely use you can load some modules as you need them and run a smaller kernel otherwise.
the rationale behind running a monlythic kernel afaik is security. so if you install a gateway with firewall for sharing an internet connection and you know there'll be no aditional hardware you night want to compile everything into the kernel and disable module loading completely.
but then, now that you have address space randomization that might not be as important any more. |
|
Back to top |
|
|
smerf l33t
Joined: 06 Nov 2004 Posts: 778 Location: Polska
|
Posted: Sat Jun 25, 2005 4:26 pm Post subject: |
|
|
completely disabling ability to load modules may not be wise: sometimes you need to use modules distributed separately (ie drivers for video card) - but, personally i'm using rather monolythic kernels with very limited number of rarely used modules (ie vfat, usbstorage) _________________ Microsoft is not the answer, Microsoft is the question, the answer is no. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54097 Location: 56N 3W
|
Posted: Sat Jun 25, 2005 4:30 pm Post subject: |
|
|
smerf,
I have a minimal kernel that can get the machine booted with no initrd.
With modules, its easier to solve problems and pass module parameters because they can be added and removed without a restart.
The performance penalty, if any, is too small to measure. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
smerf l33t
Joined: 06 Nov 2004 Posts: 778 Location: Polska
|
Posted: Sat Jun 25, 2005 4:40 pm Post subject: |
|
|
You're right, but in my case: there are no parts of kernel that need parameters, and i'm not going to add/remove module responsible for ie my network card at runtime - everything that is used rarely i've placed in modules as I've said in previous post. I think that is also matter of individual preferences, something like vi vs emacs _________________ Microsoft is not the answer, Microsoft is the question, the answer is no. |
|
Back to top |
|
|
Maedhros Bodhisattva
Joined: 14 Apr 2004 Posts: 5511 Location: Durham, UK
|
|
Back to top |
|
|
|