-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatic fallback to Epoll
if io_uring
is not available
#131
Comments
I agree this is a major issue. I think the right path forward is to implement a vtable-based Then, we could write a detector that returned the proper RuntimeXev for your platform... i.e. something like This is actually something Ghostty really needs because for packaging purposes we probably want our packages to be portable across kernel versions. |
Epoll
if io_uring
is not availableEpoll
if io_uring
is not available
|
Just hopping to give my 2 cents because we had the issue at ZML 👀
Does it really need to be a vtable ? vtables are nice when you don't know beforehand all the implementations (and allows other to implement the interface) but in the case of xev we already know the different backends on linux, |
That’s true. For Linux the fallback path is well known so we can use static dispatch. I actually wonder if that’s faster than a vtable on modern CPU architectures. I suppose a conditional that’s almost always the same probably is. |
io_uring is the source of multiple vulnerabilities, Google recommends turning it off. https://www.phoronix.com/news/Google-Restricting-IO_uring ghostty is nonfunctional. |
Off-topic, but
@voidastro4 maybe check out ghostty-org/ghostty#3267 (comment). |
This should be a discussion, but I can't figure out how to make one.
It would be nice if
libxev
automatically tried theEpoll
backend on Linux if the call toio_uring_setup()
fails.A real-life scenario where
io_uring
might not be available butEpoll
might be is if thekernel.io_uring_disabled
sysctl was disabled, which would result inio_uring_setup()
settingerrno
toEPERM
(as far as I can tell, the Zig wrapper does not translate this to an error union). I don't know of any distribution which does this by default other than Arch Linux if you use the hardened kernel.A possible downside (and the main reason why this should be a discussion) is that both
io_uring
andEpoll
backends are compiled into the binary even if only one is used, which is antithetical to the point "Tree Shaking" mentioned in theREADME
.The text was updated successfully, but these errors were encountered: