Use poll model with NVMe devices#54
Merged
Merged
Conversation
4e8f871 to
0fa2e42
Compare
pfmooney
reviewed
Oct 11, 2021
…space per device.
…ediately complete a command
pfmooney
reviewed
Oct 12, 2021
pfmooney
approved these changes
Oct 13, 2021
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.
This updates the NVMe device to use the new pull based model from #53.
We had to drop namespace support for now as the design there complicates the IO dispatching: the new model is that the block device pulls IO requests from the NVMe Submission Queues. Multiple namespaces may use the same Submission Queues and hence we can't simply associate a particular block device with a given namespace without some intermediate buffering. Buffering we'd rather avoid to simplify the live migration story by trying to keep as much device state in guest memory as possible.
Some other changes here include making pushing to the Completion Queues infallible. We do this by returning a new "permit" type whenever we successfully pop a command off the Submission Queue. The permit's existence guarantees there's at least one space available on the Completion Queue, hence reserving it.