Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Oct 2000 18:02:57 -0700
From:      Alfred Perlstein <bright@wintelcom.net>
To:        Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc:        Jonathan Lemon <jlemon@flugsvamp.com>, Gideon Glass <gid@cisco.com>, Simon Kirby <sim@stormix.com>, Dan Kegel <dank@alumni.caltech.edu>, chat@FreeBSD.ORG, linux-kernel@vger.kernel.org
Subject:   Re: kqueue microbenchmark results
Message-ID:  <20001026180256.R28123@fw.wintelcom.net>
In-Reply-To: <E13oxjH-00041y-00@the-village.bc.nu>; from alan@lxorguk.ukuu.org.uk on Fri, Oct 27, 2000 at 01:50:40AM %2B0100
References:  <20001026115057.A22681@prism.flugsvamp.com> <E13oxjH-00041y-00@the-village.bc.nu>

next in thread | previous in thread | raw e-mail | index | archive | help
* Alan Cox <alan@lxorguk.ukuu.org.uk> [001026 17:50] wrote:
> > kqueue currently does this; a close() on an fd will remove any pending
> > events from the queues that they are on which correspond to that fd.
> 
> This seems an odd thing to do. Surely what you need to do is to post a
> 'close completed' event to the queue. This also makes more sense when you
> have a threaded app and another thread may well currently be in say a read
> at the time it is closed

Kqueue's flexibility could allow this to be implemented, all you
would need to do is make a new filter trigger.  You might need
a _bit_ of hackery to make sure those aren't removed, or one
could just add the event after clearing all pending events.

Adding a filter to be informed when a specific fd is closed is
certainly an option, it doesn't make very much sense because that
fd could then be reused quickly by something else...

but anyhow:

The point of this interface is to ask kqueue to report only on the
things you are interested in, not to generate superfluous that you
wouldn't care about.  You could make such a flag if Linux adopted
this interface and I'm sure we'd be forced to adopt it, but if you
make kqueue generate info an application won't care about I don't
think that would be taken back.

-- 
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
"I have the heart of a child; I keep it in a jar on my desk."


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




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