Jump to content

'build into the kernel' of 'module' ??


Recommended Posts

I'm making a .config file to recompile the mandrake kernel. I also trowing LOTS of stuff out with menuconfig..

 

1) Is it better to load stuff into the kernel (*) or make them as a module (M) ? What is faster?

2) Why should I build so much mudules when I know exactly what is going to be loaded .. I'm thinking of soundcard modules and video card here.

 

Any tips would be appreciated ..

 

THX

 

MOttS

Link to comment
Share on other sites

Sorry to reply to my own post here but I want to add something...

 

I know pretty much all the modules that are loaded when I boot .. so is it better to compile them INTO the kernel or load them as a module? .. which one is better? Is it shorter to boot when they are compiled into the kernel since we don't have to 'load' them?

 

Thx for explanations

 

MOttS

Link to comment
Share on other sites

IMHO is better to build into the kernel only the things that you know you'll always need and have the rest compiled as modules. That will create a little kernel and thus a faster one. Also if you have a slow machine like mine, the best choice is to not compile at all any superflous features -- even as a modules (a kernel compilation in a 166MHz is a pain)

 

 

But, what do you want me to say, If I'd had a machine like yours I'd compile the kernel w/o looking at the config file. I'd use all the features available :twisted: -- just a joke, the fun comes tweaking the config file ;)

Link to comment
Share on other sites

I completely agree with aru.

 

2) Why should I build so much mudules when I know exactly what is going to be loaded .. I'm thinking of soundcard modules and video card here.
If you mean all the soundcard module you don't have. Take them out completely. With alsa, just the cards not alsa and utils ect... Same with video cards. Just like b4 when you mentioned taking pcmcia out because you don't have one. You don't have 50 video cards.
Link to comment
Share on other sites

I only build modules unless I need it in the kernel to be able to boot.

 

Don't build in certain things like AGP and sound drivers, else you won'y be able to upgrade, AFAIK.

 

Basically, I leave it at whatever Mandrake had it set at, unless I'm removing it.

Link to comment
Share on other sites

THX guys!!! .. I really appreciate you help here. I started like 3 or 4 days ago to tweak the mdk kernel so I'm a real newbies to that :lol: :lol: .

 

I have another question.

If I don't care to NOT be able to upgrade things like sound modules or AGP (there is a mdk release almost every 6 months so ..), is it better to compile the kernel with all the stuff into it or keep them as modules?

 

Another question ..

I compiled the kernel yesterday with Creative SBlive! support as module. However, the MCC was set to load the following this at boot (lsmod told me that):

 

snd-pcm-oss            36932 0  (unused)

snd-mixer-oss        9016 0  [snd-pcm-oss]

snd-emu10k1            56592 0

snd-pcm                55808 0  [snd-pcm-oss snd-emu10k1]

snd-timer            9964 0  [snd-pcm]

snd-util-mem            1280 0  [snd-emu10k1]

snd-rawmidi            12864 0  [snd-emu10k1]

snd-seq-device          3836 0  [snd-emu10k1 snd-rawmidi]

snd-ac97-codec      25508 0  [snd-emu10k1]

snd-hwdep            3840 0  [snd-emu10k1]

snd                    24804 0  [snd-pcm-oss snd-mixer-oss snd-emu10k1 snd-pcm snd-timer snd-util-mem snd-rawmidi snd-seq-device snd-ac97-codec snd-hwdep]

soundcore            3780 0  [snd]

 

However, that stuff wasn't in /lib/modules so I got an error and the sound wasn't working as expected. I knew that I had compiled EMU10k1 as a module so I 'modprobe emu10k1' and got that (lsmod):

 

emu10k1                61388 0

ac97_codec          10888 0  [emu10k1]

sound                  57652 0  [emu10k1]

soundcore            4068 0  [emu10k1 sound]

 

And my sound started to work just PERFECT! .. so why the default mandrake kernel load so much stuff for nothing? What about compiling those 4 modules WITH the kernel? .. this way I'm not gonna have to modprobe every boot.. thus faster boot. Is this applicable to other stuff too like my ethernet card driver (8139too) and sensors (w83781d, i2c-proc, i2c-amd756, i2c-core) and .. you see the thing?

 

Thx again!!! I appreciate your help and suggestion.

 

MOttS

Link to comment
Share on other sites

is it better to compile the kernel with all the stuff into it or keep them as modules?
IMO, for the few things you're going to do this with, I don't think it really matters, although should you ever have a problem you can't remove it from the kernel. BUT, when have you ever had to remove your sound mods or agp mods? If it was me, I still make them as mods, just in case.

 

 

 

And my sound started to work just PERFECT!
That's what I thought in 8.1 with no alsa support in the kernel. My sound card uses the OSS driver. But I had problems like random freezes. I don't really know for sure it was the reason, but it was the only thing diff between 2 kernel versions, on my end anyway. That's why I suggested leaving alsa support, and probably the alsa mods for your card. They were never loaded, and I never had probs with games, but some games, or a game (chromium) requires alsa. Doesn't make sense to me, but.......

 

 

What about compiling those 4 modules WITH the kernel? .. this way I'm not gonna have to modprobe every boot.. thus faster boot. Is this applicable to other stuff too like my ethernet card driver (8139too) and sensors (w83781d, i2c-proc, i2c-amd756, i2c-core
You'll either modprobe and not find anything to load, or not modprobe, but you'll have a bigger kernel. In size, to put in the kernel is a lot bigger than a module. What good does it do to boot faster and run slower when you've booted? See? That's what they say anyway. But again, if you're not putting many in the kernel, It won't make a diff.

 

You have to be careful, when changing from mod to kernel and vise versa, because the compile can fail during make modules, or even make bzImage. Happened to me a couple of times. Example: You change a usb option from M to Y. Then you leave your mouse option at M. Well, it said you could. It gave you the option to, and that's what you want, so when you get to make modules make can't find the usb because it's in bzImage. All I can say is, somewhere the config program/scripts failed to not allow you to make the mouse M. I'm guessing this sort of thing is why DOlson said he leaves them alone, or takes it out. So you learn quickly to keep related items in sync.

Link to comment
Share on other sites

You'll either modprobe and not find anything to load, or not modprobe, but you'll have a bigger kernel. In size, to put in the kernel is a lot bigger than a module. What good does it do to boot faster and run slower when you've booted? See? That's what they say anyway. But again, if you're not putting many in the kernel, It won't make a diff.

 

So the key thing for running as fast as possible is to make the kernel as small as possible. Am I right?

 

Also, boot time goes down when everything is compiled in the kernel. Am I right? (if we set the computer to NOT modprobe what is already in the kernel ... like the sound card driver, apg, network..)

 

You have to be careful, when changing from mod to kernel and vise versa, because the compile can fail during make modules, or even make bzImage. Happened to me a couple of times. Example: You change a usb option from M to Y. Then you leave your mouse option at M. Well, it said you could. It gave you the option to, and that's what you want, so when you get to make modules make can't find the usb because it's in bzImage. All I can say is, somewhere the config program/scripts failed to not allow you to make the mouse M. I'm guessing this sort of thing is why DOlson said he leaves them alone, or takes it out. So you learn quickly to keep related items in sync.

 

Ok so I'll keep the settings as they are and just remove stuff that I don't need. Thx!

 

MOttS

Link to comment
Share on other sites

So the key thing for running as fast as possible is to make the kernel as small as possible. Am I right?
Yes!

 

 

Also, boot time goes down when everything is compiled in the kernel. Am I right?
I don't know. I mean, the "searching for module dependencies" on my boot text output takes about 3 sec. and I load about 35 mods at startup.
if we set the computer to NOT modprobe
Is there a switch for that? And is it worth 3-5 sec. to enlarge the kernel, and not have the option to take them out of runtime? It's up to you.
Link to comment
Share on other sites

Hey THX bvc!! .. I'm starting to understand what are the consequences of loading modules at boot time versus build them within the kernel.

 

if we set the computer to NOT modprobe
Is there a switch for that? And is it worth 3-5 sec. to enlarge the kernel, and not have the option to take them out of runtime? It's up to you.

I was not thinking about the mod dep check but about the time the sound modules are loaded (enumerated above), the time my ethernet driver is loaded (8139too), the time it takes to load the usb driver (usbcore & usb-ohci) .. etc. We can turn that service off from the MCC since this we be supported within the kernel now. And anyway I need those drivers. Anyway... I'll make some test and if I don't see much diff I'm going to run the default kernel and that's it. :lol:

 

Thanks for the info again BVC, Dolson and Arasubal (Welcore on this board man!!!).

 

MOttSS

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...