-
Notifications
You must be signed in to change notification settings - Fork 108
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
mesh_channel: new oneshot channel implementation #613
Conversation
#[derive(Debug)] | ||
struct OneshotReceiverCore { | ||
slot: Arc<Slot>, | ||
port: Option<PortWithHandler<SlotHandler>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there no way to squeeze the port into the slot
itself, so local oneshot receivers don't have to pay the cost of this always-None field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A little too tricky for v1 due to our use of Arc
. I'll add a comment to improve this later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spent some time staring at this unsafe code as well... and yeah, much like the last PR, this all seems to check out. Much like #594, I'm happy to see this land as-is, and then follow up with some more unsafe CR from other folks.
Take a similar approach to #594 but for oneshot channels.
This reduces openvmm_hcl binary size by a few hundred KB, and it improves oneshot channel overhead by an unmeasured amount.