Auto-loading Kernel Modules
When configuring your system, at first you may think it would be best to compile everything as a module. This isn't always a good idea, as it won't always save memory. Each module uses memory in 4K pages, so the last page will generally have some space wasted. Therefore, if you'll almost always have the module in use, you might as well compile it into the kernel. Also, keep in mind that kerneld itself consumes some memory (in my experience, at least 12 pages), so if you only have a few small modules to worry about, it would be better to compile them into the kernel or load them explicitly in the startup script.
Modules for file systems must be loaded as long as the file system is mounted, even if you're not using it. So if you keep /dos mounted all the time, don't bother to compile support for FAT as a module. If you don't like that option, you could look into using an automount daemon instead of keeping the file system mounted.
Be careful with modules that include information that may be changed when run. For example, the sound driver keeps track of the volume, and if you compile it as a module, the volume will be reset to the default each time it is loaded.
Finally, be careful not to compile something as a module if it will be used at boot time before kerneld is started. This includes the root file system, of course. For many systems, you'll find that you need both ELF and a.out support before kerneld starts. You may be able to overcome some problems by installing kerneld as one of the first programs executed by the startup scripts, but be careful if you're also doing dial-on-demand, as you may have something like sendmail in your startup scripts that will trigger it. As long as you have your old kernel around as a safety net, though, feel free to experiment.
Preston Crow Preston Crow is a graduate student in computer science at Dartmouth College. He became a happy Linux user in the summer of 1995, shortly before becoming happily married.
- Readers' Choice Awards 2013
- Linux Kernel News - November 2013
- Mars Needs Women
- RSS Feeds
- Sublime Text: One Editor to Rule Them All?
- December 2013 Issue of Linux Journal: Readers' Choice
- Raspberry Pi: the Perfect Home Server
- Advanced Hard Drive Caching Techniques
- New Products
- Web Administration Scripts
- thanks for share, great
1 min 33 sec ago
- There are factors which are
5 hours 1 min ago
- Gnome 3 ?
5 hours 46 min ago
- Reply to comment | Linux Journal
9 hours 53 min ago
- "Redis RethinkDB 4.5%" on Best NoSQL Databases
19 hours 59 min ago
- on the ground
1 day 2 hours ago
- I was able to read the whole
1 day 3 hours ago
- since i have read the title i
1 day 7 hours ago
- Belanja Online Cari Voucher Diskon
1 day 7 hours ago
- The kernel doesn't really
1 day 19 hours ago