Skip to content

Use poll model with NVMe devices#54

Merged
luqmana merged 23 commits into
oxidecomputer:masterfrom
luqmana:nvme-poll
Oct 13, 2021
Merged

Use poll model with NVMe devices#54
luqmana merged 23 commits into
oxidecomputer:masterfrom
luqmana:nvme-poll

Conversation

@luqmana

@luqmana luqmana commented Oct 7, 2021

Copy link
Copy Markdown
Contributor

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.

@luqmana luqmana force-pushed the nvme-poll branch 2 times, most recently from 4e8f871 to 0fa2e42 Compare October 8, 2021 17:08
Comment thread propolis/src/hw/nvme/requests.rs Outdated
Comment thread propolis/src/hw/nvme/queue.rs Outdated
Comment thread propolis/src/hw/nvme/requests.rs Outdated
Comment thread propolis/src/hw/nvme/requests.rs Outdated
Comment thread propolis/src/dispatch/mod.rs Outdated
@luqmana luqmana merged commit df86808 into oxidecomputer:master Oct 13, 2021
@luqmana luqmana deleted the nvme-poll branch October 13, 2021 18:05
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

Successfully merging this pull request may close these issues.

2 participants