Page 1 of 1

Kernel support questions

PostPosted: Fri Nov 07, 2003 3:54 pm
by Master of Reality
I'm compiling the 2.6.0-test9 for my system and..
I would like to know... should i be compiling the support for things like my SiS chipset, video, network, sound in the kernel, or make them modules??

PostPosted: Fri Nov 07, 2003 5:17 pm
by Void Main
I like to make everything that can be compiled as a module a module.

PostPosted: Fri Nov 07, 2003 5:47 pm
by Tux
Its up to personal preference really, some people, like void, like to go for a hell for leather stripped kernel, others like lots compiled right in incase they ever have module loading issues.
I usually compile anything thats on the motherboard right into the kernel along with ext2/3 support and then the rest as modules.
But however you like to mix it is fine...

P.S. make sure you apply bk12

PostPosted: Fri Nov 07, 2003 5:53 pm
by Void Main
I have several reasons I like modules. For one, there is no chance up upgrading a driver on the fly without rebooting if it's compiled into the kernel. Sometimes I like to hack and reload drivers and it's nice not having to reboot.

PostPosted: Fri Nov 07, 2003 5:58 pm
by Tux
Yeh, thats why i tend to leave stuff like tv cards and other devices as modules.

PostPosted: Fri Nov 07, 2003 8:03 pm
by Master of Reality
whats bk12 and how do i apply it?

Im using mostly modules so that i can upgrade drivers if i want (which i realize has come in handy before). Is there any speed difference at all between linking it in the kernel and making a module?

PostPosted: Fri Nov 07, 2003 8:27 pm
by Void Main
It's a patch file to bring you up from the base 2.6.0-test9 kernel source to the current BitKeeper version (bk12 in this case). You have to download the base kernel source and then apply that patch to that source. Usually you would extract the kernel source under the /usr/src directory so the base directory will be something like "/usr/src/linux-2.6.0-test9". Usually you apply the patch by doing something like:

# cd /usr/src/linux-2.6.0-test9
# bzcat /path/to/patch-2.6.0-test9-bk12.bz2 | patch -p1

I haven't actually compiled a 2.6.0 kernel yet as I have just been installing the latest 2.6.0-testX prebuilt RPM that a Red Hat empoyee has been building on a regular basis via apt-get (I'm getting lazy).

Regarding speed. There are two opposing pros and cons when it comes to modules vs static. One is size and one is speed. Each of these are so minute that neither are really noticable. On the one hand you have the time it takes to actually load a module which usually only happens once (but could happen more than once depending on how you use your hardware and whether you have your system configured to automatically unload modules that have not been used for a period of time). This load time is like a fraction of a millisecond and as I said is something you wouldn't even notice. Once loaded the operation is really no different than if it were compiled in. Obviously if you only load modules for devices you are actually using the kernel space will be smaller, but again, probably not enough to really mean anything compared to the amount of memory you actually have.

To me, the kernel should be nothing more than a stub built to load modules and every function/driver should be a module, and this is the direction that the kernel is going. Done right this would help in allowing you to upgrade your kernel without actually having to reboot the system. I thought this was a goal for the 2.6 kernel but I don't know what the status of this is.

Of course there are other advantages/disadvantages of each. I just like a modular kernel.