-
Notifications
You must be signed in to change notification settings - Fork 82
Replace Eventfd with EventNotifier/EventConsumer #308
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
base: main
Are you sure you want to change the base?
Conversation
@uran0sH marked as draft, since we need a new vmm-sys-util release before merging this. |
@uran0sH please rebase and check CI (come failures need the new rust version we are updating in the CI, but others are related to format, etc.) |
Update to introduce EventNotifier and EventConsumer. Signed-off-by: Wenyu Huang <[email protected]>
@uran0sH please check the CI, there some clippy warning to fix, but also some tests blocked for more than 60s. Should I restart the CI or it's an issue we need to fix? |
I think it's an issue |
Eventfd is Linux-specific. To support more platforms, we replace it with the EventNotifier/EventConsumer abstractions. EventSender and EventReceiver are wrappers that encapsulate eventfd functionality Use pipefd to replace eventfd in the test. Signed-off-by: Wenyu Huang <[email protected]>
Fix this issue by changing this line to into_raw_fd() (https://github.com/rust-vmm/vhost/pull/308/files#diff-e1c9dc7802234bc118de8314ec9cacc98066eea325a6f14ff5887ece3466d5a3R96). Because when we use pipe, using as_raw_fd will cause the consumer's fd to be closed, like this (https://github.com/rust-vmm/vhost/pull/308/files#diff-c9eba2d5821720c1f7e164d0d01d85b14040d8f3200fac89607fdd1af09d5491R111). So we need to take the ownership of this fd. |
Summary of the PR
Eventfd is Linux-specific. To support more platforms, we replace it with
the EventNotifier/EventConsumer abstractions.
EventSender and EventReceiver are wrappers that encapsulate eventfd functionality
Use pipefd to replace eventfd in the test.
Requirements
Before submitting your PR, please make sure you addressed the following
requirements:
git commit -s
), and the commit message has max 60 characters for thesummary and max 75 characters for each description line.
test.
Release" section of CHANGELOG.md (if no such section exists, please create one).
unsafe
code is properly documented.