On 2003-03-07 15:06, Bill Moran <[EMAIL PROTECTED]> wrote:
>Damien Tougas wrote:
>>Is there any advantage/disadvantage to using kernel moduls
>>vs. staticly linking stuff in the kernel? I would like to eliminate
>>everything from my kernel config that can be loaded as a module,
>>then load them at boot using loader.conf. Is there any reason I
>>would not want to do that? It seems to me that it would make things
>>much easier.
> I would guess there are a number of reasons ...  First would be
> historical.  BSD is historically a monolithic kernel.  The more you
> rely on modules, the more the kernel acts like a microkernel.  I
> suspect that some day, FreeBSD will be a microkernel, but I don't
> expect that to be for many, many releases.  The change involves a
> lot.  For now, though, FreeBSD is still a monolithic kernel, and
> people treat it that way even when need does not require it.  The
> other reason I've heard is that KLDs don't run as fast and use more
> memory than the same functionality compiled into the kernel.  I've
> never tested this, but I'm guessing that the difference is
> negligible on modern hardware.
>> Why does FreeBSD not do this by default for the GENERIC kernel?
> Not sure.

The GENERIC kernel needs to support release CD-ROMs.  Looking at the
logs of GENERIC since day 1, it sems that there are various reasons
for putting things "in" GENERIC and not in modules.

a) Some things are put into GENERIC because it's hard to make them
   work as modules.

        INET, device ether, etc.

b) Other things are absolutely necessary to be able to boot into the
   installation program.

        FFS support, MD_ROOT, NFSCLIENT and NFS_ROOT, atapi, scsi and
        usb device drivers (imagine the frustration of trying to
        install with a USB keyboard, but without USB support).

If I'm wrong, I'm sure someone with better knowledge of the kernel
internals will correct me[?].

Bearing this in mind, in 5.X there is now a third floppy disk when
installing from floppies.  The 'drivers' floppy contains a lot of
drivers as modules... so, some effort is being done to modularise
things as much as possible :-)

- Giorgos

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to