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

feat(driver): fusion driver #110

Merged
merged 2 commits into from
Oct 20, 2023

Conversation

George-Miao
Copy link
Member

@George-Miao George-Miao commented Oct 20, 2023

This PR added fusion driver, which will be enabled when both io-uring and polling are enabled, and will determine which to use during runtime.

However, this does bring some overhead throughout the lifetime of the driver:

  • The driver is an enum internally, meaning more branching
  • Several OpCodes are now enum too due to divergence between io-uring and polling implementations.
  • A one-time detection will be made when the first fusion driver is instantiated

@nazar-pc what do you think?

Closes #105

@George-Miao George-Miao self-assigned this Oct 20, 2023
@George-Miao George-Miao added enhancement New feature or request driver: fusion About the fusion driver labels Oct 20, 2023
@George-Miao George-Miao marked this pull request as ready for review October 20, 2023 13:15
Copy link
Member

@Berrysoft Berrysoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@George-Miao George-Miao merged commit f4a025c into compio-rs:master Oct 20, 2023
11 checks passed
@George-Miao George-Miao deleted the dev/fuse-runtime branch October 20, 2023 13:49
compio-driver/src/fusion/mod.rs Show resolved Hide resolved
@@ -10,7 +10,7 @@
not(feature = "io-uring"),
not(feature = "polling")
))]
compile_error!("You must choose one of these features: [\"io-uring\", \"polling\"]");
compile_error!("You must choose at leaset one of these features: [\"io-uring\", \"polling\"]");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
compile_error!("You must choose at leaset one of these features: [\"io-uring\", \"polling\"]");
compile_error!("You must choose at least one of these features: [\"io-uring\", \"polling\"]");

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Consider a PR?

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

Successfully merging this pull request may close these issues.

Consider supporting polling and io_uring at the same time
3 participants