lkml.org 
[lkml]   [2003]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Comparing the aio and epoll event frameworks.
On Mon, 19 May 2003, John Myers wrote:

> The following documents my understanding of the differences between
> the epoll and aio event frameworks. These differences stem from the
> fact that epoll is designed for use by single threaded callers,
> whereas aio is designed for use by multithreaded, thread pool callers.
>
> I do not intend to criticise either design choice--each model (single
> threaded vs. thread pool) has its uses and each model has requirements
> of the event framework which conflict with the requirements of the
> other.

Hi John, you seem to have lost a few episodes of the epoll saga. You can
use epoll in both Edge Triggered or Level Triggered ways, and in LT mode
epoll is basically a super-poll. You can call it with blocking and non
blocking fds. You can call it from many threads and (with LT mode) you
don't even need to reach EAGAIN (actually even with ET you don't need to
reach EAGAIN but I'm not willing in starting again discussions already
happened 25 times on lkml). You can easily do thread pooling also. As
a matter of fact a pretty famous on line gaming company is using epoll
together with a thread pooling implementation and last time I've got
contacted by them they were easily handling more than 150K fds with that
model. John, do not cast API in only work in a single environment. Is
poll/select a single threading API ? A thread pooling one ? I'd say both,
since you can choose the model it better fits your need. Same thing for
epoll. About the single shot feature I has a discussion here with the
guy that wrote kqueue and I was telling him about my wish to keep epoll as
simple as possible since people worked with poll/select for many years and
they did not commit suicide because of the lack of extended features.
Adding a single shot feature to epoll takes about 5 lines of code,
comments included :) You know how many reuqests I had ? Zero, nada.



- Davide

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:35    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site