From: Benjamin LaHaise <bcrl@kvack.org>
To: "Li, Peng" <ringer9cs@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Thread safety for epoll/libaio
Date: Tue, 28 Feb 2006 21:27:51 -0500 [thread overview]
Message-ID: <20060301022751.GA28899@kvack.org> (raw)
In-Reply-To: <598a055d0602281236m7eac9c09oc60af9ce28e7e4bf@mail.gmail.com>
On Tue, Feb 28, 2006 at 03:36:11PM -0500, Li, Peng wrote:
> I apologize if I should not post this on LKML, but there seems to be
> some lack of documentation for using epoll/AIO with threads. Are
> these interfaces thread-safe? Can I use them safely in the following
> way:
I can only speak for libaio, which is completely thread safe. Having a
single thread read events and dispatch is likely to work quite well given
the way the kernel interface is structured internally. There is still
room for improving the event mechanism to use a futex for waking so that
the library can parse multiple events from userspace, but that is pending
a heavier user like networking.
-ben
--
"Ladies and gentlemen, I'm sorry to interrupt, but the police are here
and they've asked us to stop the party." Don't Email: <dont@kvack.org>.
next prev parent reply other threads:[~2006-03-01 2:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-28 20:36 Thread safety for epoll/libaio Li, Peng
2006-03-01 1:55 ` Anton Titov
2006-03-01 2:27 ` Benjamin LaHaise [this message]
2006-03-01 3:35 ` Phillip Susi
2006-03-01 3:48 ` David Schwartz
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=20060301022751.GA28899@kvack.org \
--to=bcrl@kvack.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ringer9cs@gmail.com \
/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