Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
built in vs modular kernel modules
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
blakdeath
Guru
Guru


Joined: 21 Sep 2012
Posts: 393

PostPosted: Mon Dec 02, 2013 6:33 pm    Post subject: built in vs modular kernel modules Reply with quote

I've been modifying my kernel for the past few days to get a smaller kernel(for performance and educational purposes), and now I started windering, we modularize an object so it gets loaded when its needed, but what about the objects that are always loaded when the machine is rebooted
for example, the unix domain sockets are always loaded after I've chose to modularize that option
in that case, will rebuilding it back into the kernel be better in ANY way?(performance, boot speed..etc)

I'm interested in knowing what people think regarding this matter
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 8594

PostPosted: Mon Dec 02, 2013 10:53 pm    Post subject: Reply with quote

Yes, it will be better. If you include it in the main image, you save the cost of loading the module and resolving its references. You may also benefit from simpler code at runtime since calls can be linked directly to their destination instead of requiring a call-by-pointer.
Back to top
View user's profile Send private message
fpemud
Tux's lil' helper
Tux's lil' helper


Joined: 15 Feb 2012
Posts: 123

PostPosted: Tue Dec 03, 2013 2:59 am    Post subject: Reply with quote

Why does kernel provider the option of selecting the network components as modules?
Is there any use case that compiling unix domain socket as module is better?
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 8594

PostPosted: Tue Dec 03, 2013 3:06 am    Post subject: Reply with quote

An embedded device might need network only to run debugging related functionality, in which case shipping networking as a module would allow it to save memory when debugging is not enabled. Generally, compiling something as a module is better if you expect that it will be unloaded most of the time.
Back to top
View user's profile Send private message
blakdeath
Guru
Guru


Joined: 21 Sep 2012
Posts: 393

PostPosted: Tue Dec 03, 2013 3:55 am    Post subject: Reply with quote

hmmm, that being the case, I'll start recompiling the kernel again :D thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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