mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Davide Libenzi <davidel@xmailserver.org>
To: John Myers <jgmyers@netscape.com>
Cc: linux-aio@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: Comparing the aio and epoll event frameworks.
Date: Mon, 19 May 2003 17:38:52 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.55.0305191657540.6565@bigblue.dev.mcafeelabs.com> (raw)
In-Reply-To: <200305192333.QAA12018@pagarcia.nscp.aoltw.net>

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


  reply	other threads:[~2003-05-20  0:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-19 23:33 John Myers
2003-05-20  0:38 ` Davide Libenzi [this message]
2003-05-20  1:10   ` Dan Kegel
2003-05-20  0:46     ` William Lee Irwin III
2003-05-20  0:52       ` Davide Libenzi
2003-05-20  0:47     ` Davide Libenzi
2003-05-20  1:02       ` William Lee Irwin III
2003-05-20  1:37         ` Dan Kegel
2003-05-20  1:15           ` William Lee Irwin III
2003-05-20  2:06             ` Dan Kegel
2003-05-20  1:22       ` Dan Kegel
2003-05-20  0:58         ` Davide Libenzi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.55.0305191657540.6565@bigblue.dev.mcafeelabs.com \
    --to=davidel@xmailserver.org \
    --cc=jgmyers@netscape.com \
    --cc=linux-aio@kvack.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®