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

Implement WriteVolatile Trait for SerialBuffer to avoid using intermediate buffer #5951

Open
likebreath opened this issue Nov 14, 2023 · 0 comments

Comments

@likebreath
Copy link
Member

See #5949 (comment):

There has been quite many changes to the depend crates, particularly the newly added WriteVolatile/ReadVolatile Traits to the vm-memory crate along with deprecated APIs. For now, I am using an intermediate buffer for custom structs that does not have WriteVolatile/ReadVolatile traits implemented so that we can migrate from the deprecated APIs. There will be a performance penalty introduced from using an intermediate buffer (which is basically what's done from the deprecated APIs).

I believe this is fine for block::qcow::{Rawfile, QcowFile} (being used from block::Request::execute()), as the it will only impact vhost_user_block (while implementing the new traits for Rawfile and QcowFile seems to be much more complicated). The only other struct is SerialBuffer (used by virtio_devices::console::ConsoleEpollHandler::process_output_queue(), and I will take look into how to implement the WriteVolatile trait for it.

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

No branches or pull requests

1 participant