Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Apr 2000 15:13:12 -0500
From:      Jonathan Lemon <jlemon@flugsvamp.com>
To:        "Justin C. Walker" <justin@apple.com>
Cc:        arch@freebsd.org
Subject:   Re: RFC: kqueue API and rough code
Message-ID:  <20000406151312.E80578@prism.flugsvamp.com>
In-Reply-To: <200004060609.XAA03090@scv1.apple.com>
References:  <200004060609.XAA03090@scv1.apple.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 04, 2000 at 11:09:09PM -0700, Justin C. Walker wrote:
> On Wednesday, April 5, 2000, at 10:21 PM, Jonathan Lemon wrote:
> 
> >   I would like to solicit comments on the kqueue mechanism
> > that I've been working on.  Currently, it will report events
> > for sockets, vnodes, and aio requests, and hopefully is
> > designed to be extensible.
> >
> >   An API document and rough code is at:
> >
> > 	http://www.flugsvamp.com/~jlemon/fbsd
> 
> Hi, Jonathan,
> 
> This looks quite similar to what we've done on Mac OS X (Darwin), which  
> you can check out at publicsource.apple.com.  It's designed to replace,  
> architecturally, the use of select() in most applications.  It is most  
> effective where there is a lot of activity on a lot of file descriptors.

Yes, that is what initially motivated me to write this; having
a scalable notification mechanism for a large number of descriptors.

However, this is general enough that it can act as a general event
mechanism, and isn't limited to file deescriptors.

Right now, I have sockets and UFS vnodes connected, and I've converted
the `tail' utility to use the new kqueue() mechanism, so the process
immediately gets notified of changes to a file it is monitoring.

There is also a hack to allow queueing an AIO event after the I/O has
finished.

Another possibility would be to make this a general `timer' mechanism,
simply by allowing an EV_TIMER event to be hooked up directly to the
kernel timing wheel, giving the application an unlimited number of timers.
--
Jonathan




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000406151312.E80578>