Node resource allocation method and device based on raid error correction mechanism
By using a node resource allocation method based on RAID error correction mechanism, the problem of limited DRAM space in consumer-grade SSDs is solved, error correction processing without additional DRAM space is achieved, deadlock is avoided, and resource utilization efficiency is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SUZHOU UNIONMEMORY INFORMATION SYST LTD
- Filing Date
- 2023-07-19
- Publication Date
- 2026-08-04
AI Technical Summary
In consumer-grade SSDs, due to the limited DRAM space, existing resource allocation schemes require additional node resources for error correction processing, resulting in excessive DRAM space consumption and potentially deadlock.
The node resource allocation method based on RAID error correction mechanism is adopted. FTL requests node resources from the node resource pool, obtains UECC nodes and puts them into the recovery chain of the RAID error correction module. If a large number of UECC nodes are received, the UECC nodes themselves are used first to perform error correction processing, and the nodes are released to the resource pool after recovery is completed.
It reduces DRAM space usage during RAID error correction, avoids deadlock, and improves resource utilization efficiency.
Smart Images

Figure CN116880767B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of solid-state drive technology, and in particular to a node resource allocation method, apparatus, computer device, and storage medium based on a RAID error correction mechanism. Background Technology
[0002] SSDs (Solid State Drives) have been widely used in various applications and are gradually replacing traditional HDDs (Hard Disk Drives) in the PC market, providing users with a better experience in terms of reliability and performance.
[0003] Currently, in some consumer-grade SSDs, due to cost and other factors, the DRAM space in the SSD is compressed to a very small size, or even there is no DRAM available. Therefore, it is particularly important to make reasonable use of DRAM space during the operation of SSD firmware.
[0004] However, existing resource allocation schemes require additional node resources for error correction processing, which consume DRAM space. But in some consumer-grade SSDs, due to hardware cost considerations, the DRAM space is compressed to a very small extent, or even nonexistent. Therefore, the rational use of DRAM space is particularly important during SSD firmware operation. Thus, within the limited DRAM space, it is necessary to reduce resource dependencies in the firmware to prevent deadlocks that may occur when some modules rely on current resources while processing their own tasks. Summary of the Invention
[0005] Therefore, it is necessary to provide a node resource allocation method, device, computer equipment, and storage medium based on RAID error correction mechanism to address the aforementioned technical problems.
[0006] A node resource allocation method based on RAID error correction mechanism, the method comprising:
[0007] FTL requests node resources from the node resource pool to send read requests to NFC;
[0008] Send a read request to NFC, obtain the UECC node returned by NFC, and put it into the RAID error correction module's recovery chain;
[0009] If FTL receives a large number of UECC nodes at the same time, the RAID error correction module will prioritize using the UECC nodes themselves to perform error correction processing.
[0010] Once the RAID error correction module has recovered, the corresponding node is released to the node resource pool.
[0011] In one embodiment, after the step of releasing the corresponding node to the node resource pool after the RAID error correction module has recovered, the method further includes:
[0012] Before FTL initiates another read request, it first requests a new node from the node resource pool.
[0013] If the application fails, wait for the RAID error correction module to complete and release new node resources.
[0014] In one embodiment, after the step of waiting for the RAID error correction module to complete and release new node resources if the application fails, the method further includes:
[0015] After the RAID error correction module completes its work, it will apply for a new node from the node resource pool again. Once the application is successful, it will continue to send read requests to the NFC.
[0016] In one embodiment, the step of the RAID error correction module prioritizing the use of the UECC nodes themselves to perform error correction processing if the FTL simultaneously receives a large number of UECC nodes further includes:
[0017] The RAID error correction module does not request additional node resources from the node resource pool during the error correction process.
[0018] A node resource allocation device based on RAID error correction mechanism, the device comprising:
[0019] The resource request module is used by FTL to request node resources from the node resource pool to send read requests to NFC.
[0020] The request acquisition module is used to send a read request to the NFC, acquire the UECC node returned by the NFC, and put it into the recovery chain of the RAID error correction module;
[0021] An error correction module is provided, wherein if the FTL receives a large number of UECC nodes at the same time, the RAID error correction module will preferentially use the UECC nodes themselves to perform error correction processing.
[0022] The node release module is used to release the corresponding node to the node resource pool after the RAID error correction module has recovered.
[0023] In one embodiment, the device further includes a waiting module, the waiting module being used for:
[0024] Before FTL initiates another read request, it first requests a new node from the node resource pool.
[0025] If the application fails, wait for the RAID error correction module to complete and release new node resources.
[0026] In one embodiment, the apparatus includes a re-request module, the re-request module being configured to:
[0027] After the RAID error correction module completes its work, it will apply for a new node from the node resource pool again. Once the application is successful, it will continue to send read requests to the NFC.
[0028] In one embodiment, in the error correction processing module:
[0029] The RAID error correction module does not request additional node resources from the node resource pool during the error correction process.
[0030] 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.
[0031] 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.
[0032] The aforementioned node resource allocation method, apparatus, computer equipment, and storage medium based on the RAID error correction mechanism request node resources from the node resource pool via FTL to send read requests to NFC; after sending read requests to NFC, the UECC node returned by NFC is obtained and placed in the recovery chain of the RAID error correction module; if FTL receives a large number of UECC nodes simultaneously, the RAID error correction module prioritizes using the UECC nodes themselves to perform error correction processing; after the RAID error correction module completes recovery, the corresponding node is released to the node resource pool. The RAID error correction mechanism proposed in this invention does not require the firmware to provide additional DRAM space for error correction processing, which can reduce DRAM space occupation during RAID error correction processing and reduce dependence on current resources, avoiding deadlock. Attached Figure Description
[0033] Figure 1 This is a flowchart illustrating a node resource allocation method based on a RAID error correction mechanism in one embodiment.
[0034] Figure 2 This is a flowchart illustrating a node resource allocation method based on a RAID error correction mechanism in another embodiment.
[0035] Figure 3 This is a schematic diagram illustrating the processing steps of a node resource allocation method based on a RAID error correction mechanism in one embodiment.
[0036] Figure 4 This is a structural block diagram of a node resource allocation device based on a RAID error correction mechanism in one embodiment;
[0037] Figure 5 This is a structural block diagram of a node resource allocation device based on a RAID error correction mechanism in another embodiment;
[0038] Figure 6 This is a structural block diagram of a node resource allocation device based on a RAID error correction mechanism in another embodiment;
[0039] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0040] 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.
[0041] In existing RAID error correction mechanism node resource allocation schemes, the RAID error correction module depends on the current node resources. If all nodes in the current node resource pool fail, all nodes will be added to the RAID error correction module. When the RAID error correction module attempts to perform error correction, it tries to request new nodes from the resource pool. However, since all nodes in the resource pool are occupied by the RAID error correction module itself, it cannot request resources and therefore cannot perform error correction. Furthermore, because the original resources are only released after the RAID error correction process is completed, resources remain unreleased, resulting in a deadlock.
[0042] Meanwhile, existing resource allocation schemes require additional node resources for error correction processing, which occupy DRAM space. However, in some consumer-grade SSDs, due to factors such as hardware costs, the DRAM space in the SSD is compressed to a very small size, or even no DRAM is available. Therefore, it is particularly important to make reasonable use of DRAM space during the operation of SSD firmware.
[0043] Based on this, this solution provides a node resource allocation method based on RAID error correction mechanism, which aims to reduce DRAM space usage during RAID error correction processing.
[0044] In one embodiment, such as Figure 1 As shown, a node resource allocation method based on RAID error correction mechanism is provided, which includes:
[0045] Step 102: FTL requests node resources from the node resource pool to send a read request to NFC;
[0046] Step 104: Send a read request to NFC, obtain the UECC node returned by NFC, and put it into the RAID error correction module's recovery chain;
[0047] Step 106: If FTL receives a large number of UECC nodes at the same time, the RAID error correction module will preferentially use the UECC nodes themselves to perform error correction processing.
[0048] Step 108: After the RAID error correction module has recovered, release the corresponding node to the node resource pool.
[0049] In this embodiment, a node resource allocation method based on RAID error correction mechanism is provided. This method does not require the firmware to provide additional DRAM space for error correction processing, which can reduce the DRAM space occupation during RAID error correction processing and reduce the dependence on current resources, thus avoiding deadlock.
[0050] Specifically, first, the FTL requests node resources from the node resource pool to send read requests to the NFC. Next, the FTL sends a read request to the NFC, obtains the UECC node returned by the NFC, and adds it to the RAID error correction module's recovery chain.
[0051] If the FTL receives a large number of UECC nodes simultaneously, the RAID error correction module will prioritize using the UECC nodes themselves to perform error correction. Once the RAID error correction module has recovered, the corresponding nodes will be released to the node resource pool.
[0052] In one embodiment, if the FTL receives a large number of UECC nodes at the same time, the step of the RAID error correction module prioritizing the use of the UECC nodes themselves to perform error correction processing further includes: the RAID error correction module does not request additional node resources from the node resource pool during the error correction process.
[0053] Specifically, if FTL receives a large number of UECC nodes simultaneously, it may lead to resource exhaustion in the resource pool. Therefore, in this solution, the RAID error correction module attempts to perform error correction processing on the UECC nodes themselves. By using the faulty node itself for error correction, the firmware does not need to provide additional node resources for error correction, reducing DRAM space usage. The RAID error correction module does not rely on current node resources; as long as it has available resources, it does not need to request additional resources, preventing deadlocks.
[0054] In the above embodiments, the FTL requests node resources from the node resource pool to send read requests to the NFC; after sending the read request to the NFC, the UECC node returned by the NFC is obtained and placed in the recovery chain of the RAID error correction module; if the FTL receives a large number of UECC nodes simultaneously, the RAID error correction module prioritizes using the UECC nodes themselves to perform error correction processing; after the RAID error correction module has recovered, the corresponding node is released to the node resource pool. The RAID error correction mechanism proposed in this invention does not require the firmware to provide additional DRAM space for error correction processing, which can reduce the DRAM space occupation during the RAID error correction process, and at the same time reduce the dependence on current resources, avoiding deadlock.
[0055] In one embodiment, such as Figure 2 As shown, a node resource allocation method based on a RAID error correction mechanism is provided. After the step of releasing the corresponding node to the node resource pool after the RAID error correction module has recovered, the method further includes:
[0056] Step 202: Before FTL initiates another read request, it first requests a new node from the node resource pool;
[0057] Step 204: If the application fails, wait for the RAID error correction module to complete and release new node resources;
[0058] Step 206: After the RAID error correction module completes its work, apply for a new node from the node resource pool again. After the application is successful, continue to send a read request to NFC.
[0059] Specifically, refer to Figure 3 The schematic diagram of the node resource allocation method based on RAID error correction mechanism shown includes the following steps:
[0060] Step 3.1: FTL requests a node from the resource request pool to send a read request to NFC.
[0061] Step 3.2: NFC returns the UECC to FTL.
[0062] Step 3.3: FTL receives the UECC node returned by NFC and puts it into the RAID error correction module's recovery chain.
[0063] Step 3.4: After the RAID error correction module has recovered, put the node back into the resource pool.
[0064] Step 3.5: If FTL receives a large number of UECC nodes at the same time, it will cause the resources in the resource pool to be exhausted.
[0065] Step 3.6: The RAID error correction module attempts to perform error correction processing using the UECC node itself.
[0066] Step 3.7: Before other modules of FTL send requests, they attempt to apply for a new node from the resource pool. If the application fails, they wait for the RAID error correction module to complete before releasing the new node resources.
[0067] Step 3.8: After the RAID error correction module completes its processing, the corresponding node is released to the resource pool.
[0068] Step 3.9: Other modules in FTL try to request resources again, and this time the request is successful.
[0069] Step 3.10: FTL can continue sending requests and process them in a loop.
[0070] Unlike existing technologies where a large number of UECC nodes are added to the RAID error correction module's pending chain, this new RAID error correction module attempts to request new nodes from the resource pool for RAID error correction. Since resources are only released after RAID error correction is complete, the RAID error correction module cannot release resources at this point, and there are no new resources available for request, leading to request failure. Other FTL modules also attempt to request new nodes from the resource pool before sending requests, which similarly fails, causing request transmission blockage. Because the RAID error correction module cannot request resources for error correction, it cannot release resources, preventing normal RAID error correction and resource release, resulting in a deadlock.
[0071] In this embodiment, the DRAM space usage during RAID error correction can be effectively reduced, while the dependence on current resources can be reduced, thus avoiding deadlock.
[0072] It should be understood that, although Figures 1-3 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. Figures 1-3 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.
[0073] In one embodiment, such as Figure 4 As shown, a node resource allocation device 400 based on a RAID error correction mechanism is provided. The device includes:
[0074] Resource request module 401, the resource request module is used by FTL to request node resources from the node resource pool to send read requests to NFC;
[0075] The request acquisition module 402 is used to send a read request to the NFC, acquire the UECC node returned by the NFC, and put it into the recovery chain of the RAID error correction module.
[0076] Error correction module 403, the error correction module is used to prioritize using the UECC node itself to perform error correction processing if the FTL receives a large number of UECC nodes at the same time;
[0077] Node release module 404 is used to release the corresponding node to the node resource pool after the RAID error correction module has recovered.
[0078] In one embodiment, such as Figure 5 As shown, a node resource allocation device 400 based on a RAID error correction mechanism is provided. This device also includes a waiting module 405, which is used for:
[0079] Before FTL initiates another read request, it first requests a new node from the node resource pool.
[0080] If the application fails, wait for the RAID error correction module to complete and release new node resources.
[0081] In one embodiment, such as Figure 6 As shown, a node resource allocation device 400 based on a RAID error correction mechanism is provided. This device includes a re-request module 406, which is used for:
[0082] After the RAID error correction module completes its work, it will apply for a new node from the node resource pool again. Once the application is successful, it will continue to send read requests to the NFC.
[0083] In one embodiment, in the error correction processing module 403:
[0084] The RAID error correction module does not request additional node resources from the node resource pool during the error correction process.
[0085] For specific limitations on the node resource allocation device based on the RAID error correction mechanism, please refer to the limitations on the node resource allocation method based on the RAID error correction mechanism mentioned above, which will not be repeated here.
[0086] In one embodiment, a computer device is provided, the internal structure of which can be shown as follows: Figure 7As 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 the 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 node resource allocation method based on a RAID error correction mechanism.
[0087] Those skilled in the art will understand that Figure 7 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.
[0088] 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.
[0089] 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.
[0090] 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.
[0091] 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.
[0092] 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 node resource allocation method based on RAID error correction mechanism, the method comprising: FTL requests node resources from the node resource pool to send read requests to NFC; Send a read request to NFC, obtain the UECC node returned by NFC, and put it into the RAID error correction module's recovery chain; If the FTL receives a large number of UECC nodes at the same time, the RAID error correction module will prioritize using the UECC nodes themselves to perform error correction processing; it also includes: the RAID error correction module does not request additional node resources from the node resource pool during the error correction process. Once the RAID error correction module has recovered, the corresponding node is released to the node resource pool.
2. The node resource allocation method based on RAID error correction mechanism according to claim 1, characterized in that, After the step of releasing the corresponding node to the node resource pool after the RAID error correction module has recovered, the method further includes: Before FTL initiates another read request, it first requests a new node from the node resource pool. If the application fails, wait for the RAID error correction module to complete and release new node resources.
3. The node resource allocation method based on RAID error correction mechanism according to claim 2, characterized in that, Following the step of waiting for the RAID error correction module to complete and release new node resources if the application fails, the following is also included: After the RAID error correction module completes its work, it will apply for a new node from the node resource pool again. Once the application is successful, it will continue to send read requests to the NFC.
4. A node resource allocation device based on RAID error correction mechanism, characterized in that, The device includes: The resource request module is used by FTL to request node resources from the node resource pool to send read requests to NFC. The request acquisition module is used to send a read request to the NFC, acquire the UECC node returned by the NFC, and put it into the recovery chain of the RAID error correction module; An error correction module is provided, wherein if the FTL receives a large number of UECC nodes simultaneously, the RAID error correction module prioritizes using the UECC nodes themselves to perform error correction processing; the RAID error correction module does not request additional node resources from the node resource pool during the error correction process. The node release module is used to release the corresponding node to the node resource pool after the RAID error correction module has recovered.
5. The node resource allocation device based on RAID error correction mechanism according to claim 4, characterized in that, The device further includes a waiting module, the waiting module being used for: Before FTL initiates another read request, it first requests a new node from the node resource pool. If the application fails, wait for the RAID error correction module to complete and release new node resources.
6. The node resource allocation device based on RAID error correction mechanism according to claim 5, characterized in that, The apparatus includes a re-request module, the re-request module being configured to: After the RAID error correction module completes its work, it will apply for a new node from the node resource pool again. Once the application is successful, it will continue to send read requests to the NFC.
7. 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 3.
8. 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 3.