Re:Epoll is fundamentally broken (2017)
by dxuh on Sunday October 23, 2022 @07:47AM
(#33306209)
I have used select and poll before and sort of skipped to io_uring for a recent project, which also doesn't do too well with multiple threads (you have to use multiple rings and do everything else yourself). It's a shame that there is no obvious, relatively easy to use async IO mechanism on Linux that you can use from multiple threads without getting yourself in trouble. Reading more about kqueue it looks a lot like something that would solve it. Why was it not ported to Linux? Would it have been too hard to integrate?
The linked article is great btw. Very informative and concise!
[ Parent
| on HN ]
> Why was it not ported to Linux?
NIH
Re:Epoll is fundamentally broken (2017)
by thatcherc on Sunday October 23, 2022 @09:10AM
(#33306710)
National Institutes of Health?
Re:Epoll is fundamentally broken (2017)
by cassepipe on Sunday October 23, 2022 @09:20AM
(#33306775)
Not Invented Here, old chap
not invented here
Re:Epoll is fundamentally broken (2017)
by LaLaLand122 on Sunday October 23, 2022 @10:50AM
(#33307435)
> you have to use multiple rings and do everything else yourself
Since you are supposed to use liburing, not the kernel interface directly, I guess somebody could add multithreading "support" to it.
Or at least add documentation/examples of the most common/performant options: https://github.com/shuveb/loti/issues/4
AFAIR Windows IOCP handles multithreading by:
- Handling locking at kernel level, the syscall is thread safe
- Making it LIFO, to keep things in the same threads, to have a decent cache behaviour.
It's as simple as it gets.