Messages in this thread | | | Date | Tue, 28 Feb 2006 21:27:51 -0500 | From | Benjamin LaHaise <> | Subject | Re: Thread safety for epoll/libaio |
| |
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>. - 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/
| |