LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Kernel Compilation issues (http://www.linuxquestions.org/questions/linux-general-1/kernel-compilation-issues-3671/)

vinaypai 06-24-2001 05:26 PM

Kernel Compilation issues
 
Hi folks,
1. I've downloaded (and built (successfully(more-or-less))) the Linux 2.4.1 kernel. I chose to include everything in the kernel image, even if it can be made into a module. Is this a bad thing? If so, why? If not, why does the documentation say that you "build essential drivers into the kernel and compile the rest as modules".

2. The documentation recommends using gcc 2.95.3 (or thereabouts... don't remember exactly which version). Is there a problem using a later (stable) build of gcc to build my kernel, like the newly-released gcc 3.0?

DavidPhillips 06-25-2001 02:41 AM

The reason is..
 
Most people don't need everything, They might later on but not now. Later they can load a module if the kernel will support it. If you change out something in your system like a soundcard or nic if it is a module then the new card can be loaded as a module and the one you took out unloaded. This is why it is a good idea to load some of your nonessential hardware as a module.

So if you think you will need it later choose the module option. If you know you will never need it why fatten up the kernel.

For example, I have no plan to go out and buy a Gravis Ultrasound card so why put it in the kernel.

The smaller it is the faster.:Pengy: :Pengy:


vinaypai 06-25-2001 11:59 AM

When I said everything, I didn't mean every blessed thing the kernel sources contain. I meant everything relevant to my hardware and what I plan to use (eg. I chose not to include NFS support, etc.). I don't add new hardware everyday, and when I do, I'm sure I can spend the 15 mins it takes to recompile.

Wouldn't loading modules etc. etc. impose extra overhead over having it simple compiled into the kernel?

jharris 06-25-2001 12:17 PM

There is an overhead to loading a module but if you're looking to save memory then its probably worth it, although the amount you'll save won't be amazing compared to the available memory in a modern system.

As for smaller being faster I'm not sure - someone said this a little while ago (can't remember who) on the forum and I asked them to justify this (becuase I'm curious not because I'm trying to catch them out!) but don't think I got a response. I don't see why a kernel with code in it that isn't used would be slower than a kernel that doesn't have the code there - the only advantage I can see is really clear is the memory saving. Any justification DavidPhillips?

I tend to just chuck the things I deem as non-essential in as modules and let them autoload... Saying this if you miss something like floppy support I've had problems in the past where I've lost access to the partition holding my modules and then needed to gain access to the floppy disk for something to do with the repair, but couldn't as the module wasn't there :(

cheers.

Jamie...

GonzoJohn 06-25-2001 02:01 PM

To answer your question with another question:

How big was the compiled kernel you installed?

If it's over 1 MB, you can do a lot better.

vinaypai 06-25-2001 02:37 PM

~ 950 KB bzImage

Inclusive of every driver I want.

DavidPhillips 06-26-2001 12:04 AM

Saw your post Jamie
 
They did reply later in same thread, Quoted Redhat Service or something like that, it said it's faster© I would think they should know, but I am still pretty new to linux© You have a point©

I did see it in the Linux Bible that it was faster©

Maybe it is just for boot, since the modules are always loaded if you only build in the ones you use anyway©



I have a fast computer now with lots of ram and it probably does not matter much©

jharris 06-26-2001 03:06 AM

Re: Saw your post Jamie
 
Quote:

Originally posted by DavidPhillips
They did reply later in same thread, Quoted Redhat Service or something like that, it said it's faster© I would think they should know, but I am still pretty new to linux© You have a point©

I did see it in the Linux Bible that it was faster©

Maybe it is just for boot, since the modules are always loaded if you only build in the ones you use anyway©

Thanks for the input, I might have a hunt around the web later and see if I can turn up anything specific. Hadn't really considered the boot time but yeah, a smaller kernel would uncompress and load faster so thats one point where is makes sense.

cheers.

Jamie...


All times are GMT -5. The time now is 02:15 AM.