Subject: Re: Prototype kernel continuation-passing for NetBSD
To: Jonathan Stone <jonathan@dsg.stanford.edu>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 01/28/2004 15:07:58
--MfFXiAuoTsnnDAfZ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Wed, Jan 28, 2004 at 01:04:00PM -0800, Jonathan Stone wrote:
>=20
> 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=
=20
familiar with continuations? :-)
[snip]
> 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 :-).
>=20
> 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=
=20
kinda hard to comment on how well it works. :-)
Take care,
Bill
--MfFXiAuoTsnnDAfZ
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)
iD8DBQFAGEDOWz+3JHUci9cRAqR/AJ958TlJCEL+6wgqnnb9CLPcaLl+ZgCgjmib
4VsYzM+IxlLNwMyOFCevEGY=
=XSgu
-----END PGP SIGNATURE-----
--MfFXiAuoTsnnDAfZ--