Subject: Re: Importing kqueue's from FreeBSD...
To: None <eeh@netbsd.org>
From: Luke Mewburn <lukem@wasabisystems.com>
List: tech-kern
Date: 03/16/2001 07:56:19
On Thu, Mar 15, 2001 at 04:59:25PM -0000, eeh@netbsd.org 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.
>
> kqueue (aka `kevent') is a generic and scalable event
> notification facility, developed by Jonathan Lemon of FreeBSD.
>
> It's generic: you can monitor socket events, filesystem events
> such as `file ready to read', vnode operations such as `file has been
> deleted', `directory has been modified', signals delivered to a
> process, process creation/exit, etc.
>
> If you want to claim it is a generic event mechanism it also
> needs to support device events: insertion, removal, errors,
> etc.
We could add a new event type (EVFILT_DEVICE (?)) and add support into
various device layers to raise this event. I have no objection to
doing this; it makes perfect sense to me.
I think the reason why jlemon classified it as generic was that:
a) it already supports a bunch of different type of events, and
b) it's fairly simple to add new event types, even if currently it
requires adding new types to <sys/event.h>. I have thoughts
about how to make this easier for dynamic event addition
(e.g., for lkm's); they need to be fleshed out a bit more first.
I don't think it would be appropriate to hold back incorporation
of this work because it does have every event time that anyone can
think of right now.