Fast NVMe Reads with Barrier Command Doorbell Snapshots
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In non-volatile memory systems, the NVMe 2.0 specification requires that data submitted to submission queues may be written in arbitrary order, leading to host delays during read and write operations as the host must wait for write operations to complete before performing read operations to ensure reading the most updated data.
Innovation Solution
Utilizing barrier commands and a snapshot of doorbell states of submission queues, the necessary write commands are identified and executed to reduce host wait times, allowing the controller to complete the barrier command as soon as a doorbell snapshot is taken, even if pre-barrier writes are not yet completed.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the host waits for write operations to complete before performing read operations, then data consistency is ensured, but host delay increases
Solution Approach 1:
The controller captures a snapshot of doorbell states when the barrier command is received, before executing the pre-barrier write commands. This preliminary action allows the host to know in advance which commands need to be executed before the read operation, enabling the host to issue read commands without waiting for all writes to complete, thus reducing host delay while ensuring data consistency.
Solution Approach 2:
The barrier command mechanism provides feedback to the host about the state of write operations through the doorbell snapshot. This feedback allows the host to understand which commands are pending and can safely proceed with read operations, eliminating unnecessary waiting time while maintaining data consistency.
2Reliability
If the host implements command tracking to identify commands needing completion, then read accuracy is improved, but device complexity increases
Solution Approach 1:
The barrier command acts as an intermediary mechanism between the host and the command queue. Instead of requiring the host to implement complex command tracking functions, the barrier command simplifies the interaction by providing a clear boundary and status indication, reducing device complexity while maintaining read accuracy.
Solution Approach 2:
The doorbell snapshot creates a copy of the command queue state at the time the barrier command is received. This copy allows the host to track which commands need to be executed without maintaining complex tracking mechanisms, simplifying the system while ensuring read accuracy.
3Reliability
If the host waits for full flush of submission queues, then data consistency is ensured, but productivity decreases
Solution Approach 1:
The controller captures the doorbell snapshot immediately when the barrier command is received, before executing all pre-barrier write commands. This preliminary action allows the host to proceed with read operations without waiting for the full flush of submission queues, thereby maintaining data consistency while improving productivity and operation throughput.
Solution Approach 2:
The barrier command mechanism segments the command execution into pre-barrier commands (that must be executed before the read) and post-barrier commands (that can be executed after). This segmentation allows the host to know exactly which commands need to be completed, eliminating the need to wait for full queue flush and improving throughput.
Data Source
AI summary
The present disclosure generally relates to read and write operations utilizing barrier commands. Using barrier commands and a snapshot of doorbell states of submission queues (SQs), the necessary write commands to perform a read may be identified and executed to reduce any wait time of the host. As such, host delays during reads and writes are reduced. In absence of a barrier command, the host needs to wait for writes to complete before performing a read. When a barrier command is used, the host needs to wait for the barrier command to complete before performing a read. The controller will execute the post barrier reads only after completing the pre-barrier writes. As will be discussed herein, the controller completes the barrier command as soon as a doorbell snapshot is taken even though the pre-barrier writes may not yet be completed.


