Data rollback implementation method and device based on DRAM-less solid state disk
Patent Information
- Application Number
- CN202310145715.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-21
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-02-21
AI Technical Summary
[0003]然而,现有的RAID BUF中数据出错回退方案,需要硬件读数据出错,硬件会将错误的数据异或到RAID BUF中,此时需要固件提前在DRAM中预留部分buffer资源用于缓存读出错的数据,NFC一旦接收到硬件返回的读出错信息,会向硬件发起错误数据回退流程,硬件会将buffer中缓存的原始错误数据重新异或到RAID BUF中,最终将RAID BUF中的数据还原
[0029] The aforementioned data rollback method, apparatus, computer device, and storage medium based on DRAM-less solid-state drives (SSDs) involve the following steps: When RAID recovery is required, the FTL (Fixed Layer Transport) submits a read request to the NFC (Near Field Communication), without requiring additional cache space. The NFC initiates a read request to the hardware, resulting in a UECC (Underlying Memory Error Correction) read. When the hardware detects a UECC, it re-XORs the read erroneous data into the RAID cache. The hardware automatically rolls back the erroneous data from the RAID cache, and upon successful rollback, returns a UECC read status to the NFC. The NFC then re-initiates a read request, with the data in the re-read request bypassing the RAID cache. Upon successful re-read, the hardware returns a read pass status to the NFC. This invention eliminates the need for firmware to provide additional DRAM space for caching erroneous data, reducing DRAM space usage during RAID recovery and minimizing redundant rollback mechanisms in the NFC process, thus improving the execution efficiency of RAID recovery.
Smart Images

Figure CN116028275B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of solid-state drive technology, and in particular to a method, apparatus, computer device, and storage medium for implementing data rollback based on a DRAM-less solid-state drive. Background Technology
[0002] Solid State Drives (SSDs), as a new type of storage medium, use NAND flash memory chips for data storage and are widely used in PCs, laptops, servers, and other fields, gradually replacing Hard Disk Drives (HDDs) as the mainstream storage product. Currently, in some consumer-grade SSDs, due to cost considerations, the DRAM space is compressed to a very small extent, or even non-existent. Therefore, the rational use of DRAM space is particularly important during SSD firmware operation.
[0003] However, existing RAID buffer rollback schemes require hardware to read data incorrectly. The hardware will XOR the erroneous data into the RAID buffer. This necessitates the firmware pre-reserving some buffer resources in DRAM to cache the erroneous data. Once the NFC receives the read error information from the hardware, it initiates an error data rollback process. The hardware will then XOR the original erroneous data cached in the buffer back into the RAID buffer, ultimately restoring the data in the RAID buffer. Therefore, existing rollback schemes require additional DRAM space for data caching. However, in some consumer-grade SSDs, due to hardware cost considerations, the DRAM space is compressed to a very small extent, or even non-existent. Therefore, the efficient use of DRAM space during SSD firmware operation is particularly important. Summary of the Invention
[0004] Therefore, it is necessary to provide a data rollback implementation method, apparatus, computer equipment, and storage medium based on DRAM-less solid-state drives to address the aforementioned technical problems.
[0005] A data rollback implementation method based on DRAM-less solid-state drives, the method comprising:
[0006] When RAID recovery is required, FTL submits a read request to NFC, and FTL does not need to provide additional cache space;
[0007] When NFC initiates a read request to the hardware and a UECC read occurs, the hardware will re-XOR the read erroneous data into the RAID cache.
[0008] The hardware automatically rolls back erroneous data in the RAID cache, and returns a read UECC status to the NFC after the rollback is successful.
[0009] NFC re-initiates the reread request. The data in the reread request does not pass through the RAID cache. After the reread is successful, the hardware will return the read pass status to NFC.
[0010] In one embodiment, after the step where the NFC re-initiates the reread request, the data in the reread request does not pass through the RAID cache, and the hardware returns a read pass status to the NFC after a successful reread, the following is also included:
[0011] The NFC notification hardware will XOR the correct data obtained from the rereading into the RAID cache.
[0012] In one embodiment, the step of XORing the correctly reread data into the RAID cache by the NFC notification hardware further includes:
[0013] The hardware XORs the correct data into the RAID cache and returns a status indicating that the XOR was successful to the NFC.
[0014] In one embodiment, the step of the hardware XORing the correct data into the RAID cache and returning a successful XOR status to the NFC includes:
[0015] NFC returns the read pass status to FTL.
[0016] A data rollback implementation device based on a DRAM-less solid-state drive, the device comprising:
[0017] The first read request module is used by FTL to submit a read request to NFC when RAID recovery is required, and FTL does not need to provide additional cache space.
[0018] The second read request module is used by the NFC to initiate a read request to the hardware to read UECC. When the hardware detects UECC, it re-XORs the read erroneous data into the RAID cache.
[0019] The data rollback module is used to automatically roll back erroneous data in the RAID cache. After successful rollback, it returns a read UECC status to the NFC.
[0020] The reread request module is used by NFC to re-initiate a reread request. The data in the reread request does not pass through the RAID cache. After the reread is successful, the hardware will return the read pass status to NFC.
[0021] In one embodiment, the device further includes:
[0022] The notification module is used to notify the NFC hardware to XOR the correctly read data into the RAID cache.
[0023] In one embodiment, the device further includes:
[0024] The XOR processing module is used to XOR the correct data into the RAID cache and return a successful XOR status to the NFC.
[0025] In one embodiment, the device further includes:
[0026] A status return module is used by NFC to return the status of the FTL read pass.
[0027] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any of the methods described above.
[0028] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above methods.
[0029] The aforementioned data rollback method, apparatus, computer device, and storage medium based on DRAM-less solid-state drives (SSDs) involve the following steps: When RAID recovery is required, the FTL (Fixed Layer Transport) submits a read request to the NFC (Near Field Communication), without requiring additional cache space. The NFC initiates a read request to the hardware, resulting in a UECC (Underlying Memory Error Correction) read. When the hardware detects a UECC, it re-XORs the read erroneous data into the RAID cache. The hardware automatically rolls back the erroneous data from the RAID cache, and upon successful rollback, returns a UECC read status to the NFC. The NFC then re-initiates a read request, with the data in the re-read request bypassing the RAID cache. Upon successful re-read, the hardware returns a read pass status to the NFC. This invention eliminates the need for firmware to provide additional DRAM space for caching erroneous data, reducing DRAM space usage during RAID recovery and minimizing redundant rollback mechanisms in the NFC process, thus improving the execution efficiency of RAID recovery. Attached Figure Description
[0030] Figure 1 This is an interactive diagram illustrating the traditional RAID cache data error rollback process.
[0031] Figure 2 This is an interactive diagram illustrating the RAID cache data error rollback process in this invention;
[0032] Figure 3 This is a flowchart illustrating a data rollback implementation method based on a DRAM-less solid-state drive in one embodiment;
[0033] Figure 4 This is a flowchart illustrating a data rollback implementation method based on a DRAM-less solid-state drive in another embodiment;
[0034] Figure 5 This is a structural block diagram of a data rollback implementation device based on a DRAM-less solid-state drive in one embodiment;
[0035] Figure 6 This is a structural block diagram of a data rollback implementation device based on a DRAM-less solid-state drive in another embodiment;
[0036] Figure 7 This is a structural block diagram of a data rollback implementation device based on a DRAM-less solid-state drive in another embodiment;
[0037] Figure 8 This is a structural block diagram of a data rollback implementation device based on a DRAM-less solid-state drive in another embodiment;
[0038] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0039] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0040] Currently, reference Figure 1 As shown, the existing data error rollback scheme in RAID BUF requires hardware to read data incorrectly. The hardware will XOR the erroneous data into the RAID BUF. At this point, the firmware needs to reserve some buffer resources in DRAM beforehand to cache the erroneous data. Once the NFC receives the read error information from the hardware, it will initiate the error data rollback process. The hardware will XOR the original erroneous data cached in the buffer back into the RAID BUF, ultimately restoring the data in the RAID BUF. Therefore, the existing rollback scheme requires additional DRAM space for data caching. However, in some consumer-grade SSDs, due to hardware cost considerations, the DRAM space in the SSD is compressed to a very small size, or even non-existent. Therefore, the rational use of DRAM space is particularly important during SSD firmware operation.
[0041] Based on this, the present invention proposes a data rollback implementation method based on DRAM-less solid-state drives, which can be referred to in detail. Figure 2 As shown, the firmware does not require additional DRAM space for data rollback. NFC does not need to actively initiate the rollback process; the hardware automatically rolls back erroneous data from the RAID buffer. When the hardware detects a read error, it will automatically retry and restore the data in the RAID buffer to its correct state.
[0042] In one embodiment, such as Figure 3 As shown, a data rollback implementation method based on a DRAM-less solid-state drive is provided, the method including:
[0043] Step 302: When RAID recovery is required, FTL submits a read request to NFC. FTL does not need to provide additional cache space.
[0044] Step 304: NFC initiates a read request to the hardware and a UECC read occurs. When the hardware detects the UECC read, it XORs the read erroneous data back into the RAID cache.
[0045] Step 306: The hardware automatically rolls back the erroneous data in the RAID cache. After the rollback is successful, it returns the UECC read status to the NFC.
[0046] Step 308: NFC re-initiates the reread request. The data in the reread request does not pass through the RAID cache. After the reread is successful, the hardware will return the read pass status to NFC.
[0047] In this embodiment, a data rollback implementation method based on DRAM-less solid-state drives is provided. This method does not require the firmware to provide additional DRAM space for caching erroneous data, which can reduce the DRAM space occupation during the RAID recovery process. At the same time, it can reduce the redundant rollback mechanism in the NFC process and improve the execution efficiency of RAID recovery.
[0048] Specifically, in the traditional solution, when the FTL performs RAID recovery, it submits a 4KB read request to the NFC, requiring the FTL to allocate additional buffer space in DRAM to hold the request. In this solution, however, when RAID recovery is needed, the FTL submits a read request to the NFC, eliminating the need for the FTL to provide additional buffer space.
[0049] Next, the NFC initiates a read request to the hardware, resulting in a UECC read. When the hardware detects a UECC read, it XORs the erroneous data read back into the RAID buffer. The hardware can automatically roll back the erroneous data in the RAID buffer, and after a successful rollback, it returns a UECC read status to the NFC.
[0050] Finally, NFC re-initiates the read request. The data in the read request does not pass through the RAID cache. After the read is successful, the hardware will return the read pass status to NFC.
[0051] In this embodiment, when RAID recovery is required, the FTL submits a read request to the NFC, and the FTL does not need to provide additional cache space. The NFC initiates a read request to the hardware, resulting in a UECC read. When the hardware detects a UECC read, it XORs the read erroneous data back into the RAID cache. The hardware automatically rolls back the erroneous data in the RAID cache, and after successful rollback, returns a UECC read status to the NFC. The NFC then re-initiates a read request, and the data in this re-read request does not pass through the RAID cache. After successful re-read, the hardware returns a read pass status to the NFC. This solution eliminates the need for the firmware to provide additional DRAM space for caching erroneous data, reducing DRAM space usage during RAID recovery and minimizing redundant rollback mechanisms in the NFC process, thus improving the execution efficiency of RAID recovery.
[0052] In one embodiment, such as Figure 4 As shown, a data rollback implementation method based on a DRAM-less solid-state drive is provided, which further includes:
[0053] Step 402: The NFC notification hardware will XOR the correctly read data into the RAID cache;
[0054] Step 404: The hardware XORs the correct data into the RAID cache and returns a successful XOR status to the NFC.
[0055] Step 406: NFC returns the read pass status to FTL.
[0056] Specifically, refer to Figure 2 As shown, the data rollback implementation method based on DRAM-less solid-state drives provided in this embodiment includes the following steps:
[0057] 1. When FTL performs RAID recovery, it submits a 4KB read request to NFC, and FTL does not need to provide an additional buffer.
[0058] 2. When NFC sends a 4KB read request to the hardware and encounters a UECC read error, the hardware will XOR the erroneous data into the RAID BUF.
[0059] 3. The hardware will detect the UECC read and automatically XOR the read erroneous data back into the RAID BUF. At this time, the data in the RAID BUF will be restored, and the UECC read status will be returned to the NFC.
[0060] 4. NFC re-initiates a read retry request; the data in this request does not pass through the RAID BUF.
[0061] 5. If the Read retry is successful, the hardware will return a status of "pass" to the NFC.
[0062] 6. The NFC notification hardware will XOR the correct data obtained from the retry into the RAID BUF.
[0063] 7. The hardware XORs this data into the RAID BUF and returns a successful XOR status to the NFC.
[0064] 8. NFC returns the read pass status to FTL.
[0065] In this embodiment, the firmware does not need to provide additional DRAM space for data rollback. NFC does not need to actively initiate the rollback process; the hardware automatically rolls back erroneous data from the RAID BUF. When the hardware detects a read error, it will automatically retry and then restore the data in the RAID BUF to its correct state.
[0066] It should be understood that, although Figure 1-4 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1-4 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0067] In one embodiment, such as Figure 5 As shown, a data rollback implementation device 500 based on a DRAM-less solid-state drive is provided, the device comprising:
[0068] The first read request module 501 is used by FTL to submit a read request to NFC when RAID recovery is required, and FTL does not need to provide additional cache space.
[0069] The second read request module 502 is used for NFC to initiate a read request to the hardware to read UECC. When the hardware detects UECC, it re-XORs the read erroneous data into the RAID cache.
[0070] Data rollback module 503 is used to automatically roll back erroneous data in the RAID cache. After successful rollback, it returns a read UECC status to the NFC.
[0071] The reread request module 504 is used for NFC to re-initiate a reread request. The data in the reread request does not pass through the RAID cache. After the reread is successful, the hardware will return the read pass status to NFC.
[0072] In one embodiment, such as Figure 6 As shown, a data rollback implementation device 500 based on a DRAM-less solid-state drive is provided, which further includes:
[0073] The notification module 505 is used to notify the NFC hardware to XOR the correct data obtained from the rereading into the RAID cache.
[0074] In one embodiment, such as Figure 7 As shown, a data rollback implementation device 500 based on a DRAM-less solid-state drive is provided, which further includes:
[0075] The XOR processing module 506 is used to XOR the correct data into the RAID cache and return a successful XOR status to the NFC.
[0076] In one embodiment, such as Figure 8 As shown, a data rollback implementation device 500 based on a DRAM-less solid-state drive is provided, which further includes:
[0077] Status return module 507, which is used by NFC to return the status of FTL read pass.
[0078] For specific limitations on the data rollback implementation device based on DRAM-less solid-state drives, please refer to the limitations on the data rollback implementation method based on DRAM-less solid-state drives mentioned above, which will not be repeated here.
[0079] In one embodiment, a computer device is provided, the internal structure of which can be shown as follows: Figure 9As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a data rollback method based on a DRAM-less solid-state drive.
[0080] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0081] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in the various method embodiments described above.
[0082] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the various method embodiments described above.
[0083] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0084] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0085] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A data rollback implementation method based on a DRAM-less solid-state drive, characterized in that, The method includes: When RAID recovery is required, FTL submits a read request to NFC, and FTL does not need to provide additional cache space; When NFC initiates a read request to the hardware and a UECC read occurs, the hardware will re-XOR the read erroneous data into the RAID cache. The hardware automatically rolls back erroneous data in the RAID cache, and returns a read UECC status to the NFC after the rollback is successful. NFC re-initiates the reread request. The data in the reread request does not pass through the RAID cache. After the reread is successful, the hardware will return the read pass status to NFC. The NFC notification hardware will XOR the correctly read data into the RAID cache; The hardware XORs the correct data into the RAID cache and returns a status indicating that the XOR was successful to the NFC.
2. The data rollback implementation method based on DRAM-less solid-state drives according to claim 1, characterized in that, The process further includes, after the hardware XORs the correct data into the RAID cache and returns a successful XOR status to the NFC: NFC returns the read pass status to FTL.
3. A data rollback implementation device based on a DRAM-less solid-state drive, characterized in that, The device includes: The first read request module is used by FTL to submit a read request to NFC when RAID recovery is required, and FTL does not need to provide additional cache space. The second read request module is used by the NFC to initiate a read request to the hardware to read UECC. When the hardware detects UECC, it re-XORs the read erroneous data into the RAID cache. The data rollback module is used to automatically roll back erroneous data in the RAID cache. After successful rollback, it returns a read UECC status to the NFC. The reread request module is used by NFC to re-initiate a reread request. The data in the reread request does not pass through the RAID cache. After the reread is successful, the hardware will return the read pass status to NFC. The notification module is used to notify the NFC hardware to XOR the correctly read data into the RAID cache. The XOR processing module is used to XOR the correct data into the RAID cache and return a successful XOR status to the NFC.
4. The data rollback implementation device based on a DRAM-less solid-state drive according to claim 3, characterized in that, The device further includes: A status return module is used by NFC to return the status of the FTL read pass.
5. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 2.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 2.
Citation Information
Patent Citations
Method for improving RAID efficiency in SSD read operation and SSD
CN108121509A
High-performance network-on-chip fault-tolerant router device
CN115190069A
Method and device for improving RAID performance of DRAM-less solid state disk
CN115495019A