Order-Preserving Write Queue Control for Multi-Threaded Storage
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The existing flash-friendly file system (F2FS) and Barrier-Enabled IO Stack (BEIOS) operating system face inefficiencies due to long wait times for data transfer and increased queue and computational resource usage from redundant order-preserving write commands, which degrade the storage apparatus's write ability.
Innovation Solution
A data processing method and device that generate order-preserving write requests with associated information, construct a queue based on these requests, and transmit either both a command and request or just the request to the storage apparatus, maintaining thread states to reduce redundant commands and conserve resources.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If order-preserving write commands are transmitted for each thread in BEIOS, then data write order is ensured, but queue resources and computational resources of storage apparatus are occupied
Solution Approach 1:
The patent merges multiple Barrier Write Commands from different threads into a single BWC by introducing a thread state mechanism. When the storage apparatus receives a BWC, it sets the corresponding thread state to 'processed'. Subsequent BWCs from the same thread are eliminated, reducing queue occupation and computational overhead while maintaining data write order through the thread state tracking.
Solution Approach 2:
The patent discards redundant Barrier Write Commands that would otherwise occupy queue resources. By tracking thread states, the system identifies and eliminates duplicate BWCs from the command queue, recovering queue capacity and computational resources while preserving the necessary order-preserving functionality through selective command transmission.
2Reliability
If multiple BWC commands are generated for multiple order-preserving write threads, then data integrity is maintained, but queue resources of storage apparatus are occupied
Solution Approach 1:
Multiple BWC commands from different threads are merged into fewer transmissions by implementing thread state tracking. The storage apparatus maintains a state record for each thread, setting it to 'processed' upon receiving a BWC. This merging approach reduces the quantity of commands in the queue while preserving data integrity through selective retransmission only when necessary.
Solution Approach 2:
Instead of transmitting actual BWC commands for every thread, the system uses a lightweight thread state indicator (a simple state flag) to represent and track the processing status of each thread. This copying approach replaces heavy command transmissions with lightweight state markers, reducing queue resource occupation while maintaining integrity verification.
3Reliability
If wait for current write command to be executed before processing next write command, then data order is preserved, but DMA transfer time increases
Solution Approach 1:
The storage apparatus performs preliminary actions by setting thread states to 'processed' immediately upon receiving a BWC, before actual data writes are completed. This preliminary state marking enables the host to proactively eliminate subsequent redundant BWCs without waiting for command execution, reducing DMA transfer wait time while preserving data order through the pre-established thread state records.
Solution Approach 2:
The system implements a feedback mechanism where the storage apparatus returns thread state information to the host. This feedback allows the host to determine whether subsequent BWCs need to be transmitted or can be eliminated, optimizing DMA transfer timing and reducing unnecessary wait times while maintaining data order through state-based decision making.
Data Source
AI summary
A data processing method includes generating order-preserving write requests including order-preserving information with respect to data, constructing a queue of the order-preserving write requests, based on the order-preserving write requests, and for each order-preserving write request in the queue, based on the order-preserving information of the order-preserving write request, transmitting both an order-preserving command and the order-preserving write request to a storage apparatus, or transmitting only the order-preserving write request to the storage apparatus.


