Skip to content
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

Consider supporting polling and io_uring at the same time #105

Closed
nazar-pc opened this issue Oct 19, 2023 · 4 comments · Fixed by #110
Closed

Consider supporting polling and io_uring at the same time #105

nazar-pc opened this issue Oct 19, 2023 · 4 comments · Fixed by #110
Assignees
Labels
enhancement New feature or request

Comments

@nazar-pc
Copy link
Contributor

Would be great to have something like https://docs.rs/monoio/latest/monoio/struct.FusionDriver.html that can make a decision on whether to use io_uring or polling on Linux depending on availability.

In the app I'm working on I don't have control over what users run it on, so io_uring may or may not be available or configured with proper limits or have modern enough kernel. FusionDriver in monoio helps with that.

@Berrysoft Berrysoft added the enhancement New feature or request label Oct 19, 2023
@George-Miao
Copy link
Member

Do you think a manual config entry (e.g. a builder with with_iouring(bool)) is necessary? Currently all runtime api's are behind thread local, which makes it hard to configure and run like what tokio and monoio does. We might able to only add some feature and tweak the conditional compilation to add runtime detection without changing the public API.

@Berrysoft
Copy link
Member

To my opinion, we can make it easier: if both polling and io-uring is enabled, a fusion driver is chosen as the underlying driver, and the fusion driver determines if io-uring should be used.

@George-Miao
Copy link
Member

That does make life a whole lot easier.

@nazar-pc
Copy link
Contributor Author

That is the magical "just works" I would certainly prefer as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants