Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
deleted
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Hackeron
Guru
Guru


Joined: 01 Nov 2002
Posts: 307

PostPosted: Fri Nov 01, 2002 2:58 pm    Post subject: deleted Reply with quote

deleted - I was such a n00b back then :D --- can't have people reading this.

Last edited by Hackeron on Fri Apr 09, 2004 8:48 pm; edited 1 time in total
Back to top
View user's profile Send private message
meteor
n00b
n00b


Joined: 30 Oct 2002
Posts: 54
Location: Old School Europe

PostPosted: Fri Nov 01, 2002 4:10 pm    Post subject: Reply with quote

Using modules will give greater modularity, that is you can choose to load them or not. I find this to be more troublesome, but it does give you greater control. Using kernel support means that everything gets compiled into the kernel, which is probably better for performance. I usually pick this option, when it is something I won't be changing.

I use /etc/modules.autoload to load my eth0 driver module and my sound-card modules. As far as I can tell this is a list of modules that will be modprobed on startup.

I'm not sure what the difference between modprobe and insmod is. "modprobe <modname>" will load the <modname>-module. Check the man pages for both modprobe and insmod to get a detailed treatment of them.

Concerning the NVidia drivers - I don't remember how I made my setup work, but you definately do not have to reinstall them after every restart.
Back to top
View user's profile Send private message
lupad
n00b
n00b


Joined: 13 Oct 2002
Posts: 7
Location: South Africa

PostPosted: Fri Nov 01, 2002 5:28 pm    Post subject: Re: <KERNEL/MODULES> Please help with inserting modu Reply with quote

Hackeron wrote:
Hey,
And what's modprobe, insmod, all that, any help with that?


Modprobe resolves dependencies. Insmod doesn't. Modprobe uses insmod to do the actual work.

For example, if you ran "insmod iptable_mangle", insmod would do this:
Code:
sahara root # insmod iptable_mangle
Using /lib/modules/2.4.19-gentoo-r9/kernel/net/ipv4/netfilter/iptable_mangle.o
/lib/modules/2.4.19-gentoo-r9/kernel/net/ipv4/netfilter/iptable_mangle.o: unresolved symbol ipt_do_table_R9b424f50
/lib/modules/2.4.19-gentoo-r9/kernel/net/ipv4/netfilter/iptable_mangle.o: unresolved symbol ipt_unregister_table_Rd5829234
/lib/modules/2.4.19-gentoo-r9/kernel/net/ipv4/netfilter/iptable_mangle.o: unresolved symbol ipt_register_table_R7785782a


... because iptable_mangle depends on ip_tables.

Whereas if you ran "modprobe iptable_mangle", modprobe would use insmod like this:
this:
Code:
sahara root # modprobe -nv iptable_mangle
/sbin/insmod /lib/modules/2.4.19-gentoo-r9/kernel/net/ipv4/netfilter/ip_tables.o
/sbin/insmod /lib/modules/2.4.19-gentoo-r9/kernel/net/ipv4/netfilter/iptable_mangle.o


From the manpage:
Quote:
DESCRIPTION
The modprobe and depmod utilities are intended to make a
Linux modular kernel more manageable for all users,
administrators and distribution maintainers.

Modprobe uses a "Makefile"-like dependency file, created
by depmod, to automatically load the relevant module(s)
from the set of modules available in predefined directory
trees.

Modprobe is used to load a set of modules, either a single
module, a stack of dependent modules, or all modules that
are marked with a specified tag.
Back to top
View user's profile Send private message
Hackeron
Guru
Guru


Joined: 01 Nov 2002
Posts: 307

PostPosted: Fri Nov 01, 2002 6:57 pm    Post subject: Thanks Reply with quote

thanks for the reply, now I have a few new questions and I rephrased the nvidia kernel question.

- How do I unload modules?
- How do I know which modules to load? (is there a list)
- Can I download additional modules? and where from?
- On the NVidia kernel, when doing 'make install', my guess is it loads a module, but when I restart the pc, the module neede to be rloaded. Where can I set 'modprobe whatever' to be loaded on start?
- And is it possible to compile the 'nvidia kernel' into the kernel?
Back to top
View user's profile Send private message
some_bob
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jul 2002
Posts: 94

PostPosted: Fri Nov 01, 2002 8:17 pm    Post subject: Reply with quote

>> How do I unload modules?
"rmmod" works nicely.
>> How do I know which modules to unload...
try "lsmod"

>> Can I download additional modules? and where from?
You can sometimes, but it is better to build them from your specific
kernel headers since often, you will get unresolved symbols if the
module was not built for your specific running kernel. I wouldn't
know where since I have never downloded a pre-built module by itself.

>> On the NVidia kernel, when doing 'make install', my guess is it loads a module, but when I restart the pc, the module neede to be rloaded. Where can I set 'modprobe whatever' to be loaded on start?

no. make install just installs the target to the target directory (make
does the compiliing). You can setup modules to be loaded using
easy-to-remember-names by editing /etc/modules.d/aliases
(check out modules.conf in /etc).

ADDITIONAL NOTE: I guess it would depend on what the Makefile specifies as well, but generally, I don't believe they insert modules into a running kernel.

I have the Nvidia drivers, but I don't recall the specifics of how they are added (been awhile). Check out the nvidia website for more info on linux drivers. If you can't figure it out, I could probably dig up the process again.


Last edited by some_bob on Fri Nov 01, 2002 8:25 pm; edited 1 time in total
Back to top
View user's profile Send private message
some_bob
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jul 2002
Posts: 94

PostPosted: Fri Nov 01, 2002 8:24 pm    Post subject: Reply with quote

oh yeah, and as a comment on an earlier post:

It is generally accepted that your performance will be better with a leaner kernel: meaning with fewer drivers compiled into it.

So, I would recommend that you only compile in essentials to get your system started, and make anything else (drivers for modular devices, drivers for devices you don't use often) a module and load it when you need it.

A caveat to this is that some things can be compiled as modules or into the kernel, but actually perform better when used one way or the other. You'll kinda have to figure out this one as you go along... ;-)
Back to top
View user's profile Send private message
securiteaze
Tux's lil' helper
Tux's lil' helper


Joined: 24 Oct 2002
Posts: 77
Location: Tulsa,Oklahoma

PostPosted: Fri Nov 01, 2002 8:45 pm    Post subject: Reply with quote

Try adding 'NVdriver' to your /etc/modules.autoload
_________________
Blah..
Back to top
View user's profile Send private message
meteor
n00b
n00b


Joined: 30 Oct 2002
Posts: 54
Location: Old School Europe

PostPosted: Fri Nov 01, 2002 11:39 pm    Post subject: Reply with quote

Quote:

It is generally accepted that your performance will be better with a leaner kernel: meaning with fewer drivers compiled into it.

So, I would recommend that you only compile in essentials to get your system started, and make anything else (drivers for modular devices, drivers for devices you don't use often) a module and load it when you need it.


So you are saying that loading a module outside the kernel is faster than when the module is compiled into the kernel?

I agree that performance is better with fewer drivers compiled into the kernel, but I'm not sure about performance when it comes to loading a module versus having that exact module compiled into the kernel. I would definately think that compiling the module into the kernel would have a much greater potential for optimizing though.
Back to top
View user's profile Send private message
some_bob
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jul 2002
Posts: 94

PostPosted: Mon Nov 04, 2002 12:26 am    Post subject: Reply with quote

[quote = meteor]
Quote:

So you are saying that loading a module outside the kernel is faster than when the module is compiled into the kernel?


No. We are talking about system performance. There is no performance characteristic to speak of when comparing module insertion time to compiled drivers. What would be the point? The time it takes to insert a module (minus the typing) is so small that it does not even register on the human scale. We are talking about microseconds, maybe nanoseconds.

** WARNING: Broad generalization here. There are some (but not too many that I am aware of) instances where running as part of the kernel and running as a module makes a BIG difference. Again, your call...
If you are talking about "optimizing" drivers, it makes no difference whether you compile them in or whether you make a module. They are still compiled with the same source headers and same options, excvept for the fact that in one instance they are part of the running kernel by default and in another, they are not. If you are talking about optimizing your system, then it is definitely less "optimizing" to compile non-essential drivers (read, rarely used, but needed sometimes) into your kernel, unless specifically indicated for usability reasons.

I would not make ALL my drivers modules, but those that are not required for the system to be running, I would modularize in favor of a leaner kernel which will give you better system performance and a more optimized, leaner kernel.
Back to top
View user's profile Send private message
meteor
n00b
n00b


Joined: 30 Oct 2002
Posts: 54
Location: Old School Europe

PostPosted: Mon Nov 04, 2002 11:16 am    Post subject: Reply with quote

[quote = some_bob]

Quote:

No. We are talking about system performance. There is no performance characteristic to speak of when comparing module insertion time to compiled drivers. What would be the point? The time it takes to insert a module (minus the typing) is so small that it does not even register on the human scale. We are talking about microseconds, maybe nanoseconds.


Ok, I agree with that. I'm not familiar with the linux kernel, but in general I would think that a compiler would have greater potential for optimizing when compiling an entire system vs. compiling modules seperately.

Quote:

I would not make ALL my drivers modules, but those that are not required for the system to be running, I would modularize in favor of a leaner kernel which will give you better system performance and a more optimized, leaner kernel.


I agree completely with this.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum