A test method for efficiently verifying solid-state storage garbage collection

By designing the test load and verification mechanism, we ensure that the data to be verified is evenly distributed into the physical block of solid-state storage, solving the problem that the correctness of garbage collection operations cannot be effectively verified in the existing technology, and achieving efficient and accurate garbage collection verification .

CN114758716BActive Publication Date: 2025-02-11SHANDONG SINOCHIP SEMICON CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210393766.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-15
Publication Date
2025-02-11
Estimated Expiration
2042-04-15

AI Technical Summary

Technical Problem

The prior art is difficult to effectively verify the correctness of solid-state storage garbage collection operations, especially during the data transfer process. It is impossible to ensure that all data to be tested has performed physical block transfer operations, and it is impossible to verify the correctness of all physical block transfers.

Method used

By entering the amount of logical block data to be verified by the user, calculate the number of physical blocks used in the logical capacity, and design the test load, including full-disk sequential write operations and random write operations, record and verify LBA data information, and ensure that all data to be verified is uniform Distribute to the maximum number of physical blocks, trigger the garbage collection operation, and perform data verification.

Benefits of technology

It improves the efficiency and quality of verification of garbage collection operations, ensures that all data to be tested is evenly distributed into the physical block, triggers the garbage collection operation, and realizes the correctness verification of all physical block transfers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114758716B_ABST
    Figure CN114758716B_ABST
Patent Text Reader

Abstract

The present invention provides a test method for efficiently verifying solid-state storage garbage collection, which is used to further improve the efficiency and verification range of solid-state storage data verification. Before performing data verification, based on the physical capacity, logical capacity and user data amount to be verified of the solid-state storage, the LBA sample set that needs to perform data verification is calculated. After all physical blocks perform at least one erase operation, all LBA associated data in the sample set are verified to ensure that data verification is completed for all blocks involved in data migration. By studying the principle of garbage collection and cleverly designing test loads and steps, the present invention greatly improves the efficiency and quality of verifying garbage collection and realizes efficient verification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a testing method for efficiently verifying solid-state storage garbage collection, and belongs to the technical field of solid-state storage. Background Art

[0002] For solid-state storage, due to the "Erase-Before-Write" feature of its storage medium, invalid data cannot be deleted immediately. After all areas of the physical block (Block) are filled, the valid data in it needs to be read out and stored in other blank blocks, and then the original block is erased, thereby deleting the invalid data. This operation is also called "garbage collection" (GC). Because the garbage collection operation involves data movement, if there is an abnormality in the data movement, it will cause user data to be tampered with or lost. Therefore, it is necessary to perform targeted tests on user data that has changed its physical location. The FIO tool in the current Linux system supports data verification. The specific method is to perform a read verification operation on the written data after each specified amount of data is written. Since the amount of data that can be specified is small, the verified data usually has not yet been moved inside the solid-state storage, so the correctness of the garbage collection operation cannot be effectively verified. It is also possible to pre-set a specified number of data to be verified and record its corresponding logical block address (LBA). After completing a long random write operation, the correctness of the data to be verified can be verified. This testing method cannot guarantee whether all the data to be tested have been subjected to physical block migration operations, nor can it verify the correctness of all physical block migrations. Summary of the invention

[0003] The purpose of the present invention is to provide a test method for efficiently verifying solid-state storage garbage collection. By studying the garbage collection principle and cleverly designing the test load and steps, the efficiency and quality of verifying garbage collection are greatly improved, and efficient verification is achieved.

[0004] In order to achieve the above object, the present invention is implemented through the following technical solutions:

[0005] 1) The user enters the amount of data in the logic block to be verified , calculate the number of physical blocks used by the logical capacity ; The specific formula is as follows:

[0006] ;

[0007] 2) Calculate the amount of data to be verified that each physical block needs to store , the calculation formula is as follows:

[0008] ;

[0009] 3) Calculate the LBA sample set of the data to be verified ,in The LBA range included is ;

[0010] 4) Perform a full disk sequential write operation, write all LBAs in order, and record the process Data information associated with LBA;

[0011] 5) Perform random write operations. All LBAs except the 4 LBAs perform random write operations, and the amount of data written is ;

[0012] 6) Determine whether the amount of written data reaches twice the physical capacity. If yes, return to step 5). If yes, verify the correctness of all LBA data in the sample set.

[0013] 7) Yes Perform read operations on all LBAs in the test to verify the correctness of the read data: if all verifications are successful, the test passes; if there is data that fails verification, the test fails.

[0014] Preferably, the user inputs the amount of data of the logic block to be verified Greater than .

[0015] Preferably, in step 3) The calculation formula is as follows:

[0016] ,

[0017] ,

[0018] Where: i is the LBA sample set The sample index in .

[0019] The advantages of the present invention are:

[0020] 1) According to the garbage collection principle, reasonably create a sample set of data to be verified to ensure that all data to be verified are evenly distributed to the maximum number of physical blocks to improve test coverage.

[0021] 2) Most of them are write operations, which shortens the time to trigger the garbage collection function; at the same time, it clarifies the amount of data that needs to be written to trigger garbage collection in the physical blocks where all the data to be verified is located, further improving test efficiency and accuracy.

[0022] In summary, the present invention greatly improves the efficiency and quality of verifying garbage collection and realizes efficient verification by studying the garbage collection principle and cleverly designing the test load and steps. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] 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.

[0024] Figure 1 It is a schematic diagram of the solid-state storage garbage collection test flow chart of the present invention. DETAILED DESCRIPTION

[0025] 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.

[0026] In solid-state storage, physical capacity Usually larger than the logical capacity , remaining capacity As reserved space, it is used to store valid data that is moved during garbage collection. After the user formats the solid-state storage into a specific data format type, the logical block is used as the minimum data unit to manage the logical capacity, and the logical block address (LBA) is used as the user data index; the logical block capacity is , the number is ,therefore It can be calculated by the following formula

[0027] (Formula-1)

[0028] Solid-state physical media uses physical blocks as the minimum erase unit. The number of physical blocks used to store user data is , the number of logical blocks contained in each physical block is ,therefore It can be calculated by the following formula

[0029] (Formula-2)

[0030] From the above information, it can be determined The number of physical blocks occupied , the calculation formula is as follows

[0031] (Formula-3)

[0032] The data verification scheme for solid-state storage garbage collection operations is as follows:

[0033] 1) Calculate according to formula-3 The number of physical blocks occupied ;

[0034] 2) The user enters the amount of data in the logic block to be verified , should ensure Greater than ;

[0035] 3) Calculate according to formula-4 The amount of data to be verified that each physical block in the physical block needs to store ;

[0036] (Formula-4)

[0037] 4) Calculate the LBA sample set of the data to be verified according to Formula-5 and Formula-6 ;

[0038] (Formula-5)

[0039] (Formula-6)

[0040] 5) Perform a full disk sequential write operation, that is, perform a write operation on all LBAs in sequence, and record the process Data information associated with LBA;

[0041] 6) Perform random write operations. All LBAs except the 4 LBAs perform random write operations, and the amount of data written is ;

[0042] 7) Yes Perform read operations on all LBAs in the test to verify the correctness of the read data: if all verifications are successful, the test passes; if there is data that fails verification, the test fails.

Claims

1. A test method for efficiently verifying solid-state storage garbage collection, characterized in that: The following steps are involved: 1) The user enters the amount of data in the logic block to be verified , calculate the number of physical blocks used by the logical capacity ; The specific formula is as follows: ; in, is the number of logic blocks, The number of logical blocks contained in each physical block; 2) Calculate the amount of data to be verified that each physical block needs to store , the calculation formula is as follows: ; 3) Calculate the LBA sample set of the data to be verified ,in The LBA range included is ; The calculation formula is as follows: , , Where: i is the LBA sample set The sample index in ; 4) Perform a full disk sequential write operation, write all LBAs in order, and record the process Data information associated with LBA; 5) Perform random write operations. All LBAs except the 4 LBAs perform random write operations, and the amount of data written is ; 6) Determine whether the amount of written data reaches twice the physical capacity. If yes, return to step 5). If yes, verify the correctness of all LBA data in the sample set. 7) Yes Perform read operations on all LBAs in the test to verify the correctness of the read data: if all verifications are successful, the test passes; if there is data that fails verification, the test fails.

2. The test method for efficiently verifying solid-state storage garbage collection according to claim 1, characterized in that: The user inputs the amount of data in the logic block to be verified Greater than .

Citation Information

Patent Citations

  • Method and device for testing state solid disk (SSD)

    CN102411993A

  • Method and system for online program / erase count estimation

    CN108268339A