From owner-freebsd-hackers Sun Sep 15 13:37:51 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 744F337B400 for ; Sun, 15 Sep 2002 13:37:49 -0700 (PDT) Received: from host217-39-97-162.in-addr.btopenworld.com (host217-39-97-162.in-addr.btopenworld.com [217.39.97.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id E163643E65 for ; Sun, 15 Sep 2002 13:37:48 -0700 (PDT) (envelope-from dom@host217-39-97-162.in-addr.btopenworld.com) Received: by host217-39-97-162.in-addr.btopenworld.com (Postfix, from userid 1001) id 318862A6; Sun, 15 Sep 2002 21:38:36 +0100 (BST) Date: Sun, 15 Sep 2002 21:38:35 +0100 From: Dominic Marks To: Jamie Heckford Cc: freebsd-hackers@freebsd.org Subject: Re: Kernel - Modules and Compiled in Message-ID: <20020915203835.GA3497@gallium> References: <001001c25d36$a3672be0$83bf83d5@BONG> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <001001c25d36$a3672be0$83bf83d5@BONG> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Sep 15, 2002 at 09:07:56PM -0700, Jamie Heckford wrote: > Hi, > > I've noticed by having to admin a few linux boxes in my time that the majority of the kernel > drivers are loaded via modules, comparing this to freebsd it seems to be that most drivers > are compiled into the kernel and utilities such as ipfw/linux emu. are loaded as modules. > > I was wondering what the advantages/disadvantages are of using kernel modules as opposed to > compiling them in? advantages: you can update a module without rebooting a machine, if a bug was fixed in say the msdos filesystem module you could compile it, unload the existing module and load the newer version. vendors can distribute a binary module if they cant, or dont wish to release the source. lots of others. disadvantages: some drivers need to be able to allocate a large chunk of contiguous memory to operate correctly, this means some drivers cant work when not compiled in to the kernel (because they dont get their request for a block of memory in early enough). I was thinking about this recently, perhaps if the kernel allocated a chunk of memory early on in the boot process (amount configurable via sysctl) then this could be chopped up and handed to modules specifically, there is probably a good reason why this isnt possible (?) which has not occured to me, because it seems like the common sense solution. FreeBSD 5 will have many more things accessible via modules, a trend which is likely to continue. > If someone could kindly let me know or shout where theres an in-depth explanation on the net > I would be grateful :) > > Cheers, > > -- > Jamie Heckford > jamie@jamiesdomain.org.uk > http://www.jamiesdomain.org.uk/ > > FreeBSD: The Power to Serve > > -- > ____________________________________________________ > Message scanned for viruses and dangerous content by > and believed to be clean > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message -- Dominic Marks Computer & Politics Geek [educ]::[umist.ac.uk] << notyet-known at umist.ac.uk >> [home]::[btinternet] << dominic_marks at btinternet.com >> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message