SSD forced recovery method, system and device

By establishing an independent flash block management pool and task management system for forced recycling events of SSDs, and limiting speed for different types of tasks, the problem of traditional forced recycling has been solved, and the controllable IO performance and overall performance improvement is achieved.

CN119537258APending Publication Date: 2025-02-28SHANDONG SINOCHIP SEMICON CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411641329.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The forced recycling and processing solutions of traditional SSDs will share a set of processing processes for normal recycling and forced recycling, resulting in a great impact on SSD performance, especially when processing a large number of flash blocks in a short period of time, which may lead to a significant decline in IO performance.

Method used

By establishing independent flash block management pools and forced recycling tasks for different types of forced events, and limiting the processing speed for different types of forced recycling tasks, using components such as flash block management pools and forced recycling task managers to achieve controllable impact on IO performance.

Benefits of technology

It effectively reduces the impact of forced recycling on the IO performance of SSD, improves the overall performance and stability of SSD, and ensures that different types of forced recycling tasks can be processed in a targeted manner, thereby improving processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119537258A_ABST
    Figure CN119537258A_ABST
Patent Text Reader

Abstract

The invention provides an SSD forced recovery method, system and device, and belongs to the technical field of SSD recovery. The method comprises the following steps: establishing a flash memory block management pool and a forced recovery task for a flash memory block needing forced recovery according to a forced event type; when a flash memory block enters the flash memory block management pool, a forced recovery task of the corresponding pool is triggered; and for different types of forced recovery tasks, the processing speed is limited, and the forced recovery tasks are completed through balanced processing. The forced recovery method is independent of normal recovery and operates independently. An independent processing flow is set for forced recovery, so that the influence of forced recovery on IO performance is effectively reduced. Different flash memory block management pools and forced recovery tasks are established for flash memory blocks needing forced recovery. And due to the classification management mode, different types of forced recovery tasks can be processed in a more targeted manner, so that the processing efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method, system and device for forced recycling of an SSD, and belongs to the technical field of SSD recycling. Background Art

[0002] With the rapid development of Internet technology, human society has entered an era of big data where the amount of data is growing exponentially. The advent of the big data era requires more support from storage technology, and various big data applications have posed greater challenges to the performance and reliability of storage systems. In this context, solid-state drives (SSDs) based on NAND Flash have gradually become a hot spot in the storage field due to their higher reliability, better performance, and lower energy consumption.

[0003] However, NAND Flash has the characteristic of "erase before writing", which means that in the process of writing data, if you want to reuse the flash memory blocks, you must start the garbage collection (GC) mechanism. Garbage collection aims to recycle invalid pages of flash memory blocks in the SSD so that these flash memory blocks can be reused. It is an important function to ensure the normal operation of the SSD, and it is also an important factor affecting the performance of the SSD.

[0004] According to the triggering method of garbage collection, we can divide it into normal collection and forced collection. The triggering condition of normal collection is that when the number of flash blocks available for writing is lower than a certain threshold, the system will automatically start garbage collection to free up space. The triggering conditions of forced collection are more complicated, which may include data shelf life expiration, read interference, wear leveling requirements, and read / write error handling. In these cases, the system needs to immediately start garbage collection to process specific types of flash blocks to ensure data integrity and system stability.

[0005] However, traditional garbage collection solutions often use the same processing flow for normal collection and forced collection, and the performance impact on SSDs is adjusted by write arbitration. In this solution, forced collection may have a significant impact on performance because it needs to process a large number of flash blocks in a short period of time, which may cause a significant decrease in IO performance. In view of this, it is very necessary to study how to reduce the impact of forced collection on performance. Summary of the invention

[0006] The purpose of the present invention is to provide a method, system and device for forced recovery of an SSD, so as to achieve controllable impact on IO performance and improve the overall performance and stability of the SSD.

[0007] In order to achieve the above object, the present invention is implemented through the following technical solutions: The method comprises: According to the forced event type, a flash memory block management pool and a forced recycling task are established for the flash memory blocks that need to be forcedly recycled; When a flash block enters the flash block management pool, a forced recycling task of the corresponding pool is triggered; For different types of forced recycling tasks, the processing speed is limited and the forced recycling tasks are completed evenly.

[0008] Preferably, the mandatory event types include data shelf life, read disturbance, wear leveling, and read / write error handling, and a corresponding flash block management pool and mandatory recycling task are established for each mandatory event type.

[0009] Preferably, the forced recovery task processing process is as follows: When a flash block enters the flash block management pool, the forced recycling task of the corresponding pool is triggered, and when the flash blocks in the pool are recycled and no new flash blocks enter the pool within the set time, the forced recycling task corresponding to the pool is actively turned off; After the forced recycling task reclaims the flash memory blocks of the corresponding pool, if the target flash memory block used by the task is not full, the flash memory blocks to be recycled are obtained from other flash memory blocks for processing until the current target flash memory block is full and the task is released. The unrecycled source flash memory blocks are put back to the head of the corresponding pool and returned to the tasks of the corresponding pool for processing.

[0010] Preferably, for different types of forced recycling tasks, limiting the processing speed specifically includes: setting a recycling speed lower limit for the forced recycling task caused by the data shelf life, and executing the forced recycling task at the recycling speed lower limit; For the forced recovery task caused by read interference, the recovery speed is calculated by setting the upper limit of the percentage of the impact on IO performance according to the test requirements; The reclaim rate is calculated based on the maximum bandwidth loss that the test requires to be acceptable for the forced reclaim tasks caused by wear leveling and read / write error handling.

[0011] Preferably, the calculation formula for the recovery speed of forced recovery caused by the data shelf life is as follows: , in, Indicates how many writes can be completed per second due to forced recycling caused by the data shelf life. Indicates the number of flash blocks that need to be reclaimed in the case of extreme data shelf life storms. Indicates the number of word lines contained in each flash memory block, Indicates the time from when the data shelf life triggers the threshold to when the data actually expires.

[0012] Preferably, the calculation formula for the recovery speed of the forced recovery caused by read disturbance is as follows: , in, Indicates how many writes can be completed per second due to forced recycling caused by interference. It is an adjustable parameter, and its value range is a decimal between 0 and 1. Indicates the bandwidth that the client requires to be lost. Indicates the time it takes to complete a write. Indicates the number of valid data frames contained in one word line.

[0013] Preferably, the wear leveling and read / write error handling recovery speed calculation formula is as follows: in, Indicates how many writes can be completed per second due to wear leveling and forced recycling caused by read / write error handling. Indicates the maximum bandwidth loss required by the client, Indicates the number of valid data frames contained in one word line.

[0014] The method also processes the forced recycling tasks evenly, and first performs chain hanging processing on the write tasks sent by the forced recycling tasks, hangs different tasks on different chains, and uses the background chain polling method to evenly send chain hanging messages within a certain period of time.

[0015] A SSD forced recycling system, comprising: Forced flash block manager: configured to manage the entry and exit of flash blocks that need to be forced to be reclaimed; Forced Recycling Task Manager: is configured to manage the triggering, running and completion of forced recycling tasks; Forced recovery speed limiter: configured to limit the recovery speed of forced recovery; Forced reclaim balancing processor: is configured to balance the write tasks that send forced reclaims.

[0016] A SSD forced recycling device comprises a processor and a memory storing program instructions, wherein the processor is configured to execute the SSD forced recycling method when running the program instructions.

[0017] The advantages of the present invention are that the forced recycling method of the present invention operates independently from normal recycling. In the traditional solution, normal recycling and forced recycling share a set of processing procedures, resulting in a significant impact of forced recycling on the performance of the SSD. However, the present invention effectively reduces the impact of forced recycling on IO performance by establishing an independent processing procedure for forced recycling.

[0018] According to the type of forced events (such as data shelf life, read interference, wear leveling, read / write error processing, etc.), the present invention establishes different flash memory block management pools and forced recycling tasks for the flash memory blocks that need to be forcibly recycled. This classification management method allows different types of forced recycling tasks to be processed more specifically, thereby improving processing efficiency.

[0019] The present invention implements speed limit processing for different types of forced recovery tasks. According to the requirements of different forced event types on IO performance, reasonable processing speeds are set for different types of forced recovery tasks. This speed limit processing strategy not only ensures the smooth completion of forced recovery tasks, but also avoids performance fluctuations caused by too fast processing speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.

[0021] Figure 1 It is a schematic diagram of the process of the present invention.

[0022] Figure 2 Schematic diagram of the forced recovery task operation.

[0023] Figure 3 A schematic diagram of an SSD forced recycling device. DETAILED DESCRIPTION

[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0025] Example 1 like Figure 1 As shown, a method for forced recycling of an SSD includes: S1: According to the forced event type, a flash memory block management pool and a forced recycling task are established for the flash memory blocks that need to be forcedly recycled.

[0026] As a refinement of the above embodiment, the mandatory event types include data shelf life, read disturbance, wear leveling, and read / write error handling, and a corresponding flash block management pool and mandatory recycling task are established for each mandatory event type.

[0027] Specifically, four flash block management pools, POOL_RETENTION, POOL_READDISTURB, POOL_WL, and POOL_ERRPROC, are established to store different types of flash blocks that need to be forcibly recycled. And each flash block management pool corresponds to a forced recycling task, FGC_TASK_RE, FGC_TASK_RD, FGC_TASK_WL, and FGC_TASK_EP, as shown in Table 1.

[0028] Table 1 Correspondence between mandatory event types and flash block management pools and GC tasks S2: When a flash block enters the flash block management pool, a forced recycling task of the corresponding pool is triggered; As a refinement of the above embodiment, Figure 2 As shown, the forced recycling task processing process is as follows: If a flash block enters a pool, the forced recycling task of the corresponding pool is triggered to recycle the flash blocks in the pool. When the flash blocks in the pool are recycled and no new flash blocks enter the pool within the set time, the forced recycling task corresponding to the pool is actively turned off to release the resources occupied by the task. Because the flash block recycling priorities for read interference and read / write error processing are relatively high, the forced recycling tasks corresponding to these two types can be mixed, that is, after the flash blocks in the corresponding pool are recycled, if the target flash blocks used by the task are not full, the flash blocks to be recycled can be obtained from the other party's flash blocks for processing until the current target flash blocks are full and the task is released. The unrecycled source flash blocks are returned to the head of the corresponding pool and handed back to the task of the corresponding pool for processing, ending the task of processing the flash blocks for the other party.

[0029] S3: For different types of forced recycling tasks, limit the processing speed and complete the forced recycling tasks evenly.

[0030] As a refinement of the above embodiment, for different types of forced recycling tasks, limiting the processing speed specifically includes: setting a recycling speed lower limit for the forced recycling tasks caused by the data shelf life, and executing the forced recycling tasks with the recycling speed lower limit; calculating the recycling speed by setting an upper limit of the percentage of the impact on IO performance according to the test requirements for the forced recycling tasks caused by read interference; calculating the recycling speed by the maximum bandwidth loss acceptable to the test requirements for the forced recycling tasks caused by wear leveling and read / write error processing. The flash memory block recycling requirements are shown in Table 2.

[0031] Table 2 Flash block recycling requirements for mandatory event types As a refinement of the above embodiment, for forced recycling caused by data retention, it is necessary to ensure that it can cope with extreme data retention storms, so the speed of this type of forced recycling tasks is limited; the recycling speed calculation formula for forced recycling caused by data retention is as follows: , in, Indicates how many writes can be completed per second due to forced recycling caused by the data shelf life. Indicates the number of flash blocks that need to be reclaimed in the case of extreme data shelf life storms. Indicates the number of word lines (wl) contained in each flash memory block, Indicates the time from the trigger threshold of the data shelf life to the actual expiration of the data. The above formula is used to calculate the slowest forced recycling task processing speed in response to extreme retention storms while minimizing the impact on IO performance.

[0032] wl: wordline is a storage unit composed of a certain number (2 to the power of n) of storage units whose control ends are connected.

[0033] As a refinement of the above embodiment, for the forced recycling caused by read disturbance (Wear Leveling), according to the customer's test requirements, the impact on normal IO performance cannot exceed a certain percentage. The recycling speed calculation formula for the forced recycling caused by read disturbance is as follows: , in, Indicates how many writes can be completed per second due to forced recycling caused by interference. It is an adjustable parameter, and its value range is a decimal between 0 and 1. Indicates the bandwidth that the client requires to be lost. Indicates the time taken to complete a write. It needs to be measured for different NAND types. Indicates the number of valid data frames contained in one word line. One df is generally 4k data in size.

[0034] As a refinement of the above embodiment, for Readdisturb and read / write error processing, this requires a higher priority processing speed and must be recycled at the fastest processing speed. Generally, according to customer test requirements, the fastest recycling is performed with the maximum acceptable bandwidth loss. The calculation formula for the wear leveling and read / write error processing recycling speed is as follows: in, Indicates how many writes can be completed per second due to wear leveling and forced recycling caused by read / write error handling. Indicates the maximum bandwidth loss requested by the client.

[0035] As a refinement of the above embodiment, in addition to limiting the speed of forced recycling, the forced recycling tasks will be processed evenly to prevent performance fluctuations caused by concentrated sending of forced recycling tasks. To this end, the present invention will first perform chain processing on the write tasks sent by the forced recycling tasks, hang different tasks on different chains, and use the background chain polling method to evenly send the chain messages within 1 second, thereby minimizing the performance fluctuations caused by forced recycling.

[0036] The present invention provides an SSD forced recycling method and device. Compared with the traditional method, the forced recycling of the present invention runs independently from the normal recycling, and the speed of the forced recycling is controlled separately according to the forced event trigger type, thereby effectively reducing the impact of forced recycling on IO performance.

[0037] Example 2 like Figure 3 As shown, a SSD forced recycling system includes: Forced flash block manager: configured to manage the entry and exit of flash blocks that need to be forced to be reclaimed; Forced Recycling Task Manager: is configured to manage the triggering, running and completion of forced recycling tasks; Forced recovery speed limiter: configured to limit the recovery speed of forced recovery; Forced reclaim balancing processor: is configured to balance the write tasks that send forced reclaims.

[0038] The embodiment of the present disclosure provides an SSD forced recycling device, including a processor and a memory. Optionally, the device may also include a communication interface and a bus. The processor, the communication interface, and the memory may communicate with each other through the bus. The communication interface may be used for information transmission. The processor may call the logic instructions in the memory to execute the SSD forced recycling method of the above embodiment.

[0039] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.

[0040] The memory, as a computer-readable storage medium, can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the method in the embodiment of the present disclosure. The processor executes the functional application and data processing by running the program instructions / modules stored in the memory, that is, the SSD forced recycling method in the above embodiment is implemented.

[0041] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory may include a high-speed random access memory and may also include a non-volatile memory.

[0042] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for forced recycling of SSD, characterized in that: include: According to the forced event type, a flash memory block management pool and a forced recycling task are established for the flash memory blocks that need to be forcedly recycled; When a flash block enters the flash block management pool, a forced recycling task of the corresponding pool is triggered; For different types of forced recycling tasks, the processing speed is limited and the forced recycling tasks are completed evenly.

2. The SSD forced recycling method according to claim 1, characterized in that: The mandatory event types include data shelf life, read disturbance, wear leveling, and read / write error processing, and a corresponding flash memory block management pool and mandatory recycling task are established for each mandatory event type.

3. The SSD forced recycling method according to claim 1, characterized in that: The forced recycling task processing process is as follows: When a flash block enters the flash block management pool, the forced recycling task of the corresponding pool is triggered, and when the flash blocks in the pool are recycled and no new flash blocks enter the pool within the set time, the forced recycling task corresponding to the pool is actively turned off; After the forced recycling task reclaims the flash memory blocks of the corresponding pool, if the target flash memory block used by the task is not full, the flash memory blocks to be recycled are obtained from other flash memory blocks for processing until the current target flash memory block is full and the task is released. The unrecycled source flash memory blocks are put back to the head of the corresponding pool and returned to the tasks of the corresponding pool for processing.

4. The SSD forced recycling method according to claim 1, characterized in that: For different types of mandatory recycling tasks, the processing speed is limited in the following ways: A lower limit of the recycling speed is set for the mandatory recycling tasks caused by the data shelf life, and the mandatory recycling tasks are executed at the recycling speed lower limit; For the forced recovery task caused by read interference, the recovery speed is calculated by setting the upper limit of the percentage of the impact on IO performance according to the test requirements; The reclaim rate is calculated based on the maximum bandwidth loss that the test requires to be acceptable for the forced reclaim tasks caused by wear leveling and read / write error handling.

5. The SSD forced recycling method according to claim 4, characterized in that: The calculation formula for the recovery speed of forced recovery caused by the data shelf life is as follows: , in, Indicates how many writes can be completed per second due to forced recycling caused by the data shelf life. Indicates the number of flash blocks that need to be reclaimed in the case of extreme data shelf life storms. Indicates the number of word lines contained in each flash memory block, Indicates the time from when the data shelf life triggers the threshold to when the data actually expires.

6. The SSD forced recycling method according to claim 4, characterized in that: The calculation formula for the recovery speed of forced recovery caused by read disturbance is as follows: , in, Indicates how many writes can be completed per second due to forced recycling caused by interference. It is an adjustable parameter, and its value range is a decimal between 0 and 1. Indicates the bandwidth that the client requires to be lost. Indicates the time it takes to complete a write. Indicates the number of valid data frames contained in one word line.

7. The SSD forced recycling method according to claim 4, characterized in that: The wear leveling and read / write error handling recovery speed calculation formula is as follows: in, Indicates how many writes can be completed per second due to wear leveling and forced recycling caused by read / write error handling. Indicates the maximum bandwidth loss required by the client. Indicates the number of valid data frames contained in one word line.

8. The SSD forced recycling method according to claim 4, characterized in that: The method also processes forced recycling tasks evenly, and first performs chain hanging processing on the write tasks sent by the forced recycling tasks. Different tasks are hung on different chains, and the background chain polling method is adopted to evenly send the chain hanging messages within a certain period of time.

9. An SSD forced recycling system using the method according to any one of claims 1 to 8, characterized in that: include: Forced flash block manager: configured to manage the entry and exit of flash blocks that need to be forced to be reclaimed; Forced Recycling Task Manager: is configured to manage the triggering, running and completion of forced recycling tasks; Forced recovery speed limiter: configured to limit the recovery speed of forced recovery; Forced reclaim balancing processor: is configured to balance the write tasks that send forced reclaims.

10. A SSD forced recycling device, comprising a processor and a memory storing program instructions, characterized in that: The processor is configured to execute the SSD forced recycling method according to any one of claims 1 to 8 when running the program instructions.