Subject: Re: Importing kqueue's from FreeBSD...
To: Jason R Thorpe , Jonathan Lemon <jlemon@flugsvamp.com>
From: Jonathan Lemon <jlemon@flugsvamp.com>
List: tech-kern
Date: 03/15/2001 18:16:51
On Thu, Mar 15, 2001 at 04:02:05PM -0800, Jason R Thorpe wrote:
> On Thu, Mar 15, 2001 at 03:40:49PM -0600, Jonathan Lemon wrote:
> 
>  > I'll admit the performance section of the paper is sadly lacking; I'm
>  > working on that at the moment.
>  > 
>  > If there is no knote attached to the structure being monitored, then
>  > the overhead is just a single if() statement.  Otherwise, the overhead
>  > is roughly O(N), where N is the number of knotes attached to the structure. 
> 
> Yah, seems to me roughly like the overhead of selwakeup(), except not
> nearly as pathological when multiple things are looking at a particular
> e.g. socket.
> 
> I have no beef with kqueue other than the lack of really really really
> generic event type stuff.
> 
> For example, luke said EVFILT_DEVICE -- ok, so, the problem is that you
> get notified that an EVFILT_DEVICE event occurred... was it an insert or
> a removal?  How do you tell?  Unless I missed something, there doesn't
> seem to be any way of passing down ancillary data with the event.


Each filter has a private flag word and a data word that they can
define for their own use.  An EVFILT_DEVICE filter may define some of
the bits in them to mean inserted/removed/suspended, "current status",
or whatever the filter wants to return.
--
Jonathan