Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Compile in kernel, or as module?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
kaega2
n00b
n00b


Joined: 29 Nov 2004
Posts: 60
Location: Ontario, Canada

PostPosted: Sat Jun 25, 2005 2:40 am    Post subject: Compile in kernel, or as module? Reply with quote

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
View user's profile Send private message
psylence
Tux's lil' helper
Tux's lil' helper


Joined: 08 May 2004
Posts: 113
Location: Midwest, USA

PostPosted: Sat Jun 25, 2005 3:12 am    Post subject: Reply with quote

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
View user's profile Send private message
wetter
n00b
n00b


Joined: 13 Jan 2004
Posts: 26
Location: amsterdam

PostPosted: Sat Jun 25, 2005 4:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
smerf
l33t
l33t


Joined: 06 Nov 2004
Posts: 778
Location: Polska

PostPosted: Sat Jun 25, 2005 4:26 pm    Post subject: Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43015
Location: 56N 3W

PostPosted: Sat Jun 25, 2005 4:30 pm    Post subject: Reply with quote

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
View user's profile Send private message
smerf
l33t
l33t


Joined: 06 Nov 2004
Posts: 778
Location: Polska

PostPosted: Sat Jun 25, 2005 4:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
Maedhros
Bodhisattva
Bodhisattva


Joined: 14 Apr 2004
Posts: 5511
Location: Durham, UK

PostPosted: Sat Jun 25, 2005 8:15 pm    Post subject: Reply with quote

Please see this FAQ: https://forums.gentoo.org/viewtopic-t-58790.html

Moved from Installing Gentoo to Duplicate Threads.
_________________
No-one's more important than the earthworm.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum