[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: lsmod question (was....Sound issues using 2.4.18-bf2.4-xfs and SB Live! 5.1)



Andy said:
> A side question if you don't mind.....
> It is my understanding that people use modules
> to make a lighter/smaller kernel.  Is that correct?
> Other reasons....?

some things cannot be compiled into the kernel, or cannot be
easily compiled into the kernel. examples are nvidia drivers,
vmware drivers, lm_sensors, and more ..

sometimes it is useful to be able to "unload" a driver perhaps
to try to reset a device, or free up memory or something.

also it provides limited functionality to do a "hot upgrade"
on modules since the code can be removed and re-inserted(though
due to many kernel things the usefulness of this in my experience
is quite limited at the present time).


> I have compiled kernels 30 times or so and most of the
> time I have no modules loaded.  (maybe because I am clueless?)

no, it just means you probably don't need any modules loaded,
or you don't need the functionality that modules provide. I am
the same way. If it can be compiled into the kernel it will
be on my systems. Which makes me sad to see that future linux
kernels will be module-only. static kernels also make for
easier moving kernels between machines since its just 1 file.
this has helped me in the past.


> Are modules supposed to load automatically?

they can be, the kernel module autoloader is designed to
try to automatically load any modules it "thinks" you may
need, I personally do not like this feature and turn it off
on all my kernels.


> For example, if I don't know my sound card on my laptop, and
> I load every sound module when doing xconfig, and then
> upon first boot, does linux simply see what card I have and
> then load appropriate module?

in the case of a soundcard, probably not. but in the case of
something like a USB device, a filesystem driver, a networking
driver etc, the kernel module loader can try to load the driver
for you. Since I build my own kernels, and know what hardware
I have(&plan to use) I disable this feature so my logs don't
start filling up with messages from the kernel saying it can't
find XX module that it thinks I need.


> You will see below he has smbfs as a module.
> When I put the samba file system into my kernel as
> a module, and I run lsmod, there is nothing there.
> Does it get loaded if I try to mount a samba server?

if you built it directly into the kernel instead of module
it will be there, it loads when the kernel does, you can
cat /proc/filesystems to see what filesystems are supported
by the drivers you have loaded.

nate





Reply to: