View previous topic :: View next topic |
Author |
Message |
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1523
|
Posted: Mon Dec 02, 2013 6:33 pm Post subject: built in vs modular kernel modules |
|
|
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 |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21629
|
Posted: Mon Dec 02, 2013 10:53 pm Post subject: |
|
|
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 |
|
|
fpemud Guru
Joined: 15 Feb 2012 Posts: 349
|
Posted: Tue Dec 03, 2013 2:59 am Post subject: |
|
|
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 |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21629
|
Posted: Tue Dec 03, 2013 3:06 am Post subject: |
|
|
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 |
|
|
Adel Ahmed Veteran
Joined: 21 Sep 2012 Posts: 1523
|
Posted: Tue Dec 03, 2013 3:55 am Post subject: |
|
|
hmmm, that being the case, I'll start recompiling the kernel again thanks |
|
Back to top |
|
|
|