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: 03/26/2004 17:24:32
--MGYHOYXEY6WxJCY8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Mar 26, 2004 at 01:23:57PM -0800, Jonathan Stone wrote:
> 2.  The functionality of kcont is richer than generic-softints. We could
>     reworked generic-softints to be a full replacment for kcont, but it'd
>     look (modulo Matt's other points) much like kcont does now.

=46rom my limited understanding of continuations in general, I'd agree kcon=
t=20
has more long-term potential.

> 4. IPL_*. issues. kcont  already has separate queues for each currently-s=
upported
>    deferred IPL. The  semantics between them, and the misuse of IPL_* val=
ues,
>   (the comparison) needs to be cleaned up. Other ideas (such as  ping-pon=
ging
>    already-allocated kconts from one queue to another)  should be documen=
ted, or abandonded.

As I noted to Matt, we may need to order spl's for SMP anyway, so this=20
issue may go away.

> 5.  Since there's no example code in the tree, the design intent and *all*
>     planned/envisaged uses, need to be  spelled out.

Could you please get something in-tree soon? If I understand you right,
you have splice(2) working for network sockets and files. An example
splice(2) that made sure it only hooked network sockets and files=20
together would serve as an interum example, and may clarify kcont a lot.

> 6.  Matt strongly wants to restrict allocation of kconts to thread-safe c=
ontext.
>     I still have private uses for allocating kconts truly on-the-fly.
>     We need to reach closure there.=20

I'd agree with Nathan here. Why create them on the fly?

If you really do need to create them on the fly, do you need to create=20
them out of a vacuum? If not, a kcontfork() might work, where you make a=20
kcont context from within an existing kcont context. ??

Take care,

Bill

--MGYHOYXEY6WxJCY8
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFAZNfQWz+3JHUci9cRAp8vAJ4zE4dAUWOLsmNr9+anu/aXCfTCyACfaYW7
PTbPpG/vxUAjTllwdx+YeUo=
=FIyJ
-----END PGP SIGNATURE-----

--MGYHOYXEY6WxJCY8--