Dynamic Command Transfer Method for Storage Devices
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current systems face inefficiencies in transferring commands between a host device and non-volatile storage, with the DMA method being slower for single commands and the PIO method being slower for multiple commands, and switching between methods incurs overhead, leading to increased transfer times.
Innovation Solution
A method that determines whether to use the DMA or PIO method based on the number of commands to be transferred, issuing a transfer preparation completion command to initiate DMA transfers for multiple commands and using PIO for single commands, thereby reducing transfer time without the need for mode switching.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If the DMA method is used for transferring commands, then the transfer speed is improved for multiple commands, but the transfer time increases for single commands due to overhead
Solution Approach 1:
The system dynamically selects between DMA and PIO transfer methods based on the number of commands to be transferred. When the number of commands is below a threshold, PIO is used to avoid DMA overhead. When the number of commands exceeds the threshold, DMA is used to leverage its high-speed capability for bulk transfers. This dynamic adaptation resolves the contradiction by choosing the optimal method for each scenario.
Solution Approach 2:
The system changes the transfer method parameter based on the command count threshold. By monitoring the number of commands and switching between PIO and DMA modes accordingly, the system optimizes transfer performance. This parameter change approach allows the system to adapt to different workloads and eliminate the time loss associated with fixed-mode operation.
2Loss of time
If the PIO method is used for transferring commands, then the transfer time is reduced for single commands, but the transfer speed decreases for multiple commands
Solution Approach 1:
The system dynamically switches from PIO to DMA transfer mode when the number of commands exceeds a predetermined threshold. This dynamic transition allows the system to maintain fast transfer speeds for bulk operations while avoiding the speed penalty of PIO for single commands, thereby resolving the contradiction between transfer time and transfer speed.
Solution Approach 2:
The system changes the transfer method parameter based on command count. When the number of commands is below the threshold, PIO is used for minimal overhead. When above the threshold, DMA is activated to maximize throughput. This parameter adaptation ensures optimal performance across different command volumes.
3Productivity
If the system switches between DMA and PIO methods, then the transfer efficiency is optimized, but the overhead of mode switching increases transfer time
Solution Approach 1:
The system performs preliminary determination of the command count before initiating transfer. By pre-calculating whether DMA or PIO should be used based on the number of commands, the system avoids unnecessary mode switching during the transfer process. This preliminary action eliminates switching overhead while maintaining transfer efficiency.
Solution Approach 2:
The system dynamically determines the transfer method based on command count threshold before starting the transfer operation. This dynamic decision-making approach ensures that the optimal method is selected in advance, avoiding mid-transfer mode switches and their associated overhead, thus resolving the contradiction between efficiency and switching time.
Data Source
AI summary
An access control method includes: determining a number of a plurality of commands to be continuously transferred; transferring to a storage device, a transfer preparation completion command indicating that preparation for transfer of the plurality of commands is completed, when it is determined that the number is greater than or equal to a threshold value; transferring, in sequence, to the storage device, the plurality of commands when it is determined that the number is less than the threshold value; when a command transferred from the host device is the transfer preparation completion command, issuing a direct memory access request to the host device based on the transfer preparation completion command and receiving the plurality of commands transferred from the host device by a direct memory access method based on the direct memory access request; and accessing the storage, based on each of the plurality of commands received.


