-
Notifications
You must be signed in to change notification settings - Fork 107
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
volatile_memory: Only use volatile copy for small objects #117
volatile_memory: Only use volatile copy for small objects #117
Conversation
2042106
to
6f2f710
Compare
Consensus in #100 seems to be that this is the right approach. It would be nice if we could drop our fork of vm-memory. |
Now the vm-memory create has atomic interfaces for atomic access. Is it suitable to split existing vm-memory interfaces into byte stream access and object access?
|
Where small objects are those objects that are less then the native data width for the platform. This ensure that volatile and alignment safe read/writes are used when updating structures that are sensitive to this such as virtio devices where the spec requires writes to be atomic. Fixes: cloud-hypervisor/cloud-hypervisor#1258 Fixes: rust-vmm#100 Signed-off-by: Rob Bradford <[email protected]>
6f2f710
to
6ec2101
Compare
Sorry @jiangliu I don't really follow what you are saying. Could you elaborate more, giving some concrete examples? I think you're saying that we need to check everywhere that the code is being used to ensure we're using the correct API? |
Sorry for my poor english. What I means is
|
Ah, cool, I get it. I think that might solve our problem as we use the |
We are on Chinese National Holiday this week, so it would be great if you could help on this:) |
Hi, sorry for the late review. The changes look good! #95 was necessary because we were using At this point we can go back to a world where |
Hi again! Should we merge this? Also, what do you think about reverting #95 entirely at some point in the future? (including for |
It sounds reasonable to merge this PR as a transient solution to avoid regressions. And eventually we should revert to |
I was wondering when would be the right time to revert #95 ? Perhaps we can use the recent jump to 0.3.x as an opportunity to do it now? Users needing the old behavior can stay at 0.2.2. |
I think that reverting should take place as part of a subsequent series (i.e. 0.4.x), so that ppl can use 0.3.x to transition to the new atomic methods while the old |
@alexandruag Sounds like a sensible strategy to me. |
Where small objects are those objects that are less then the native data
width for the platform. This ensure that volatile and alignment safe
read/writes are used when updating structures that are sensitive to this
such as virtio devices where the spec requires writes to be atomic.
Fixes: cloud-hypervisor/cloud-hypervisor#1258
Fixes: #100
Signed-off-by: Rob Bradford [email protected]