[lkml]   [2002]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Unifying epoll,aio,futexes etc. (What I really want from epoll)
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
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:30    [W:0.072 / U:54.984 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site