Subject: Re: Importing kqueue's from FreeBSD...
To: None <tech-kern@netbsd.org>
From: Luke Mewburn <lukem@wasabisystems.com>
List: tech-kern
Date: 05/02/2001 00:37:59
On Mon, Mar 19, 2001 at 12:52:53PM +1100, Luke Mewburn wrote:
> On Thu, Mar 15, 2001 at 03:33:37PM +1100, Luke Mewburn wrote:
> > After I saw a presentation at BSDCon 2000 last year about the
> > implementation of kqueue in FreeBSD, a few NetBSD developers
> > present decided that it's definately worth a look for NetBSD.
> 
> i've put a diff up at:
> 	ftp://ftp.netbsd.org/pub/NetBSD/misc/lukem/kqueue-010319.diffs
> 
> there's also a simple test suite and a todo list.
> 
> this is a work in progress; i haven't had a chance to look at this
> seriously for a couple of weeks.


i've put an updated set of diffs for the kqueue work up at:
	ftp://ftp.netbsd.org/pub/NetBSD/misc/lukem/kqueue-010428.diffs
along with the updated todo and test suite.  the trivial mods to libc
to support the extra syscalls aren't there yet.

some things to still do:

	- chase up all the XXXLUKEM comments, and resolve the issues
	  highlighted.

	  usually these are just concerns about whether locking is
	  correctly used or not, but i'm not familiar enough with that
	  part of the kernel to know what's the right thing to do.

	- test EVFILT_WRITE (for sockets & pipes)


comments about other issues brought up previously:

	- need a way to register new filters internally to the kernel
	  (aka `kfilter()' ?. this should support taking a name as the
	  new filter type (q.v.)

	- need a way to look up a filter number from a string from
	  userland (e.g, "kqfilter_lookup(const char *)", which
	  returns 0 for not found, or the int otherwise.

	- the current filter mechanism supports executing callbacks
	  when a filter is attached, detached, and triggered by the
	  kernel.

	  there isn't a mechanism to execute a callback when the
	  process actually receives the event (bill sommerfeld asked 
	  for this), but i'm not sure what this would be used for.
	  we should approach jlemon with our thoughts on this
	  particular requirement.

i'll continue to do a bit more testing and soliciting feedback,
especially on the merge of the code from freebsd.

comments/hints/help?

luke.