Subject: Re: Prototype kernel continuation-passing for NetBSD
To: Jonathan Stone <firstname.lastname@example.org>
From: Bill Studenmund <email@example.com>
Date: 01/28/2004 15:07:58
Content-Type: text/plain; charset=us-ascii
On Wed, Jan 28, 2004 at 01:04:00PM -0800, Jonathan Stone wrote:
> The code below is a sample implementation of ``continuation-passing''
> for the NetBSD kernel. If you're not familiar with languages that have
> functions, closures, and continuations as first-class objects, think
> of this as a framework for handling ``callback functions'': specifically
> creating, enqueing, managinging, and deferring callbacks to some lower
> interrupt priority.
Interesting. Do you have any recomended reading for those of us who aren't=
familiar with continuations? :-)
> Long-term, I have an interest in reworking the NFS code (primarily the
> server side, but client-side is interesting too) to not depend on
> having a process context to do I/O. The I/O rates achievable today
> with high-end hardware (and thus in a couple of years with mid-range
> hardware) are high enough that a context-switch per NFS I/O is
> prohibitive. Eventually, I'd like to replace or augment the
> process-based I/O notification (processes sleeping on buffers) with a
> kcont-based notification mechanism. In that world, I/O requests would
> pass a kcont down through the I/O system, and each struct buf would
> have a list of continuations to call when I/O on the buffer completes.
> That's a ways off yet :-).
> I have some immediate uses for a kcont-like interface; so any feedback
> on this would be appreciated.
Do you have any example code? So far it's a nice looking framework, but=20
I'm not really sure what it'd be (specifically) used for & how. Thus it's=
kinda hard to comment on how well it works. :-)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)
-----END PGP SIGNATURE-----