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

mesh_channel: new oneshot channel implementation #613

Merged
merged 16 commits into from
Jan 6, 2025

Conversation

jstarks
Copy link
Member

@jstarks jstarks commented Jan 6, 2025

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.

@jstarks jstarks requested a review from a team as a code owner January 6, 2025 19:03
#[derive(Debug)]
struct OneshotReceiverCore {
slot: Arc<Slot>,
port: Option<PortWithHandler<SlotHandler>>,
Copy link
Contributor

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?

Copy link
Member Author

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.

daprilik
daprilik previously approved these changes Jan 6, 2025
Copy link
Contributor

@daprilik daprilik left a 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.

@jstarks jstarks enabled auto-merge (squash) January 6, 2025 21:45
@jstarks jstarks merged commit 65b5428 into microsoft:main Jan 6, 2025
25 checks passed
@jstarks jstarks deleted the oneshot branch January 6, 2025 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants