A data transmission optimization method for NVMe storage device based on eMMC

By establishing a Command Data Table in the SSD NVMe controller and setting the maximum time threshold, the data transmission blocking problem caused by the unpredictable Busy time of eMMC is solved, the performance and transmission rate of the solid state drive are improved, and efficient data transmission of NVMe storage devices is achieved. .

CN113590026BActive Publication Date: 2024-10-18HANGZHOU DIANZI UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110706005.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-24
Publication Date
2024-10-18
Estimated Expiration
2041-06-24

AI Technical Summary

Technical Problem

The unpredictable Busy time of eMMC causes data transmission to block, reducing the performance and transmission rate of the SSD, especially when the NVMe protocol supports out-of-order execution of commands and data blocks.

Method used

Establish a Command Data Table in the SSD NVMe controller, maintain the status of commands and data blocks, set the maximum time threshold of the eMMC channel, and time it through internal registers. If the threshold is exceeded, command execution will be stopped and reassigned to idle channels for processing to ensure data transmission efficiency.

Benefits of technology

It effectively avoids data blocking, improves the performance and transmission rate of solid-state drives, and optimizes the data transmission process of NVMe storage devices by real-time monitoring and management of the busy time of the eMMC channel.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113590026B_ABST
    Figure CN113590026B_ABST
Patent Text Reader

Abstract

The present invention discloses a data transmission optimization method for an NVMe storage device based on eMMC, including establishing a mapping table Command Data Table in an SSD NVMe controller, the table is a mapping of commands and data blocks stored in a Data Buffer from a host Host, and the table maintains the relevant status of the commands and data blocks in the Data Buffer; before power-on initialization, the maximum time threshold for the eMMC channel to allow command and data block operations to be executed is first set in a configuration file; when each eMMC obtains the command and data block to be executed from the Data Buffer, the corresponding status is first searched in the Command Data Table; only when the operation state is a pending execution state, the command and data block can be read by the eMMC; when the command and data block are read by the eMMC, the operation state is converted from the pending execution state to the execution success state. The present invention solves the channel congestion problem caused by the unpredictability of the Busy time of the eMMC processing data, thereby improving the data transmission rate and reducing the delay.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data storage and relates to a data transmission optimization method for an NVMe storage device based on eMMC. Background Art

[0002] The NVMe protocol was released by INTEL in 2011 to unify the interface protocol and establish an ecosystem. NVM Express (NVMe), or Non-Volatile Memory Host Controller Interface Specification (NVMHCIS), is a logical device interface specification. It is a bus transmission protocol specification based on the device logical interface similar to AHCI (equivalent to the application layer in the communication protocol), which is used to access non-volatile memory media (such as solid-state hard drives using flash memory) attached through the PCI Express (PCIe) bus. NVMe uses multiple command queues (up to 65536 command queues), each command has a variable data length (512B to 2MB), and the data block record retrieval in the host memory supports two methods: Physical Region Page and ScatterGather List. The NVMe protocol supports out-of-order execution between commands, out-of-order transmission of data blocks within commands, and variable weight processing between command queues.

[0003] In order to increase the capacity, transmission rate and reduce latency of SSDs, a SSD based on RAIM (Redundant Array of Independent Module) architecture has been proposed. Figure 1 .

[0004] In the storage device of this architecture, the SSD controller has a data buffer for caching data sent by the host; the eMMC Host module then takes out the data in the Data Buffer and writes it into the respective eMMCs.

[0005] eMMC integrates a Flash Controller to perform erase and write leveling, bad block management, ECC verification, and other functions. Compared with directly connecting NAND Flash to the host, eMMC shields the physical characteristics of NAND Flash, which can reduce the complexity of the host software, allowing the host to focus on upper-layer services and save special processing of NAND Flash. However, its disadvantages are also obvious:

[0006] 1. The Busy time of eMMC in processing data is unpredictable, and as time goes by, eMMC is constantly erased and written, and its data processing speed is also slowing down, with the longest time reaching more than 100ms, which can easily lead to data transmission blockage.

[0007] 2. After the host sends a storage operation command, the storage controller receives the command sent by the host and then temporarily stores the received command in the buffer (Data Buffer), because the NVMe protocol supports out-of-order execution between commands and out-of-order transmission of data blocks within the command. The commands and data in the buffer (Data Buffer) will be sent to the idle eMMC based on whether the channel is idle. Because the busy time of the eMMC to process data is unpredictable, when a channel takes a particularly long time to process data, the data of this channel will be blocked and cannot be written to the eMMC, which will cause a decrease in performance and transmission rate. See Figure 2 . Summary of the invention

[0008] To solve the above problems, the present invention proposes a data transmission optimization method for an NVMe storage device based on eMMC, including establishing a mapping table Command Data Table in an SSD NVMe controller, which is a mapping of commands and data blocks stored in a Data Buffer from a host Host, and the table maintains the status of commands and data blocks in the Data Buffer. The table includes five parts, namely, the address of the command, the address of the data block, the operation status, the valid bit and the reserved bit;

[0009] Before power-on initialization, set the maximum time threshold for the eMMC channel to allow command and data block operations to be executed in the configuration file;

[0010] When each eMMC obtains the command and data block to be executed from the Data Buffer, it first searches for its corresponding status in the Command DataTable; only when the operation status is the pending state can the command and data block be read by the eMMC; when the command and data block are read by the eMMC, the operation status is converted from the pending state to the successful execution state.

[0011] Preferably, the method specifically comprises the following steps:

[0012] During the data transmission process of the eMMC channel, the internal register of the eMMC is used to time the operation execution time of the data block under the current command, and then the time is compared with the maximum time threshold set during initialization;

[0013] If the execution is successful within the maximum time threshold, the eMMC gives a successful feedback to the SSD NVMe controller;

[0014] Then, the valid bits of the successfully executed commands and data blocks are marked as invalid in the Command Data Table, waiting for the garbage collection mechanism to clear them;

[0015] If the maximum time threshold is exceeded, the eMMC stops executing the current command and returns a failure feedback to the SSD NVMe controller;

[0016] Then, in the Command Data Table, the operation status of the failed command and data block is rolled back to the pending status, waiting to be selected for execution by other idle eMMC channels.

[0017] Preferably, the method specifically comprises the following steps:

[0018] S10, the host Host sends a storage operation command, the command and data block are transmitted to the DataBuffer of the SSD NVMe controller, and then the SSD NVMe controller initializes the Command Data Table, the operation status of the command and data block is initialized to the pending state, and the valid bit is initialized to valid;

[0019] S20, the SSD NVMe controller determines whether there is an idle eMMC channel at this time. If so, the idle eMMC takes out the storage operation command from the Data Buffer and selects its corresponding data block, and transmits it to the corresponding channel; after the command and data block are transmitted to the eMMC channel, the SSD NVMe controller changes the operation status of the corresponding command and data block in the Command Data Table to the execution success status;

[0020] S30, assuming that the current eMMC channels 1-n are all in an idle state, and n is a natural number; the SSD NVMe controller selects data blocks 1-n and transmits them to the corresponding idle eMMC channels respectively;

[0021] S40, n eMMC channels start to store transmission data, and the busy time of different channels is different. The register in each channel will time the data transmission and compare it with the maximum time threshold. It is assumed that the data of eMMC channel 1 is blocked because the busy time exceeds the maximum time threshold; eMMC channels 2-n do not exceed the maximum time threshold and complete the data transmission;

[0022] S50, then, eMMC channel 1 stops executing the current command due to data blocking, and returns a failure feedback to the SSD NVMe controller; eMMC channel 2-n completes data storage, returns a success feedback to the SSD NVMe controller, and then enters the idle state to receive data again;

[0023] S60, after the SSD NVMe controller receives the feedback from the eMMC channel, because the feedback from eMMC channel 1 is a failure, it will roll back the operation status of the failed command and data block in the Command Data Table to the pending status, waiting to be processed by other idle eMMC channels;

[0024] S70, and the feedback from eMMC channel 2-n is successful, so the valid bits of the command and data block will be marked as invalid in the Command Data Table, waiting for the garbage collection mechanism of the SSD NVMe controller to clear it;

[0025] S80, because the operation status of the command and data block 1 is reset to the pending state, it can be processed by the idle eMMC channel again; it is assumed that the SSD NVMe controller hands over data block 1 to the idle eMMC channel 2 for processing, and then continues from S20 until all data blocks under the command are successfully stored;

[0026] S90, when performing a storage operation on a data block under the current command, if there are remaining idle channels in the eMMC channel, the SSD NVMe controller will continue to receive the next command for execution without waiting for all data blocks under the current command to be stored.

[0027] Preferably, the pending state of the operation state is represented by 0, and the successful execution state is represented by 1.

[0028] Preferably, the validity of the valid bit is represented by 1, and the invalidity is represented by 0.

[0029] The beneficial effects of the present invention include at least:

[0030] The NVMe protocol uses multiple command queues (maximum 65536 command queues), each command data length is variable (from 512B to 2MB), supports out-of-order execution between commands, supports out-of-order transmission of data blocks within commands, and supports variable weight processing between command queues. Based on the RAIM storage architecture, the present invention utilizes the NVMe deep IO queue capability, out-of-order execution capability of commands, and out-of-order transmission capability of data blocks, and proposes a new data transmission optimization method for the data blocking problem caused by the unpredictable Busy time of eMMC, thereby improving SSD performance and transmission rate.

[0031] The NVMe master controller designs and maintains a mapping table CommandData Table for commands and data written into the Data Buffer, which records the operation status of commands and data in real time.

[0032] When the eMMC executes a storage command to transfer data, the internal register will time and judge the data processing. Once the preset maximum time threshold is exceeded, the execution of the command will be terminated, and the operation status of the command and the data block under the command will be rolled back in the mapping table, and the remaining idle eMMC channels will try to execute it again. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 It is a structural block diagram of a solid state hard disk based on RAIM architecture in the prior art;

[0034] Figure 2 A schematic diagram of data writing blocking based on RAIM SSD in the prior art;

[0035] Figure 3 A schematic diagram of an application of an NVM eMMC master control system of a data transmission optimization method for an eMMC-based NVMe storage device according to an embodiment of the present invention;

[0036] Figure 4 This is a schematic diagram of the NVMe master write data flow of the data transmission optimization method of the eMMC-based NVMe storage device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0038] On the contrary, the present invention covers any substitution, modification, equivalent method and scheme made on the essence and scope of the present invention as defined by the claims. Further, in order to make the public have a better understanding of the present invention, some specific details are described in detail in the detailed description of the present invention below. Those skilled in the art can fully understand the present invention without the description of these details.

[0039] See also Figure 3, a mapping table Command Data Table is established in the SSD NVMe Controller. This table is a mapping of commands and data blocks stored in the Data Buffer from the host Host. This table mainly maintains the relevant status of commands and data blocks in the Data Buffer. The table includes five parts, namely the command address (Command_Addr), the data block address (Data_Addr), the operation status (Operate_Status), the valid bit (Valid) and the reserved bit (Reserve).

[0040] Initialization: Before the device is powered on and initialized, we first set the maximum time threshold for the eMMC channel to allow command and data block operations to be executed in the configuration file;

[0041] When each eMMC obtains the command and data block to be executed from the Data Buffer, it is necessary to first look up its corresponding status in the mapping table Command Data Table; only commands and data blocks with the operation status (Operate_Status) pending execution status (indicated by 0) can be read by the eMMC; after the command and data block are read by the eMMC, they are converted from the pending execution status (indicated by 0) to the successful execution status (indicated by 1).

[0042] During the data transmission process of the eMMC channel, the internal register of the eMMC is used to time the operation execution time of the data block under the current command, and then the time is compared with the maximum time threshold set during initialization; if the execution is successful within the maximum time threshold, the eMMC gives the SSD NVMe Controller a successful feedback, and then marks the valid bit (Valid) of the successfully executed command and data block as invalid (indicated by 0) in the mapping table Command DataTable, waiting for the garbage collection mechanism to clear; if the maximum time threshold is exceeded, the eMMC stops the execution of the current command, returns a failure feedback to the SSD NVMeController, and then reverts the operation status (Operate_Status) of the failed command and data block to the pending execution status (indicated by 0) in the mapping table Command Data Table, waiting to be selected for execution by other idle eMMC channels.

[0043] The NVMe protocol uses multiple command queues (maximum 65536 command queues), each command data length is variable (from 512B to 2MB), supports out-of-order execution between commands, supports out-of-order transmission of data blocks within commands, and supports variable weight processing between command queues. Based on the RAIM storage architecture, the present invention utilizes the NVMe deep IO queue capability, out-of-order execution capability of commands, and out-of-order transmission capability of data blocks, and proposes a new data transmission optimization method for the data blocking problem caused by the unpredictable Busy time of eMMC, thereby improving SSD performance and transmission rate.

[0044] See also Figure 4 For an NVMe SSD with a PCIe interface, assuming that a command is followed by four logical data blocks, the data transmission includes the following steps:

[0045] S10, the host Host sends a storage operation command, the command and data block are transmitted to the Data Buffer of the SSD NVMe Controller, and then the SSD NVMe Controller initializes the mapping table Command Data Table, the operation status (Operate_Status) of the command and data block is initialized to the pending state (indicated by 0), and the valid bit (Valid) is initialized to 1;

[0046] S20, SSD NVMe Controller determines whether there is an idle eMMC channel at this time. If so, the idle eMMC takes out the storage operation command and selects its corresponding data block, and transmits it to the corresponding channel. After the command and data block are transmitted to the eMMC channel, SSD NVMe Controller changes the status of the corresponding command and data block in the mapping table to a successful execution status (indicated by 1);

[0047] S30, because the current eMMC channels 1, 2, 3, and 4 are all in an idle state, it is assumed that the SSD NVMe Controller selects data blocks 1, 2, 3, and 4 to be transmitted to their corresponding idle eMMC channels respectively;

[0048] S40, four eMMC channels start to store transmission data. The Busy time of different channels is different. The register in each channel will time the data transmission and compare it with the maximum time threshold. We assume that the data of eMMC channel 1 is blocked because the Busy time is too long and exceeds the maximum time threshold. eMMC channels 2, 3, and 4 do not exceed the maximum time threshold and complete the data transmission normally.

[0049] S50, eMMC channel 1 stops executing the current command due to data blocking, and returns a failure feedback to the SSD NVMeController; eMMC channels 2, 3, and 4 complete data storage, return a success feedback to the SSD NVMe Controller, and then enter the idle state to receive data again;

[0050] S60, after receiving the feedback from the eMMC channel, the SSD NVMe Controller will roll back the operation status (Operate_Status) of the failed command and data block to the pending status (indicated by 0) in the mapping table Command Data Table because the feedback from eMMC channel 1 is a failure, waiting to be processed by other idle eMMC channels;

[0051] S70, and the feedback from eMMC channels 2, 3, and 4 is successful, so the valid bits (Valid) of the command and data blocks in the mapping table are set to 0, waiting for the garbage collection mechanism of the SSD NVMe Controller to clear them;

[0052] S80, because the command and the operating status (Operate_Status) of data block 1 are reset to 0, it can be processed by the idle eMMC channel. Assume that at this time, the SSD NVMe Controller hands data block 1 to the idle eMMC channel 2 for processing, and then continues from S20; and so on, until all data blocks under the command are successfully stored;

[0053] S90, when performing a storage operation on a data block under the current command, if there are remaining idle channels in the eMMC channel, the SSD NVMe Controller will continue to receive the next command for execution without waiting for all data blocks under the current command to be stored.

[0054] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A data transmission optimization method for an NVMe storage device based on eMMC, characterized in that: Including establishing a mapping table Command Data Table in the SSD NVMe controller, which is a mapping of commands and data blocks stored in the Data Buffer from the host Host. The table maintains the status of commands and data blocks in the Data Buffer. The table includes five parts, namely, the address of the command, the address of the data block, the operation status, the valid bit and the reserved bit; Before power-on initialization, set the maximum time threshold for the eMMC channel to allow command and data block operations to be executed in the configuration file; When each eMMC obtains the command and data block to be executed from the Data Buffer, it first searches for its corresponding status in the Command DataTable; only when the operation status is in the pending state can the command and data block be read by the eMMC; when the command and data block are read by the eMMC, the operation status is converted from the pending state to the successful execution state; The specific steps include: S10, the host Host sends a storage operation command, the command and data block are transmitted to the DataBuffer of the SSD NVMe controller, and then the SSD NVMe controller initializes the Command Data Table, the operation status of the command and data block is initialized to the pending state, and the valid bit is initialized to valid; S20, the SSD NVMe controller determines whether there is an idle eMMC channel at this time. If so, the idle eMMC takes out the storage operation command from the DataBuffer and selects its corresponding data block, and transmits it to the corresponding channel; after the command and data block are transmitted to the eMMC channel, the SSD NVMe controller changes the operation state of the corresponding command and data block in the Command Data Table to the execution state; S30, assuming that the current eMMC channels 1-n are all in an idle state, and n is a natural number; the SSD NVMe controller selects data blocks 1-n and transmits them to the corresponding idle eMMC channels respectively; S40, n eMMC channels start to store transmission data, and the busy time of different channels is different. The register in each channel will time the data transmission and compare it with the maximum time threshold. It is assumed that the data of eMMC channel 1 is blocked because the busy time exceeds the maximum time threshold; eMMC channels 2-n do not exceed the maximum time threshold and complete the data transmission; S50, then, eMMC channel 1 stops executing the current command due to data blocking, and returns a failure feedback to the SSD NVMe controller; eMMC channel 2-n completes data storage, returns a success feedback to the SSD NVMe controller, and then enters the idle state to receive data again; S60, after the SSD NVMe controller receives the feedback from the eMMC channel, because the feedback from eMMC channel 1 is a failure, it will roll back the operation status of the failed command and data block in the Command Data Table to the pending status, waiting to be processed by other idle eMMC channels; S70, and the feedback from eMMC channel 2-n is successful, so the valid bits of the command and data block will be marked as invalid in the Command Data Table, waiting for the garbage collection mechanism of the SSD NVMe controller to clear it; S80, because the operation status of the command and data block 1 is reset to the pending state, it can be processed by the idle eMMC channel again; it is assumed that the SSD NVMe controller hands over data block 1 to the idle eMMC channel 2 for processing, and then continues from S20 until all data blocks under the command are successfully stored; S90, when performing a storage operation on a data block under the current command, if there are remaining idle channels in the eMMC channel, the SSD NVMe controller will continue to receive the next command for execution without waiting for all data blocks under the current command to be stored.

2. The data transmission optimization method of the NVMe storage device based on eMMC according to claim 1, characterized in that, The specific steps include: During the data transmission process of the eMMC channel, the internal register of the eMMC is used to time the operation execution time of the data block under the current command, and then the time is compared with the maximum time threshold set during initialization; If the execution is successful within the maximum time threshold, the eMMC gives a successful feedback to the SSD NVMe controller; Then, the valid bits of the successfully executed commands and data blocks are marked as invalid in the Command Data Table, waiting for the garbage collection mechanism to clear them; If the maximum time threshold is exceeded, the eMMC stops executing the current command and returns a failure feedback to the SSD NVMe controller; Then, in the Command Data Table, the operation status of the failed command and data block is rolled back to the pending status, waiting to be selected for execution by other idle eMMC channels.

3. The data transmission optimization method of the NVMe storage device based on eMMC according to claim 1, characterized in that, The pending state of the operation state is represented by 0, and the successful execution state is represented by 1.

4. The data transmission optimization method of the NVMe storage device based on eMMC according to claim 1, characterized in that, The validity of the valid bit is represented by 1, and the invalidity is represented by 0.

Citation Information

Patent Citations

  • Read performance improving method and device based on solid state disk and computer equipment

    CN110888602A