3 ms·
NT had async io at release in 1993 [3] epoll() was introduced in Linux 2.5.44 [1], which was released in 2002 [2]. Epoll is not a wonderful API. Linux's real r
by dmitrygr 5y ago
NT had async io at release in 1993 [3]
epoll() was introduced in Linux 2.5.44 [1], which was released in 2002 [2]. Epoll is not a wonderful API. Linux's real reply to NT's anync io is io_uring, which only appeared in Linux 5.1 [4] in 2019(!!) [2], and is still wildly evolving
[1] https://en.wikipedia.org/wiki/Epoll https://en.wikipedia.org/wiki/Epoll
[2] https://en.wikipedia.org/wiki/Linux_kernel_version_history https://en.wikipedia.org/wiki/Linux_kernel_version_history
[3] https://en.wikipedia.org/wiki/Windows_NT https://en.wikipedia.org/wiki/Windows_NT
[4] https://en.wikipedia.org/wiki/Io_uring https://en.wikipedia.org/wiki/Io_uring
- tombert 5y agoI mean, I don’t think you’re wrong; I think the main reason that people haven’t complained that much about being stuck with epoll is that a lot of this is somewhat abstracted nowadays. I’ve only used epoll once to play with it, and most of the time when I need nonblocking IO, I use Java NIO or Netty or something. I generally do not care about how pretty the underlying code powering these things is as long as it works and as long as my code is pretty. Granted, that’s not really a good excuse for Linux having a crappy system, just why I think there wasn’t ever a ton of urgency for it.
- monocasa 5y agoAnd io_uring is good enough that NT is copying the concept wholesale. https://windows-internals.com/i-o-rings-when-one-i-o-operation-is-not-enough/ https://windows-internals.com/i-o-rings-when-one-i-o-operati...
- danachow 5y agoepoll is not an asyncio implementation, it really doesn’t belong in any discussion about aio, it’s a relatively better poll/select. Apparently less well known is that Linux had an async io interface also introduced around the same time in 2.5 (see io_setup, io_submit, and libaio). Initially extremely limited and generally not widely used (limitations include only working on certain disk files opened O_DIRECT), however it was incrementally improved over the years until io_uring came around. glibc has had a POSIX AIO implementation for years, implemented with userspace threads since the kernel implementation was originally not suitable.