-
Notifications
You must be signed in to change notification settings - Fork 90
grace wants to do some zero copy #207
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
Conversation
This is very related to some of the difficulties observed in tokio-rs/tokio-uring#1, and why the buffer management there had to be changed somewhat. @carllerche may have more relevant thoughts. |
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.
Thanks, this looks good to me.
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.
Looks good - I do wonder if it would help to expand the code samples slightly to explicitly show trying to pass buffers to the OS and not being able to do so due to lifetimes.
) -> Poll<Result<usize, Error>> | ||
``` | ||
|
||
She notices that the buffer is always passed to the invocation, but she can't pass it down to the operating system: because of the well-known cancellation problem, the buffer is |
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.
Might be helpful to either link to a good resource on the cancellation problem or provide a brief description for those unfamiliar with it.
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.
I am not sure if there is a link that is canonical for that problem (Boats blog does a good job explaining the whole problem, and it's already mentioned at some point).
I'd be happy to add a paragraph with a summary.
Co-authored-by: Niko Matsakis <[email protected]>
Co-authored-by: Ryan Levick <[email protected]>
Thank you all for your comments and sorry it took me long to get to this. |
Thanks @glommer! |
This captures a bit of my experience in trying to leverage Linux zero-copy with Rust.
I find that Grace is very likely, given her background, to have had similar encounters.