Solid state disk invalid data filling method and device

By adopting a method based on the invalid data filling speed model in a solid-state drive, the filling speed is adjusted to adapt to the IO command frequency and flash memory write speed, the response time extension and data error risks in the case of IO command emergencies in the prior art are solved, and data security and response time are achieved.

CN119861872AActive Publication Date: 2025-04-22SHANDONG SINOCHIP SEMICON CO LTD

Patent Information

Application Number
CN202411921333.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-22
Estimated Expiration
2044-12-25

AI Technical Summary

Technical Problem

The prior art cannot effectively deal with the emergencies of IO commands when filling in invalid data of solid-state drives, resulting in extended response time or increased risk of data errors.

Method used

A method based on the invalid data filling speed model is adopted to adapt to the frequency of IO commands and the limitations of flash write speed by adjusting the filling speed, ensuring the safe shutdown of physical blocks and effective data protection.

Benefits of technology

It realizes flexible adjustment of the filling speed during invalid data filling, taking into account data security and IO command response time, and extends the service life of the solid-state drive.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119861872A_ABST
    Figure CN119861872A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of solid state disks, in particular to an invalid data filling method and device for a solid state disk, the method is realized based on an invalid data filling speed model, the invalid data filling speed is calculated by defining a parameter K, # imgabs0 # and # imgabs1 #, the sending time of a latest IO command is recorded as # imgabs2 # to continuously update # imgabs3 #, and meanwhile, the invalid data filling speed of the solid state disk is calculated by defining a parameter K, # imgabs0 # and # imgabs1 #. And the flash memory conversion layer continuously fills the physical block with invalid data according to the calculated invalid data filling speed. According to the method, the process of filling the invalid data at the tail of the physical block is rationalized, so that the filling process can cope with various IO insertion scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of hard disk maintenance, and in particular to a method and device for filling invalid data in a solid state hard disk. Background Art

[0002] NAND flash memory is the key storage medium of SSD. In NAND flash memory, floating gate transistors are organized into flash memory arrays according to certain structural levels. In NAND, the physical page (PG for short) is the smallest read unit, the word line (WL for short) is the smallest programming unit, and the physical block (BLK for short) is the smallest erase unit.

[0003] During the programming process of flash memory, if a physical block is open for too long, it may cause the injected floating gate electrons to overflow, which may lead to errors in the data written to the physical block. At this time, if the physical block is directly closed, the part without written data will be subjected to a higher potential difference during erasure, increasing wear and tear and affecting the service life of the physical block. Based on the above phenomenon, one solution is that when the physical block open time reaches a threshold and is not fully written, the flash memory conversion layer fills invalid data to the end of the physical block and then closes the physical block.

[0004] In the prior art, there are few studies on invalid data filling schemes. If the remaining part of the physical block is filled at one time, or a large amount of invalid data is fixedly filled in a unit time, it will be impossible to cope with the sudden IO commands during the filling process, and the response time of the host to initiate the IO command will be extended; if a small amount of data is filled in a unit time, the increase in filling time will increase the open time of the physical block, thereby increasing the risk of data errors. Summary of the invention

[0005] In a first aspect, the present application provides a method for filling invalid data in a solid-state hard disk, which rationalizes the process of filling invalid data at the end of a physical block.

[0006] The technical solution of this application is as follows: A method for filling invalid data in a solid state drive is implemented based on the following invalid data filling speed model: ; In the formula, Indicates the filling speed of invalid data, Indicates the physical block open time threshold, t Indicates opening hours, K Indicates the upper limit of the filling speed of invalid data. Indicates the filling speed adjustment factor of invalid data, Indicates the filling speed increase adjustment factor of invalid data. Indicates the time when the most recent IO command was sent; Based on the above invalid data filling speed model, the method specifically includes the following steps: S1) Define parameters based on the user's invalid data filling speed requirements K、 、 ; S2) Record the time when the most recent IO command was sent as To continuously update ,At the same time, the flash translation layer continues to fill the physical blocks with invalid data according to the ,calculated invalid data filling speed.

[0007] Furthermore, the upper limit of the filling speed of invalid data is in the range of the maximum value of the solid state drive write processing speed (given a percentage range).

[0008] Furthermore, the filling speed adjustment factor of invalid data Need to meet: ; In the formula, Indicates the invalid data processing time of a word line, Indicates the maximum response time of an IO command.

[0009] Furthermore, the filling speed adjustment factor of invalid data Also need to meet: ; In the formula, The maximum time that the user requires to close BLK. Indicates what each BLK contains wl quantity.

[0010] Furthermore, the invalid data filling speed increase adjustment factor Need to meet: ; In the formula, Indicates the time it takes for the filling speed to increase from the minimum value to the maximum value. Indicates the minimum value of filling speed.

[0011] Furthermore, the invalid data filling speed increase adjustment factor Also need to meet: ; In the formula, Indicates the shortest time for the filling speed to increase from the minimum value to the maximum value.

[0012] In a second aspect, the present application provides a solid state drive invalid data filling device, characterized by comprising: Register: used to store invalid filling model; Timer: used to record the opening time of the physical block; Comparator: used to record the initiation time of the most recent IO command and compare it with the previously recorded t 0 compared to; Calculation unit: used to calculate the filling speed of invalid data.

[0013] Due to the adoption of the above technical solution, the beneficial effects of this application are as follows: 1. This application establishes an invalid data filling speed model in the form of an "S" curve, which fully considers the following three situations: 1) The current moment is far from the last IO command. In this case, it is assumed that the host will not send IO commands to the physical block for a long time in the future, so the filling speed is increased and the physical block is closed as soon as possible to ensure the security of the written data. This corresponds to the middle section of the curve.

[0014] 2) The time between the current moment and the last IO command is short. In this case, it is assumed that the host will still send IO commands to the physical block in the future, so the response time of the next IO command should be taken into consideration and the filling speed should be appropriately reduced. This corresponds to the front part of the curve.

[0015] 3) Due to the limitation of flash memory writing speed, the speed of filling invalid data has an upper limit. When it is close to the upper limit, the filling speed slows down to ensure the normal operation of the solid state drive. This corresponds to the latter part of the curve.

[0016] 2. This application provides the limit values ​​of the filling speed adjustment factor and the filling speed increase adjustment factor for invalid data, so that the filling speed can fully adapt to the actual filling process. For example, The value should not be too large. The value should ensure that after the physical block enters the invalid data filling process, it can also fill a certain amount of invalid data when frequent IO commands are sent. For another example, It should not be too large, as it needs to balance the filling speed and the response time of burst IO commands. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute improper limitations on the present application.

[0018] Figure 1 A flow chart of a method for filling invalid data in a solid state drive provided by the present application; Figure 2 This is a schematic diagram showing the change of invalid data filling speed with opening time in this application; Figure 3An architecture diagram of a solid state drive invalid data filling device provided in this application. DETAILED DESCRIPTION

[0019] Based on the background technology, the present application provides a method for filling invalid data in a solid state drive. The method is implemented based on the invalid data filling speed model established below: ; In the formula, Indicates the filling speed of invalid data, Indicates the physical block open time threshold, t Indicates opening hours, K Indicates the upper limit of the filling speed of invalid data. Indicates the filling speed adjustment factor of invalid data, Indicates the filling speed increase adjustment factor of invalid data. Indicates the time when the most recent IO command was sent; Based on the above invalid data filling speed model, the method specifically includes the following steps: S1) Define parameters based on the user's invalid data filling speed requirements K、 、 ; S2) Record the time when the most recent IO command was sent as To continuously update ,At the same time, the flash translation layer continues to fill the physical blocks with invalid data according to the ,calculated invalid data filling speed.

[0020] In the existing invalid data filling method, the filling speed does not fully match the processing speed of the SSD, which prolongs the open time of the physical block and increases the risk of data writing errors. On the other hand, it does not take into account the possible sudden IO commands during the invalid filling process.

[0021] As attached Figure 1 and attached Figure 2 As shown in Figure 1, when the physical block open time reaches the threshold, the invalid filling data operation is started, and the filling speed is implemented according to the invalid data filling speed model. When filling starts, the sending time of the most recent IO command before filling starts is recorded as , calculate the initial speed. After filling starts, the speed keeps changing. If an IO command is recorded again after filling starts, the sending time of this IO command is re-recorded as , recalculate the filling speed and continue filling according to the new calculation result, repeating this process until the physical block is filled. In this way, the more times the IO command is sent during the invalid data filling process, the slower the calculated initial filling speed will be, which matches the scenario of frequent IO commands.

[0022] It should be noted that in this application, the filling speed of invalid data can be determined according to the needs of the user, that is, the parameter is defined. K、 、 Sure.

[0023] parameter K The value should be as close as possible to the upper limit of the write processing speed of the solid-state drive to shorten the open time of the physical block.

[0024] parameter It can be determined by the maximum tolerable response time of the burst IO command. wl The invalid data processing time is , then at the minimum filling speed Fill a wl The time is .set up is the longest response time of the IO command, you need to , and then get In addition, the parameter α cannot be too large. It should ensure that as long as the physical block enters the invalid data filling process, a certain amount of invalid data can be filled in a unit time even if IO commands are issued frequently. Invalid data filling speed adjustment factor Also need to meet: ; In the formula, The maximum time that the user requires to close BLK. Indicates what each BLK contains wl quantity.

[0025] parameter It can be determined by the length of time it takes for the minimum speed to increase to the maximum speed. When there is no IO request for a long time, the time it takes for the filling speed to increase from the minimum value to the maximum value can be expressed as: ; In the formula, Indicates the length of time it takes for the filling speed to increase from the minimum value to the maximum value. Indicates the minimum value of charging speed. for ,but ,thereby In addition, the parameter It cannot be too large, otherwise the data filling speed will increase too fast and still cannot take into account the response time of the burst IO command. Therefore, the invalid data filling speed increase adjustment factor Also need to meet: ; In the formula, Indicates the shortest time for the filling speed to increase from the minimum value to the maximum value.

[0026] In step S1) of the present application, the invalid data filling speed requirement is determined by the user. The user can set the invalid data filling speed based on the expected upper limit, , The parameters determine the model.

[0027] Based on the above, this application has established an invalid data filling speed model in the form of an "S" curve, which fully considers the following three situations: 1) The current moment is a long time away from the last IO command. In this case, it is believed that the host will not send IO commands to the physical block for a long time in the future, so the filling speed is increased and the physical block is closed as soon as possible to ensure the security of the written data. Corresponding to the middle section of the curve. 2) The current moment is a short time away from the last IO command. In this case, it is believed that the host will still send IO commands to the physical block in the future, so the response time of the next IO command should be taken into account and the filling speed should be appropriately reduced. Corresponding to the front section of the curve. 3) Due to the limitation of the flash memory write speed, the filling speed of invalid data has an upper limit. When it is close to the speed upper limit, the filling speed slows down to ensure the normal operation of the solid-state drive. Corresponding to the back section of the curve.

[0028] In addition, the present application provides the limiting values ​​of the filling speed adjustment factor and the filling speed increase adjustment factor of invalid data, so that the filling speed can fully adapt to the actual filling process. The value should not be too large. The value should ensure that after the physical block enters the invalid data filling process, it can also fill a certain amount of invalid data when frequent IO commands are sent. For another example, It should not be too large, as it needs to balance the filling speed and the response time of burst IO commands.

[0029] As attached Figure 2 As shown, the filling speed calculation process needs to be updated The update method is to record the sending time of the most recent IO command as To continuously update ,At the same time, the flash translation layer continues to fill the physical blocks with invalid data according to the ,calculated invalid data filling speed.

[0030] The present application also provides a device for filling invalid data of a solid state drive according to claim 1, comprising: Register: used to store invalid filling model; Timer: used to record the opening time of the physical block; Comparator: used to record the initiation time of the most recent IO command and compare it with the previously recorded t0; Calculation unit: used to calculate the filling speed of invalid data.

[0031] Invalid data is filled through the filling module, which interacts with the flash translation (FTL) layer of the SSD. The FTL layer sends the initiation time of the last IO command to the filling module, and the filling module sends the filling speed to the FTL layer. The FTL layer configures invalid data parameters and sends them to the backend for invalid data filling.

[0032] Anything not described in this application can be achieved by adopting or drawing on existing technologies. The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A method for filling invalid data in a solid state drive, characterized in that: This method is implemented based on the invalid data filling speed model established below: ; In the formula, Indicates the filling speed of invalid data, Indicates the physical block open time threshold, t Indicates opening hours, K Indicates the upper limit of the filling speed of invalid data. Indicates the filling speed adjustment factor of invalid data, Indicates the filling speed increase adjustment factor of invalid data. Indicates the time when the most recent IO command was sent; Based on the above invalid data filling speed model, the method specifically includes the following steps: S1) Define parameters based on the user's invalid data filling speed requirements K、 、 ; S2) Record the time when the most recent IO command was sent as To continuously update ,At the same time, the flash translation layer continues to fill the physical blocks with invalid data according to the ,calculated invalid data filling speed.

2. A method for filling invalid data in a solid state hard disk according to claim 1, characterized in that: The upper limit of the invalid data filling speed is in the range of the maximum value of the solid-state drive write processing speed (given as a percentage range).

3. A method for filling invalid data in a solid state drive according to claim 1, characterized in that: Invalid data filling speed adjustment factor Need to meet: ; In the formula, Indicates the invalid data processing time of a word line, Indicates the maximum response time of an IO command.

4. A method for filling invalid data in a solid state hard disk according to claim 3, characterized in that: Invalid data filling speed adjustment factor Also need to meet: ; In the formula, The maximum time that the user requires to close BLK. Indicates what each BLK contains wl quantity.

5. A method for filling invalid data in a solid state hard disk according to claim 1, characterized in that: Invalid data filling speed increase adjustment factor Need to meet: ; In the formula, Indicates the time it takes for the filling speed to increase from the minimum value to the maximum value. Indicates the minimum value of the filling speed.

6. A method for filling invalid data in a solid state hard disk according to claim 5, characterized in that: Invalid data filling speed increase adjustment factor Also need to meet: ; In the formula, Indicates the shortest time for the filling speed to increase from the minimum value to the maximum value.

7. A device for filling invalid data of a solid state drive according to claim 1, characterized in that: include: Register: used to store invalid filling model; Timer: used to record the opening time of the physical block; Comparator: used to record the initiation time of the most recent IO command and compare it with the previously recorded t 0 compared to; Calculation unit: used to calculate the filling speed of invalid data.

Citation Information

Patent Citations

  • SSD Cache filling method and device

    CN104133642A

  • NAND FLASH data source block recovery method and solid state disk

    CN108509349A

  • Method and device for managing physical blocks in solid state disk

    CN108874309A

  • Variable regulation factor SOC droop control method of distributed energy storage system

    CN109687490A

  • Solid state disk testing method, device and equipment and storage medium

    CN115691634A

Cited By

  • Data guarantee method, device and equipment for physical block in open state and storage medium

    CN120631256A