Re: Unifying epoll,aio,futexes etc. (What I really want from epoll)

From: John Gardiner Myers (jgmyers@netscape.com)
Date: Fri Nov 01 2002 - 18:27:41 EST


Jamie Lokier wrote:

>You avoid the extra CPU cycles like this:
>
> 1. EP_CTL_ADD adds the listener to the file's wait queue using
> ->poll(), and gets a free test of the object readiness [;)]
>
> 2. When the transition happens, the wakeup will call your function,
> epoll_wakeup_function. That removes the listener from the file's
> wait queue. Note, you won't see any more wakeups from that file.
>
> 3. When you report the event user space, _then_ you automatically
> add the listener back to the file's wait queue by calling ->poll().
>
>
The cost of removing and readding the listener to the file's wait queue
is part of what epoll is amortizing.

There's also the oddity that I noticed this week: pipes don't report
POLLOUT readiness through the classic poll interface until the pipe's
buffer is completely empty. Changing this to report POLLOUT readiness
when the pipe's buffer is not full apparently causes NIS to break.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Nov 07 2002 - 22:00:22 EST