Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Sep 2006 07:51:14 -0700 (PDT)
From:      backyard <backyard1454-bsd@yahoo.com>
To:        Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>, David Wassman <opensrc.root@gmail.com>
Cc:        FreeBSD-Questions Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: Device Drivers and Kernel Modules
Message-ID:  <20060905145114.501.qmail@web83109.mail.mud.yahoo.com>
In-Reply-To: <441wqqlc97.fsf@be-well.ilk.org>

next in thread | previous in thread | raw e-mail | index | archive | help


--- Lowell Gilbert
<freebsd-questions-local@be-well.ilk.org> wrote:

> "David Wassman" <opensrc.root@gmail.com> writes:
> 
> > I am trying to figure out which would be best, to
> load all the device
> > drivers through compiling them into the kernel or
> to load them at boot
> > through loader.conf.
> >
> > I would think that loader.conf would be more
> convenient as changing hardware
> > wuld not require a rebuild of the kernel. Is there
> a draw back to loading
> > devices this way other than a longer boot up time
> (which should not be an
> > issue as the system is 24-7)?
> 
> There is little difference for your purposes.
> 
> > I have also heard that loading modules through the
> loader.conf saves on RAM
> > performance as the module in question is not
> loaded into memory until it is
> > used as opposed to being loaded with the kernel.
> If this makes no sense, i
> > appologize. I remember reading it somewhere on a
> mailing list several years
> > ago and can't find the reference anymore. From
> memory it stated modules such
> > as cd9660 could be loaded through entering
> CD9660_load="YES" in
> > loader.confand that it would not be used in memory
> until a cd was
> > mounted. I am
> > assuming this is true (if it is) for other modules
> as well.
> 
> It isn't true at all.  Loading a module really does
> load it into memory.
> 
> -- 
> Lowell Gilbert, embedded/networking software
> engineer, Boston area
> 		http://be-well.ilk.org/~lowell/
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
>
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe@freebsd.org"
> 

In general if it is hot pluggable modules are the best
with the appropriate configurations in the daemons
that track hardware changes. If it won't come out
during the system running then in the kernel is the
best. Unless your running an old system recompiling a
kernel is 15 minutes of time away. And since its a
server you likely will not be constantly updating your
base, but even still a new world and kernel should
only be an hour tops away, unless you using older
equipment.

Generally Cardbus/PCMCIA cards you would want modules
so you can save a second or two booting and a few k of
RAM & have them load and unload as needed, Gvinum is
recommended as a module so you can restart it, USB
dongles (bluetooth and such) and what not (although
drives I generally put in the kernel) Personally I put
all the hardware I plan on using in the kernel because
it can make life slightly easier. That and unless your
doing embedded development or running a 486 you will
probably have enough RAM for the additional overhead.

In a server scenario your going to be pluggin in hard
drives which is and should be built it. I doubt your
going to have a sound card, and probably not even DRI
modules to contend to. You should have enough RAM
where  having everything in the kernel isn't going to
matter much. This DOES NOT mean use every option when
building, but if your server has the hardware, enable
it. I believe using modules uses slightly more RAM
because the kernel needs the hooks to the module and
then the module on top of the hooks, versus just
having the code in the kernel, but this is my
understanding of things.

-brian




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060905145114.501.qmail>