Repository navigation
Conversation
Coverage Report for CI Build 37281200351Coverage increased (+0.05%) to 39.089%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
Lencerf
force-pushed
the
fix/virtio/mem-deadlock
branch
from
October 5, 2026 07:53
559998d to
5d94d21
Compare
Virtio workers used to hold RamBus::lock_layout() for as long as a device was running, so any runtime change of the guest RAM layout, e.g. memory hot-plug, blocked forever on the write lock. Borrowing the read-copy-update idea from Linux RCU, - Readers call RamBus::load() to get an immutable snapshot. The read lock is only held while cloning the Arc. - Writers call RamBus::update(), which copies the layout, applies the change and publishes the result atomically. A failed update publishes nothing, and Memory batches all RAM ranges of a region into a single update. - Each published layout carries a generation number, so a reader can detect a stale snapshot with a single atomic load by comparing Ram::generation() with RamBus::generation(). Since ArcMemPages is reference counted, a snapshot keeps every host mapping it refers to alive, even after the slot is removed from the bus. This commit fixes the deadlock, but a running virtio worker still uses the snapshot taken when the device was activated. Follow-up commits make workers pick up new snapshots. Assisted-by: Antigravity:Claude-Fable-5.1 Signed-off-by: Changyuan Lyu <changyuanl@google.com>
Lencerf
force-pushed
the
fix/virtio/mem-deadlock
branch
from
October 5, 2026 08:02
5d94d21 to
37ac48e
Compare
Lencerf
marked this pull request as draft
October 5, 2026 08:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.