Re: Thread safety for epoll/libaio
From: Benjamin LaHaise
Date: Tue Feb 28 2006 - 21:30:42 EST
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@xxxxxxxxx>.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/