Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Oct 1999 15:02:09 -0700
From:      Mike Smith <mike@smith.net.au>
To:        James Howard <howardjp@wam.umd.edu>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: KLDs 
Message-ID:  <199910102202.PAA08093@dingo.cdrom.com>
In-Reply-To: Your message of "Fri, 08 Oct 1999 19:14:17 EDT." <Pine.GSO.4.10.9910081901240.20621-100000@rac9.wam.umd.edu> 

next in thread | previous in thread | raw e-mail | index | archive | help
> On Slashdot, in a discussion regarding QNX, someone described it with the
> following:
> 
> 	Under QNX, if your driver crashes, the kernel just restarts it. 
> 
> After reading it, I became more interested in KLDs.  My only prior
> experiece was installing the Linux KLD and that was done by a port.

You should note that neither QNX nor FreeBSD exhibit the above 
behaviour.  KLD is a linker; it allows you to link more stuff into the 
kernel after it's been started.  It doesn't implement a coprocess model 
of any sort.

> Anyway, in an effort to learn, I decided to KLD-ify EXT2FS support.  It
> took about 20 minutes and works great, but I still do not know how KLDs
> work.  :) 

I think the general idea is that you're not meant to worry about it.  8)
If you're in need of more information, I can really only direct you to 
the sources.

> (I submitted the patch in kern/14217, if someone could look at
> it, that would be swell.  I've been able to mount, read, write and umount
> without any problems)

(noted)

> Anyway, back to the point, if it is this so simple (is it?), how much of
> the kernel can be KLDs?  It would be interesting to see a kernel so small
> that all it had was KLD support in it and everything else was a module. 

Indeed it would.  There's some fairly strong resistance to this being 
the _only_ way that FreeBSD works, but the level of modularity you 
describe is certainly a goal we are working towards.

> Has anyone else thought about this?  Is this a good idea?  Is this a
> bad idea?

Yes, Yes, Yes.

>  How fundamentally different would this be from
> a microkernel?

Very.  There is only one protection domain in the FreeBSD kernel, and 
KLDs live inside it.

>  Could things be done in such a way that like QNX, it can
> kill and restart a misbehaving driver?  What other cool things can be
> done?

QNX doesn't do that.  We can't either, unfortunately.  The limits on 
"cool things" are so wide that listing them here would be extremely 
tiring. 8)

-- 
\\ Give a man a fish, and you feed him for a day. \\  Mike Smith
\\ Tell him he should learn how to fish himself,  \\  msmith@freebsd.org
\\ and he'll hate you for a lifetime.             \\  msmith@cdrom.com




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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