Read interference function test method and device, readable storage medium and electronic equipment
By using the query interface to obtain the configuration information and physical block status of the solid-state drive, the problem of low efficiency of read interference function testing in the prior art and inability to accurately observe data refresh is solved, and efficient and reliable read interference function testing is achieved.
Patent Information
- Application Number
- CN202510082252.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-01-20
AI Technical Summary
The prior art is inefficient when testing the read interference function of a solid-state drive and cannot accurately observe whether the data is refreshed when the read count of the block exceeds the read interference threshold.
By receiving the read interference function test request of the solid-state drive to be tested, the configuration information and the read count, threshold and status of the physical block are obtained using the query interface, and the test results are determined based on this information, so as to achieve efficient and reliable read interference function test.
Improves the efficiency and effectiveness of read interference function testing, ensures the reliability and transparency of test results, and shortens the test cycle without actually performing multiple read operations.
Smart Images

Figure CN120048326A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of solid state hard disk testing, and in particular to a read disturbance function testing method, device, readable storage medium and electronic equipment. Background Art
[0002] RDB (Read Disturb) is read disturbance. When Nand (flash memory) reads a Page, it will interfere with the adjacent Page. As the number of reads increases, it will eventually cause bit flipping. If the firmware does not handle the read disturbance, when the bit flip exceeds the error correction capability of the SSD (Solid State Disk or Solid State Drive), it will cause data inconsistency. Therefore, the current SSD firmware basically implements the Read Disturb function. The firmware will continuously monitor the reading of the physical blocks on the SSD disk, and set a Read Disturb threshold based on factors such as the quality of the Nand particles used by the SSD and the current number of Nand erases and writes. After the number of reads of the Block reaches the RDB threshold, the data on the Block will be refreshed to prevent data loss due to read disturbance.
[0003] The current mainstream approach to black box testing of read disturbance functions is as follows: 1. Write a certain amount of first test data to the test disk (e.g. 30%, 50%, 100% of the disk); 2. Repeatedly read two different areas of the disk, such as reading 5%-10% first, then reading 20%-30%, and repeating this for a certain number of times. The number of repetitions is generally set according to the firmware RDB threshold and acceptance criteria. For example, if the SSD under test is a TLC Nand, the RDB threshold of the TLC Block is 4 million times. According to the standard that the tested disk is fault-free after continuously triggering Read Disturb for more than 20 times, the number of cycles can be set to 100 million times. 3. Read the written data in step 1 again and check the data consistency.
[0004] The above test method has two obvious disadvantages: 1) It takes a long time to test and the test efficiency is too low; 2) It is impossible to accurately observe whether the data on the block is refreshed when the read count of the block exceeds the RDB threshold. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a read disturbance function test method, device, readable storage medium and electronic equipment, which can improve the efficiency and effectiveness of the read disturbance function test.
[0006] To solve the above technical problems, a technical solution adopted by the present invention is as follows: A read interference function test method, comprising the steps of: Receiving a read interference function test request of a solid state drive to be tested, the read interference function test request including a read interference function basic test request; According to the read interference function basic test request, using a query interface to obtain configuration information of the solid state drive to be tested, and after sequentially writing first test data to the solid state drive to be tested according to the configuration information, using the query interface to obtain a physically full block; Using the query interface to obtain a first read count, a first read interference threshold, and a first block status of the physical block, and using a setting interface to set the first read count based on the first read interference threshold; Sequentially reading the first test data, and using the query interface to obtain a second read count and a second block status of the physical block; Determining a first test result corresponding to the read interference function basic test request based on the first read interference threshold, the second read count, the first block status, and the second block status.
[0007] To solve the above technical problems, another technical solution adopted by the present invention is as follows: A read interference function test device, comprising: A request receiving module, configured to receive a read interference function test request of a solid state drive to be tested, the read interference function test request including a read interference function basic test request; A data writing module, configured to use a query interface to obtain configuration information of the solid state drive to be tested according to the read interference function basic test request, and after sequentially writing first test data to the solid state drive to be tested according to the configuration information, use the query interface to obtain a physically full block; A data setting module, configured to use the query interface to obtain a first read count, a first read interference threshold, and a first block status of the physical block, and use a setting interface to set the first read count based on the first read interference threshold; A data reading module, configured to sequentially read the first test data, and use the query interface to obtain a second read count and a second block status of the physical block; A test result determining module, configured to determine a first test result corresponding to the read interference function basic test request based on the first read interference threshold, the second read count, the first block status, and the second block status.
[0008] To solve the above technical problems, another technical solution adopted by the present invention is as follows: A computer-readable storage medium stores a computer program thereon, and when the computer program is executed by a processor, each step in the above read interference function test method is implemented.
[0009] To solve the above technical problems, another technical solution adopted by the present invention is: An electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, each step in the above read interference function test method is implemented.
[0010] The beneficial effects of the present invention are as follows: After receiving the basic test request for the read interference function of the solid-state drive to be tested, the configuration information of the solid-state drive to be tested is obtained using the query interface. After sequentially writing the first test data to the solid-state drive to be tested according to the configuration information, a physical block that has been written full is obtained using the query interface, the first read count, the first read interference threshold, and the first block status of the physical block are obtained using the query interface, and the first read count is set based on the first read interference threshold using the setting interface. The first test data is sequentially read, and the second read count and the second block status of the physical block are obtained using the query interface. The first test result is determined based on the first read interference threshold, the second read count, the first block status, and the second block status. The present invention can directly and accurately obtain the information required for testing using the query interface, and can flexibly set the current read count using the setting interface, without actually performing multiple read operations, shortening the test cycle, thereby realizing efficient and reliable basic testing of the read interference function; and when determining the test result, it is not just verifying the data consistency as in the prior art, but is determined based on the first read interference threshold, the second read count, the first block status, and the second block status obtained using the query interface, making the test result more reliable and making the test process more transparent, thus improving the efficiency and effectiveness of the read interference function test. Description of the Drawings
[0011] Figure 1 It is a flowchart of the steps of a read interference function test method according to an embodiment of the present invention; Figure 2 It is a schematic structural diagram of a read interference function test device according to an embodiment of the present invention; Figure 3 It is a schematic structural diagram of an electronic device according to an embodiment of the present invention; Figure 4 It is a flowchart of the basic read interference function test in the read interference function test method according to an embodiment of the present invention; Figure 5 It is a flowchart of the test of the change of the read interference threshold with the number of erasure times in the read interference function test method according to an embodiment of the present invention; Figure 6It is a test flow chart of the interaction between the read interference function and other functional modules in the read interference function test method of the embodiment of the present invention; Figure 7 It is a test flow chart of triggering the read interference function when there is insufficient remaining blank blocks in the read interference function test method of the embodiment of the present invention; Figure 8 It is a test flow chart of UNC occurring when the read count reaches the read interference threshold in the read interference function test method of the embodiment of the present invention. Specific implementation mode
[0012] To illustrate the technical content, achieved purpose and effect of the present invention in detail, the following is described in combination with the implementation mode and accompanied by the drawings.
[0013] Please refer to Figure 1 , a read interference function test method, including the steps: Receive a read interference function test request for the solid state drive to be tested, and the read interference function test request includes a read interference function basic test request; According to the read interference function basic test request, use the query interface to obtain the configuration information of the solid state drive to be tested, and after sequentially writing the first test data to the solid state drive to be tested according to the configuration information, use the query interface to obtain a physically full block; Use the query interface to obtain the first read count, the first read interference threshold and the first block status of the physical block, and use the setting interface to set the first read count based on the first read interference threshold; Sequentially read the first test data, and use the query interface to obtain the second read count and the second block status of the physical block; Determine the first test result corresponding to the read interference function basic test request based on the first read interference threshold, the second read count, the first block status and the second block status.
[0014] As can be seen from the above description, the beneficial effects of the present invention are as follows: after receiving a basic test request for the read interference function of the solid state drive to be tested, the configuration information of the solid state drive to be tested is obtained using the query interface, and after sequentially writing the first test data to the solid state drive to be tested according to the configuration information, a full-written physical block is obtained using the query interface, the first read count, the first read interference threshold, and the first block status of the physical block are obtained using the query interface, the first read count is set based on the first read interference threshold using the setting interface, the first test data is sequentially read, the second read count and the second block status of the physical block are obtained using the query interface, and the first test result is determined based on the first read interference threshold, the second read count, the first block status, and the second block status. The present invention can directly and accurately obtain the information required for testing using the query interface, and can flexibly set the current read count using the setting interface, without actually performing multiple read operations, shortening the test cycle, thereby achieving an efficient and reliable basic test for the read interference function; and when determining the test result, it is not just verifying the data consistency as in the prior art, but is determined based on the first read interference threshold, the second read count, the first block status, and the second block status obtained using the query interface, the test result is more reliable, and the test process is made more transparent, thus improving the efficiency and effectiveness of the read interference function test.
[0015] Further, the configuration information includes a mode; The sequentially writing the first test data to the solid state drive to be tested according to the configuration information includes: If the mode is the SLC mode, then sequentially write the first test data of a first preset data volume to the solid state drive to be tested; If the mode is the TLC mode, then sequentially write the first test data of a second preset data volume to the solid state drive to be tested; If the mode is a hybrid mode of TLC and SLC, then sequentially write the first test data of a third preset data volume to the solid state drive to be tested as the preset data write volume when testing the SLC physical block, and sequentially write the first test data of a fourth preset data volume to the solid state drive to be tested as the preset data write volume when testing the TLC physical block, wherein the third preset data volume is determined based on the superblock size, and the fourth preset data volume size is determined based on the SLC cache size.
[0016] As described above, when the SSD under test is a pure SLC or TLC solution, no matter how much data is written, it will only be written to the physical blocks of SLC / TLC. However, when the SSD is in the SLC cache + TLC (i.e., the hybrid mode of TLC and SLC) mode, since some physical blocks of TLC are used as SLC mode (SLC cache), when the host writes data within the SLC cache, the data will be written to the physical blocks of SLC. When the host writes data exceeding the size of the SLC cache, the data will be written to the physical blocks of TLC. Therefore, by first querying the mode of the SSD under test and then accurately writing data according to the size of the SLC cache, the physical block where the written data falls can be stably controlled, whether it is SLC or TLC, which is convenient for separately testing the Read Disturb process of SLC and TLC physical blocks, thus making the test more realistic and reliable.
[0017] Further, the obtaining a fully written physical block by using the query interface includes: If the first test data written sequentially is the first preset data volume, use the query interface to obtain the physical block with the logical block address offset being the first offset, and use the physical block with the logical block address offset being the first offset as the fully written physical block of SLC; If the first test data written sequentially is the second preset data volume, use the query interface to obtain the physical block with the logical block address offset being the second offset, and use the physical block with the logical block address offset being the second offset as the fully written physical block of TLC; If the first test data written sequentially is the third preset data volume, use the query interface to obtain the physical block with the logical block address offset being the third offset, and use the physical block with the logical block address offset being the third offset as the fully written physical block of SLC; If the first test data written sequentially is the fourth preset data volume, use the query interface to obtain the physical block with the logical block address offset being the fourth offset, and use the physical block with the logical block address offset being the fourth offset as the fully written physical block of TLC.
[0018] As described above, the capacities of storage units in different modes are different. Therefore, when obtaining a fully written physical block by using the query interface, different methods are adopted according to the different data volumes of the test data written sequentially, that is, the different modes of the SSD under test, to ensure that the fully written physical block is accurately obtained, which can ensure that the subsequent test results are more accurate.
[0019] Further, the determination of the first test result corresponding to the read interference function basic test request based on the first read interference threshold, the second read count, the first block state, and the second block state includes: If the second read count does not exceed the first read interference threshold, determine whether the first block state is consistent with the second block state. If they are consistent, determine that the first test result corresponding to the read interference function basic test request is a pass. If they are not consistent, determine that the first test result corresponding to the read interference function basic test request is a fail; If the second read count exceeds the first read interference threshold, determine whether the second block state is different from the first block state and the second block state is that data is being refreshed or data has been refreshed. If so, determine that the first test result corresponding to the read interference function basic test request is a pass. If not, determine that the first test result corresponding to the read interference function basic test request is a fail.
[0020] As can be seen from the above description, the purpose of the read interference function basic test is to verify the data refresh situation on the block when the read count of the block does not reach or reaches the read interference threshold. When the read count of the full-written data block / entry block does not reach the read interference threshold, the data on the block will not be refreshed. When the read count of the full-written or not-full-written data block / entry block is greater than or equal to the read interference threshold, a data refresh mark will be set on the block, and the data on the block will be refreshed when the subsequent garbage collection (GC) function is started. Therefore, when determining the first test result, first judge whether the second read count exceeds the first read interference threshold, and then compare the first block state and the second block state. The first test result determined in this way can effectively verify whether the basic business logic of the read interference threshold is normal.
[0021] Further, the read interference function test request further includes a test request for the change of the read interference threshold with the number of erasures; It further includes: According to the test request for the change of the read interference threshold with the number of erasures, use the query interface to obtain the average number of erasures of the solid state drive to be tested as the initial average number of erasures, and completely erase the user data of the solid state drive to be tested; After writing the second test data to the solid state drive to be tested, use the query interface to obtain a full-written physical block, and use the query interface to obtain the third block state of the physical block; Use the query interface to obtain the second read interference threshold of the physical block, and use the setting interface to set the average number of erasures to a preset number of erasures; Use the query interface to obtain the third read interference threshold of the physical block, and use the setting interface to set the read count of the physical block according to the third read interference threshold; Read the second test data, and verify the data consistency between the read second test data and the written second test data to obtain a data consistency result; Use the query interface to obtain the fourth block status of the physical block, and use the setting interface to set the average number of erasures to the initial average number of erasures; Return the total number of times of executing the step of completely erasing the user data of the solid state drive to be tested until the number of executions reaches the preset number of erasure times, and each time the step of using the setting interface to set the average number of erasures to the preset number of erasure times is executed, the preset number of erasure times are all different. The preset number of erasure times includes a first preset number of erasure times, a second preset number of erasure times, and a third preset number of erasure times that increase in sequence; Based on the preset number of erasure times, the second read interference threshold, the third read interference threshold, the data consistency result, the third block status, and the fourth block status, determine a second test result corresponding to the test request for the change of the read interference threshold with the number of erasure times.
[0022] As can be seen from the above description, the read interference function test request also includes a test request for the change of the read interference threshold with the number of erasure times. Since the data retention ability of the flash memory particles of the solid state drive will decline to a certain extent as the number of erasure times increases, different values should be set for the read interference threshold in the initial, middle, and late stages of the flash memory life. Therefore, by using the setting interface to set the average number of erasures to the preset number of erasure times, the preset number of erasure times includes a first preset number of erasure times, a second preset number of erasure times, and a third preset number of erasure times that increase in sequence, which corresponds to the initial, middle, and late stages of the flash memory life. And before entering the next test scenario, use the setting interface to set the average number of erasures to the initial average number of erasures, which can simply and effectively restore the life state of the flash memory particles to the initial state for the test of the next scenario, so as to quickly and accurately construct the test scenarios for the initial, middle, and late stages of the flash memory life, in order to achieve a further test of the read interference function.
[0023] Further, the determining the second test result corresponding to the test request for the change of the read interference threshold with the number of erasure times based on the preset number of erasure times, the second read interference threshold, the third read interference threshold, the data consistency result, the third block status, and the fourth block status includes: If the preset number of erasure times is the first preset number of erasure times, determine whether the third read interference threshold is the same as the second read interference threshold. If they are not the same, determine that the second test result corresponding to the test request for the read interference threshold varying with the number of erasure times is a failed test. If they are the same, determine whether the data consistency result is data-consistent and whether the third block status is different from the fourth block status. If both conditions are met, determine that the second test result corresponding to the test request for the read interference threshold varying with the number of erasure times is a passed test; otherwise, determine that the second test result corresponding to the test request for the read interference threshold varying with the number of erasure times is a failed test. If the preset number of erasure times is the second preset number of erasure times or the third preset number of erasure times, determine whether the third read interference threshold is the same as the second read interference threshold. If they are the same, determine that the second test result corresponding to the test request for the read interference threshold varying with the number of erasure times is a failed test. If they are not the same, determine whether the third read interference threshold when the preset number of erasure times is the second preset number of erasure times is less than the third read interference threshold when the preset number of erasure times is the third preset number of erasure times. If it is not less, determine that the second test result corresponding to the test request for the read interference threshold varying with the number of erasure times is a failed test. If it is less, determine whether the data consistency result is data-consistent and whether the third block status is different from the fourth block status. If both conditions are met, determine that the second test result corresponding to the test request for the read interference threshold varying with the number of erasure times is a passed test; otherwise, determine that the second test result corresponding to the test request for the read interference threshold varying with the number of erasure times is a failed test.
[0024] As can be seen from the above description, at different stages of the flash memory lifespan, that is, for different values of the number of erasure times, the read interference threshold should change accordingly. Therefore, first determine the preset number of erasure times, then compare whether the two obtained read interference thresholds are the same based on the value of the preset number of erasure times. Additionally, judge the data consistency result and the two obtained block statuses, so as to determine that the second test result accurately reflects the normal or abnormal read interference function at different lifespan stages of the flash memory based on the preset number of erasure times, the second read interference threshold, the third read interference threshold, the data consistency result, the third block status, and the fourth block status.
[0025] Furthermore, the read interference function test request further includes a test request for the interaction between the read interference function and other functional modules; It further includes: Obtain the configuration information of the solid state drive to be tested using the query interface according to the test request for the interaction between the read interference function and other functional modules, and after sequentially writing third test data to the solid state drive to be tested according to the configuration information, use the query interface to obtain a physically full block; Use the query interface to obtain the third read count, the fourth read interference threshold, and the fifth block status of the physical block, and use the setting interface to set the third read count based on the fourth read interference threshold; Sequentially read the third test data, and during the sequential reading process, use the query interface to obtain the third read count of the physical block every preset time interval, and determine whether the third read count exceeds the fourth read interference threshold. If so, perform the operations of other functional modules on the solid state drive to be tested; Use the query interface to obtain the sixth block status of the physical block, and perform data consistency verification on the third test data read sequentially and the third test data written sequentially to obtain a consistency verification result; Determine the third test result corresponding to the test request for the interaction between the read interference function and other functional modules based on the fifth block status, the sixth block status, and the consistency verification result.
[0026] As can be seen from the above description, the present invention also tests the interaction between the read interference function and other functional modules. Use the setting interface to set the third read count based on the fourth read interference threshold, sequentially read the third test data, and use the query interface to obtain the third read count of the physical block every preset time interval during the sequential reading process, and determine whether the third read count exceeds the fourth read interference threshold. If so, perform the operations of other functional modules on the solid state drive to be tested, thereby constructing a test scenario where there are other firmware service processes being processed exactly when the read interference function is triggered, verifying whether various tasks can run normally in this case, whether the data on the block that triggers the read interference function can be normally refreshed, and whether the host read will not result in data inconsistency. The interaction test between the read interference function and other functional modules can be achieved by using the query interface and the setting interface, which simply and effectively improves the test coverage.
[0027] Further, the determining the third test result corresponding to the test request for the interaction between the read interference function and other functional modules based on the fifth block status, the sixth block status, and the consistency verification result includes: Determine whether the fifth block status is different from the sixth block status. If not, determine that the third test result corresponding to the test request for the interaction between the read interference function and other functional modules is a test failure. If so, determine whether the consistency verification result is data consistent. If it is data consistent, determine that the third test result corresponding to the test request for the interaction between the read interference function and other functional modules is a test pass. If it is data inconsistent, determine that the third test result corresponding to the test request for the interaction between the read interference function and other functional modules is a test failure.
[0028] As described above, if the state of the block changes after the host reads and triggers the read interference function, and operations of other functional modules are performed during the block data refresh process, and the data consistency check result is that the data is consistent, it indicates that each task can run normally. At this time, it is considered that the test passes, and an effective test for the interaction between the read interference function and other functional modules is achieved.
[0029] Further, the read interference function test request further includes a test request for triggering the read interference function when there are insufficient remaining blank blocks; It also includes: Erase the user data of the solid state drive under test according to the test request for triggering the read interference function when there are insufficient remaining blank blocks; Use the query interface to obtain the threshold value of insufficient remaining blank blocks of the solid state drive under test; Sequentially write the fourth test data to the entire disk of the solid state drive under test; Use the query interface to obtain the first bad block count and the first remaining blank block count of the solid state drive under test; Write the fifth test data of the fifth preset data volume to the solid state drive under test, and use the query interface to obtain the physical address of the last logical block address of the written data; Determine the positions of the first preset number of pages after the physical address as the target physical address, and after injecting a programming error at the target physical address using the error injection interface, continue to write the fifth test data of the fifth preset data volume to the solid state drive under test; Use the query interface to obtain the second bad block count and the second remaining blank block count of the solid state drive under test; Judge whether the second bad block count increases by one according to the first bad block count, and judge whether the second remaining blank block count decreases by one according to the first remaining blank block count. If both are true, return to execute the step of using the query interface to obtain the first bad block count and the first remaining blank block count of the solid state drive under test until the second remaining blank block count of the solid state drive under test is lower than the threshold value of insufficient remaining blank blocks; Use the query interface to obtain the physical address of the last logical block address of the written data in the solid state drive under test; If the block state of the target block of the physical address of the last logical block address of the written data is valid, use the setting interface to set the read count of the target block according to the read interference threshold of the target block; Read the logical block address of the target block; Send a non-data management command to the solid state drive under test; Determine whether a read error occurs when reading the logical block address of the target block, and whether the SSD under test can execute the non-data management command. If both are true, determine that the fourth test result corresponding to the test request for triggering the read interference function when the remaining blank blocks are insufficient is a pass; otherwise, determine that the fourth test result corresponding to the test request for triggering the read interference function when the remaining blank blocks are insufficient is a fail.
[0030] As can be seen from the above description, the read interference function test request also includes a test request for triggering the read interference function when the remaining blank blocks are insufficient. This is mainly considered because when the remaining blank blocks of the SSD are insufficient, the disk will enter a write protection state. At this time, neither the data writing of the host nor the internal writing of the disk, such as garbage collection, is allowed. However, the host's read operation on the disk is still allowed at this time. Then there will be such a situation: after the test disk enters the write protection state due to insufficient remaining blank blocks at the end of its life, the host's read operation triggers the read interference function. At this time, the data refresh process cannot proceed, and it is necessary to verify whether the test disk will hang. Therefore, a test scenario for triggering the read interference function when the remaining blank blocks are insufficient is constructed through the query interface, the setting interface, and the error injection interface, effectively verifying whether the read interference function is normal in this test scenario.
[0031] Further, the read interference function test request also includes a test request for an unrecoverable read error when the read count reaches the read interference threshold; It also includes: According to the test request for an unrecoverable read error when the read count reaches the read interference threshold, use the query interface to obtain the configuration information of the SSD under test, and after sequentially writing the sixth test data to the SSD under test according to the configuration information, use the query interface to obtain a physically full block; Use the query interface to obtain the fourth read count, the fifth read interference threshold, the seventh block status, the first unrecoverable read error count, and the third bad block count of the physical block, and use the setting interface to set the fourth read count based on the fifth read interference threshold; Use the error injection interface to inject an unrecoverable read error into the physical block; Sequentially read the sixth test data, and use the query interface to obtain the fifth read count, the eighth block status, the second unrecoverable read error count, and the fourth bad block count of the physical block; Determine whether the fifth read count reaches the fifth read interference threshold. If so, determine whether the state of the eighth block has changed according to the state of the seventh block. If it has not changed, determine that the fifth test result corresponding to the test request for an unrecoverable read error when the read count reaches the read interference threshold is a failed test. If it has changed, determine whether the second unrecoverable read error count and the fourth bad block count increase according to the first unrecoverable read error count and the third bad block count. If both increase, determine that the fifth test result corresponding to the test request for an unrecoverable read error when the read count reaches the read interference threshold is a passed test. Otherwise, determine that the fifth test result corresponding to the test request for an unrecoverable read error when the read count reaches the read interference threshold is a failed test.
[0032] As can be seen from the above description, the read interference function test request further includes a test request for an unrecoverable read error when the read count reaches the read interference threshold. Considering that when the host continuously reads a block until the read count of the block exceeds the read interference threshold and the firmware is about to refresh the data of this block, an unrecoverable read error has occurred in this block. At this time, whether the firmware can perform abnormal processing normally, rather than the process being unable to continue or other abnormalities occurring. Therefore, the error injection interface can accurately and effectively inject unrecoverable read errors, and then cooperate with the query interface and the setting interface to achieve the test that an unrecoverable read error just occurs when the read count of the block reaches the read interference threshold, improving the coverage of the read interference function test and ensuring that the read interference function can operate stably under various conditions.
[0033] Please refer to Figure 2 , another embodiment of the present invention provides a read interference function test device, including: A request receiving module, configured to receive a read interference function test request of a solid state drive to be tested, where the read interference function test request includes a read interference function basic test request; A data writing module, configured to obtain the configuration information of the solid state drive to be tested using the query interface according to the read interference function basic test request, and after sequentially writing first test data to the solid state drive to be tested according to the configuration information, obtain a physically full block using the query interface; A data setting module, configured to obtain the first read count, the first read interference threshold, and the first block state of the physical block using the query interface, and set the first read count based on the first read interference threshold using the setting interface; A data reading module, configured to sequentially read the first test data, and obtain the second read count and the second block state of the physical block using the query interface; A test result determination module, configured to determine a first test result corresponding to the read interference function basic test request based on the first read interference threshold, the second read count, the first block status, and the second block status.
[0034] Another embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, each step in the above read interference function test method is implemented.
[0035] Please refer to Figure 3 , another embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, each step in the above read interference function test method is implemented.
[0036] The above read interference function test method, device, readable storage medium, and electronic device of the present invention can be applied to different types of SSDs, including SATA SSDs, NVMe SSDs, etc. The following is illustrated through specific embodiments: Please refer to Figure 1 , Figures 4 - 8 , Embodiment 1 of the present invention is: A read interference function test method, including the steps of: S1. Receive a read interference function test request for the solid-state drive to be tested. The read interference function test request includes a read interference function basic test request, a test request for the change of the read interference threshold with the number of erasure times, a test request for the interaction between the read interference function and other functional modules, a test request for triggering the read interference function when the remaining blank blocks are insufficient, and a test request for an unrecoverable read error (UNC) when the read count reaches the read interference threshold.
[0037] In an optional embodiment, before S1, it further includes: S0. Check the test environment and receive information that the solid-state drive to be tested has been inserted into the test host as a data disk and has been normally recognized by the operating system of the test host.
[0038] The query interface, setting interface, and error injection interface used in the present invention are all firmware internal interfaces.
[0039] Among them, the query interface includes a solid-state drive configuration information query interface, a Vendor Smart information query interface, a physical address query interface, and a block information query interface. The setting interface includes a block information setting interface and an average erasure count setting interface. The error injection interface includes a UNC injection interface and a Program Fail (programming error) injection interface.
[0040] The detailed descriptions of each interface are as follows: The SSD configuration information query interface: There are no fixed input parameters for calling this interface. The interface will return the configuration information of the test disk, which includes mode, threshold for insufficient remaining blank blocks, super block size (SPB Size, Super Block Size), page size, number of super blocks, block size, number of blocks, number of pages, and SLC cache (SLC cache) size, etc.
[0041] The Vendor Smart information query interface: There are no fixed input parameters for this interface. The interface returns the Vendor Smart information of the test disk, which includes online UNC count (count of UNC triggered by the test host read), offline UNC count (count of UNC triggered by internal disk read), bad block count, number of remaining blank blocks, and total / max / min / avg erase counts of SLC and TLC Blocks, etc.
[0042] The physical address query interface: Specifying an LBA (Logical Block Address) as an input parameter is required for calling this interface. The interface returns the physical address of the Block in the Data / Table area corresponding to this LBA.
[0043] The block information query interface: Specifying a Block ID (block identifier) as an input parameter is required for calling this interface. The interface returns information such as the read count, read interference threshold, and block status of this Block.
[0044] The block information setting interface: Specifying a Block ID and the value to be set as input parameters is required for calling this interface, which is used to set the read count and / or erase count, etc. of this Block.
[0045] The average erase count (AVG Erase Count) setting interface: Specifying an AVGErase Count value as an input parameter is required for calling this interface, which can set the erase counts of all Blocks of the SSD to this value.
[0046] The UNC injection interface: Specifying a physical address as an input parameter is required for calling this interface, which is used to inject a UNC to this address.
[0047] The Program Fail injection interface: Specifying a physical address as an input parameter is required for calling this interface, which is used to inject a Program Fail to this address.
[0048] S2. Use the query interface to obtain the configuration information of the solid state drive under test according to the basic read interference function test request, and after sequentially writing the first test data to the solid state drive under test according to the configuration information, use the query interface to obtain a physically full block, as Figure 4 shown, specifically including S2.1 - S2.8: Among them, the test background of the basic read interference function test is: when the test host continuously reads the same physical block, when the read count of this physical block reaches the read interference threshold set by the firmware, a GC mark will be placed on this physical block, and when the disk starts GC later, the data of this physical block will be moved to a new block to avoid data loss caused by read interference. Therefore, the purpose of the basic read interference function test is to verify the refresh situation of the data on the Block when the read count of the Block does not reach / reaches the read interference threshold.
[0049] S2.1. Use the query interface to obtain the configuration information of the solid state drive under test according to the basic read interference function test request.
[0050] Specifically, according to the basic read interference function test request, call the solid state drive configuration information query interface to obtain the mode in the configuration information of the solid state drive under test returned by the solid state drive configuration information query interface.
[0051] In an optional implementation manner, before using the query interface to obtain the configuration information of the solid state drive under test according to the basic read interference function test request, it further includes: Execute the Format command (a command for formatting storage devices) to completely erase the user data of the solid state drive under test.
[0052] S2.2. If the mode is the SLC mode, sequentially write the first test data of the first preset data volume to the solid state drive under test.
[0053] In an optional implementation manner, the first preset data volume is a data volume of 3 - 5 superblock sizes, and the superblock size can be obtained using the solid state drive configuration information query interface.
[0054] S2.3. If the mode is the TLC mode, sequentially write the first test data of the second preset data volume to the solid state drive under test.
[0055] In an optional implementation manner, the second preset data volume is a data volume of 3 superblock sizes.
[0056] S2.4. If the mode is the hybrid mode of TLC and SLC (TLC+SLC cache), write the first test data of the third preset data volume to the SSD to be tested sequentially as the preset data write volume when testing the SLC physical block, and write the first test data of the fourth preset data volume to the SSD to be tested sequentially as the preset data write volume when testing the TLC physical block.
[0057] Among them, the third preset data volume is determined based on the superblock size, and the fourth preset data volume size is determined based on the SLC cache size. In an alternative embodiment, the third preset data volume is the data volume of 3 superblock sizes. If the data volume of 3 superblock sizes is greater than the SLC cache size, reduce the third preset data volume to ensure that the third preset data volume is not greater than the SLC cache size. The fourth preset data volume is the data volume of 2 times the SLC cache size, and the SLC cache size can be obtained using the SSD configuration information query interface.
[0058] The reason why the preset test data here is in the unit of SPB is that in the RDB design scheme of the exemplified firmware, the test host read will trigger an increase in the read count of the Block only when it exceeds the SPB, and how much data is read before the read count of the Block will increase, which will vary in different firmware schemes and needs to be adjusted according to the actual situation here.
[0059] S2.5. If the first test data written sequentially is the first preset data volume, use the query interface to obtain the physical block with the logical block address offset of the first offset, and use the physical block with the logical block address offset of the first offset as the physical block of the SLC that has been written full.
[0060] In an alternative embodiment, the first offset is the size of 1 superblock.
[0061] Specifically, if the first test data written sequentially is the first preset data volume, call the physical address query interface to obtain the physical block with the logical block address offset of 1 superblock size, and use the physical block with the logical block address offset of 1 superblock size as the physical block of the SLC that has been written full.
[0062] S2.6. If the first test data written sequentially is the second preset data volume, use the query interface to obtain the physical block with the logical block address offset of the second offset, and use the physical block with the logical block address offset of the second offset as the physical block of the TLC that has been written full.
[0063] In an alternative embodiment, the second offset is the size of 1 superblock.
[0064] Specifically, if the first test data written in sequence is the second preset data volume, call the physical address query interface to obtain a physical block with a logical block address offset of one superblock size, and use the physical block with a logical block address offset of one superblock size as the physical block of the TLC that has been written full.
[0065] S2.7. If the first test data written in sequence is the third preset data volume, use the query interface to obtain a physical block with a logical block address offset of the third offset, and use the physical block with a logical block address offset of the third offset as the physical block of the SLC that has been written full.
[0066] In an alternative embodiment, the third offset is one superblock size.
[0067] Specifically, if the first test data written in sequence is the third preset data volume, call the physical address query interface to obtain a physical block with a logical block address offset of one superblock size, and use the physical block with a logical block address offset of one superblock size as the physical block of the SLC that has been written full.
[0068] S2.8. If the first test data written in sequence is the fourth preset data volume, use the query interface to obtain a physical block with a logical block address offset of the fourth offset, and use the physical block with a logical block address offset of the fourth offset as the physical block of the TLC that has been written full.
[0069] In an alternative embodiment, the fourth offset is 1.2 times the SLC cache size.
[0070] Specifically, if the first test data written in sequence is the fourth preset data volume, call the physical address query interface to obtain a physical block with a logical block address offset of 1.2 times the SLC cache size, and use the physical block with a logical block address offset of 1.2 times the SLC cache size as the physical block of the TLC that has been written full.
[0071] For example, assume that the mode of the solid-state drive under test obtained by calling the solid-state drive configuration information query interface is the SLC mode. Then, write test data of 3 - 5 SPB sizes in sequence to the solid-state drive under test, and then call the physical address query interface to obtain a physical block with an LBA offset within 1 SPB size as the physical block of the SLC that has been written full. Assume that the mode of the solid-state drive under test obtained by calling the solid-state drive configuration information query interface is the TLC mode. Then, write test data of 3 SPB sizes in sequence to the solid-state drive under test, and then call the physical address query interface to obtain a physical block with an LBA offset within 1 SPB size as the physical block of the TLC that has been written full, and so on.
[0072] S3. Use the query interface to obtain the first read count, the first read interference threshold, and the first block status of the physical block, and use the setting interface to set the first read count based on the first read interference threshold.
[0073] Specifically, use the block identification of the physical block as an input parameter to call the block information query interface to obtain the first read count, the first read interference threshold, and the first block status of the physical block, determine the value to be set according to the first read interference threshold, and use the block identification of the physical block and the value to be set as input parameters to call the block information setting interface to set the first read count.
[0074] Wherein, the value to be set may be lower than the first read interference threshold, or may be higher than or equal to the first read interference threshold, and can be set according to test requirements.
[0075] S4. Sequentially read the first test data, and use the query interface to obtain the second read count and the second block status of the physical block.
[0076] Specifically, sequentially read the first test data to trigger an increase in the read count, and use the block identification of the physical block as an input parameter to call the block information query interface to obtain the second read count and the second block status of the physical block.
[0077] S5. Determine a first test result corresponding to the basic read interference function test request based on the first read interference threshold, the second read count, the first block status, and the second block status, specifically including S5.1 - S5.2: S5.1. If the second read count does not exceed the first read interference threshold, determine whether the first block status is the same as the second block status. If they are the same, determine that the first test result corresponding to the basic read interference function test request is a pass. If they are different, determine that the first test result corresponding to the basic read interference function test request is a fail.
[0078] S5.2. If the second read count exceeds the first read interference threshold, determine whether the second block status is different from the first block status, and the second block status is that the data is being refreshed or the data has been refreshed. If so, determine that the first test result corresponding to the basic read interference function test request is a pass. If not, determine that the first test result corresponding to the basic read interference function test request is a fail.
[0079] When the read count of a written - full (Close) or non - written - full (Open) data block / entry block does not reach the read interference threshold of the Block, the data on the Block will not be refreshed. When the read count of a written - full or non - written - full data block / entry block is greater than or equal to the read interference threshold of the Block, a data refresh flag will be set for the Block, and the data on the Block will be refreshed when the subsequent GC is started. Therefore, the test results determined through the above - mentioned judgment effectively verify whether the basic function of the read interference function is normal.
[0080] As the number of erasure cycles of the Nand flash of the SSD increases, its data retention ability will show a certain decline. It is normal to set different values for the read interference threshold in the initial, middle, and later stages of Nand life. Therefore, the present invention also tests the change of the read interference threshold with the number of erasure cycles to ensure the reliability of the read interference threshold, as follows: In an alternative embodiment, as Figure 5 shown, it further includes: S6. According to the test request for the change of the read interference threshold with the number of erasure cycles, use the query interface to obtain the average number of erasure cycles of the SSD to be tested as the initial average number of erasure cycles, and completely erase the user data of the SSD to be tested.
[0081] Specifically, according to the test request for the change of the read interference threshold with the number of erasure cycles, call the Vendor Smart information query interface to obtain the average number of erasure cycles of the SSD to be tested as the initial average number of erasure cycles, and execute the Format command to completely erase the user data of the SSD to be tested.
[0082] S7. After writing the second test data to the SSD to be tested, use the query interface to obtain a written - full physical block, and use the query interface to obtain the third block status of the physical block.
[0083] Among them, the step of using the query interface to obtain a written - full physical block after writing the second test data to the SSD to be tested adopts the same processing method as the steps S2.2 - S2.8 described above, and will not be elaborated here.
[0084] The use of the query interface to obtain the third block status of the physical block is specifically: Use the block identifier of the physical block as the input parameter to call the block information query interface to obtain the third block status of the physical block.
[0085] S8. Use the query interface to obtain the second read interference threshold of the physical block, and use the setting interface to set the average number of erasure cycles to a preset number of erasure cycles.
[0086] Specifically, use the block identifier of the physical block as an input parameter to call the block information query interface to obtain the second read disturbance threshold of the physical block, and use the preset number of erasures as an input parameter to call the average number of erasures setting interface to set the average number of erasures.
[0087] S9. Use the query interface to obtain the third read disturbance threshold of the physical block, and use the setting interface to set the read count of the physical block according to the third read disturbance threshold.
[0088] Specifically, use the block identifier of the physical block as an input parameter to call the block information query interface to obtain the third read disturbance threshold of the physical block, and use the block identifier of the physical block and the third read disturbance threshold as input parameters to call the block information setting interface to set the read count of the physical block.
[0089] S10. Read the second test data, and verify the data consistency between the read second test data and the written second test data to obtain a data consistency result.
[0090] S11. Use the query interface to obtain the fourth block status of the physical block, and use the setting interface to set the average number of erasures to the initial average number of erasures.
[0091] Specifically, use the block identifier of the physical block as an input parameter to call the block information query interface to obtain the fourth block status of the physical block, and use the initial average number of erasures as an input parameter to call the average number of erasures setting interface to set the average number of erasures, so as to restore the average number of erasures to the state before the test, in order to enter the next test scenario.
[0092] S12. Return to execute the step of completely erasing the user data of the solid state drive to be tested in step S6 - step S11 until the number of executions reaches the total number of the preset number of erasures, and each time the step of using the setting interface to set the average number of erasures to the preset number of erasures in step S8 is executed, the preset number of erasures is different. The preset number of erasures includes a first preset number of erasures, a second preset number of erasures, and a third preset number of erasures that increase in sequence.
[0093] Among them, the first preset number of erasures is a value in the initial stage of the flash memory life. The second preset number of erasures is a value in the middle stage of the flash memory life. The third preset number of erasures is a value in the later stage of the flash memory life.
[0094] For example, taking the Nand particles of TLC as an example, when executing to step S8, first set the average number of erase cycles to the first preset number of erase cycles, such as 100, and then continue to execute the subsequent steps. After executing step S11, return to step S8 again, set the average number of erase cycles to the second preset number of erase cycles, such as 1500, continue to execute the subsequent steps. After executing step S11 again, return to step S8 once more, set the average number of erase cycles to the third preset number of erase cycles, such as 3500, continue to execute the subsequent steps. After executing step S11 again, do not return to step S8 because the current execution count has reached the total number of preset erase cycles, that is, 3 times.
[0095] S13. Determine the second test result corresponding to the test request for the change of the read interference threshold with the number of erase cycles based on the preset number of erase cycles, the second read interference threshold, the third read interference threshold, the data consistency result, the state of the third block, and the state of the fourth block, specifically including S13.1 - S13.2: S13.1. If the preset number of erase cycles is the first preset number of erase cycles, then determine whether the third read interference threshold is the same as the second read interference threshold. If they are not the same, then determine that the second test result corresponding to the test request for the change of the read interference threshold with the number of erase cycles is a test failure. If they are the same, then determine whether the data consistency result is data consistent and whether the state of the third block is different from the state of the fourth block. If both are true, then determine that the second test result corresponding to the test request for the change of the read interference threshold with the number of erase cycles is a test pass. Otherwise, determine that the second test result corresponding to the test request for the change of the read interference threshold with the number of erase cycles is a test failure.
[0096] S13.2. If the preset number of erase cycles is the second preset number of erase cycles or the third preset number of erase cycles, then determine whether the third read interference threshold is the same as the second read interference threshold. If they are the same, then determine that the second test result corresponding to the test request for the change of the read interference threshold with the number of erase cycles is a test failure. If they are not the same, then determine whether the third read interference threshold when the preset number of erase cycles is the second preset number of erase cycles is less than the third read interference threshold when the preset number of erase cycles is the third preset number of erase cycles. If it is not less, then determine that the second test result corresponding to the test request for the change of the read interference threshold with the number of erase cycles is a test failure. If it is less, then determine whether the data consistency result is data consistent and whether the state of the third block is different from the state of the fourth block. If both are true, then determine that the second test result corresponding to the test request for the change of the read interference threshold with the number of erase cycles is a test pass. Otherwise, determine that the second test result corresponding to the test request for the change of the read interference threshold with the number of erase cycles is a test failure.
[0097] That is to say, when the average number of erasure times is in the initial stage, the obtained third read interference threshold should be the same as the second read interference threshold; when the average number of erasure times is in the middle and late stages, the obtained third read interference threshold should be different from the second read interference threshold, and the read interference threshold in the late stage of the average number of erasure times should be less than the read interference threshold in the middle stage of the average number of erasure times; in addition, there should be no data inconsistency when reading the second test data, and the state of the Block should change, indicating that the read interference function is normal.
[0098] The present invention also tests the interaction between the read interference function and other functional modules. The key points of the test are whether various tasks can run normally when there are firmware front-end and internal business processes being processed when the read interference function is triggered, whether the data on the Block that triggers the read interference function can be normally refreshed, and whether there is no data consistency when reading data. Specifically as follows: In an alternative embodiment, as Figure 6 shown, it further includes: S14. Use the query interface to obtain the configuration information of the solid state drive to be tested according to the test request for the interaction between the read interference function and other functional modules, and after sequentially writing the third test data to the solid state drive to be tested according to the configuration information, use the query interface to obtain a physically full block.
[0099] The processing method of step S14 is the same as that of step S2 and will not be elaborated here.
[0100] S15. Use the query interface to obtain the third read count, the fourth read interference threshold, and the fifth block state of the physical block, and use the setting interface to set the third read count based on the fourth read interference threshold.
[0101] Specifically, use the block identification of the physical block as an input parameter to call the block information query interface to obtain the third read count, the fourth read interference threshold, and the fifth block state of the physical block, determine the value to be set according to the fourth read interference threshold, and use the block identification of the physical block and the value to be set as input parameters to call the block information setting interface to set the third read count.
[0102] S16. Sequentially read the third test data, and at the same time, use the query interface to obtain the third read count of the physical block every preset time interval during the sequential reading process, and determine whether the third read count exceeds the fourth read interference threshold. If so, perform operations on other functional modules of the solid state drive to be tested.
[0103] In an alternative embodiment, the preset duration is 1 second. Among them, the operations of the other functional modules include performing an abnormal power-off operation on the solid-state drive under test, performing a reset operation on the solid-state drive under test, testing the logical block address of the physical block read by the host, testing the logical block address of the physical block written by the host, and testing the logical block address of the physical block for which the host performs TRIM (a function for improving the performance and extending the service life of the storage device), and so on.
[0104] Specifically, sequentially read the third test data, and during the sequential reading process, every 1 second, use the block identifier of the physical block as an input parameter to call the block information query interface to obtain the third read count of the physical block, and determine whether the third read count exceeds the fourth read interference threshold. If so, perform the operations of the other functional modules on the solid-state drive under test.
[0105] S17. Use the query interface to obtain the sixth block state of the physical block, and perform data consistency verification on the third test data read sequentially and the third test data written sequentially to obtain a consistency verification result.
[0106] Specifically, use the block identifier of the physical block as an input parameter to call the block information query interface to obtain the sixth block state of the physical block, and perform data consistency verification on the third test data read sequentially and the third test data written sequentially to obtain a consistency verification result.
[0107] S18. Determine a third test result corresponding to the test request for the interaction between the read interference function and the other functional modules based on the fifth block state, the sixth block state, and the consistency verification result.
[0108] Specifically, determine whether the fifth block state is different from the sixth block state. If not, determine that the third test result corresponding to the test request for the interaction between the read interference function and the other functional modules is a test failure. If so, determine whether the consistency verification result is data consistent. If it is data consistent, determine that the third test result corresponding to the test request for the interaction between the read interference function and the other functional modules is a test pass. If it is data inconsistent, determine that the third test result corresponding to the test request for the interaction between the read interference function and the other functional modules is a test failure.
[0109] Another test point that cannot be ignored for the gray-box testing of the firmware business logic of the read interference function is the exception handling process, that is, it is also necessary to consider the error situations that the read interference function may encounter during the firmware operation. Only after testing these error scenarios can it be ensured that the read interference function can operate stably under various conditions.
[0110] When the remaining available blocks for testing are insufficient, triggering the read interference function mainly takes into account that when the remaining available blocks of the SSD are insufficient, the disk will enter a write protection state. At this time, neither the data writing from the host nor the internal writing of the disk, such as GC, is allowed. However, the read operation of the host on the disk is still allowed. Then there will be such a situation: after the test disk has entered the write protection state due to insufficient remaining available blocks at the end of its life, the read operation of the test host triggers the read interference function. At this time, it is necessary to verify whether the test disk will hang when the data refresh process fails. Specifically as follows: In an alternative embodiment, such as Figure 7 shown, it further includes: S19. Erase the user data of the solid state drive to be tested according to the test request for triggering the read interference function when the remaining blank blocks are insufficient.
[0111] S20. Use the query interface to obtain the threshold value of the remaining blank blocks of the solid state drive to be tested being insufficient.
[0112] Specifically, call the solid state drive configuration information query interface to obtain the threshold value of the remaining blank blocks of the solid state drive to be tested being insufficient.
[0113] S21. Sequentially write the fourth test data to the entire disk of the solid state drive to be tested.
[0114] S22. Use the query interface to obtain the first bad block count and the first remaining blank block count of the solid state drive to be tested.
[0115] Specifically, call the Vendor Smart information query interface to obtain the first bad block count and the first remaining blank block count of the solid state drive to be tested.
[0116] S23. Write the fifth test data of the fifth preset data volume to the solid state drive to be tested, and use the query interface to obtain the physical address of the physical address of the last logical block of the written data.
[0117] In an alternative embodiment, the fifth preset data volume is 1 / 2 of the super block size.
[0118] Specifically, write the fifth test data of 1 / 2 of the super block size to the solid state drive to be tested, and use the last logical block address of the written data as an input parameter to call the physical address query interface to obtain the physical address of the physical address of the last logical block of the written data.
[0119] S24. Determine the positions of the first preset number of pages after the physical address as the target physical address, and after injecting a programming error at the target physical address using the error injection interface, continue to write the fifth test data of the fifth preset data volume to the solid state drive to be tested.
[0120] Among them, the first preset number cannot exceed the total number of pages in the block. In an alternative embodiment, the first preset number is 2.
[0121] Specifically, determine the positions of the last 2 pages of the physical address as the target physical address, and use the target physical address as an input parameter to call the Program Fail injection interface. After injecting a programming error at the target physical address, continue to write the fifth test data of the fifth preset data volume to the solid state drive under test to trigger a programming error.
[0122] S25. Use the query interface to obtain the second bad block count and the second remaining blank block count of the solid state drive under test.
[0123] Specifically, call the Vendor Smart information query interface to obtain the second bad block count and the second remaining blank block count of the solid state drive under test.
[0124] S26. Determine whether the second bad block count increases by one according to the first bad block count, and determine whether the second remaining blank block count decreases by one according to the first remaining blank block count. If both are true, return to execute step S22 until the second remaining blank block count of the solid state drive under test is lower than the threshold of insufficient remaining blank blocks.
[0125] S27. Use the query interface to obtain the physical address of the last logical block address of the written data in the solid state drive under test.
[0126] Specifically, starting from the starting position of the solid state drive under test, call the physical address query interface to obtain the physical address of the last logical block address of the written data.
[0127] S28. If the block status of the target block of the physical address of the last logical block address of the written data is valid, use the setting interface to set the read count of the target block according to the read interference threshold of the target block.
[0128] Specifically, if the block status of the target block of the physical address of the last logical block address of the written data obtained by calling the block information query interface is valid, use the block identification and the read interference threshold of the target block as input parameters to call the block information setting interface to set the read count of the target block so that the read count of the target block is equal to the read interference threshold.
[0129] S29. Read the logical block address of the target block.
[0130] S30. Issue a non-data management command to the solid state drive under test.
[0131] In an alternative embodiment, the non-data management commands include commands such as get log page (device log query) command, identify command, etc.
[0132] S31. Determine whether a read error occurs when reading the logical block address of the target block, and whether the SSD under test can execute the non-data management command. If both are true, determine that the fourth test result corresponding to the test request for triggering the read interference function when the remaining blank blocks are insufficient is a pass; otherwise, determine that the fourth test result corresponding to the test request for triggering the read interference function when the remaining blank blocks are insufficient is a fail.
[0133] Under normal circumstances, when the test host reads the logical block address corresponding to the physical block that reaches the read interference threshold, a read error may occur, but the SSD under test can still continue to execute the non-data management command.
[0134] The test for unrecoverable read errors occurring when the read count reaches the read interference threshold is considered because when the test host continuously reads a block until the read count of this block exceeds the read interference threshold and the firmware is about to refresh the data of this block, a UNC error has already occurred in this block. At this time, whether the firmware can perform abnormal processing normally instead of the process hanging (stopping execution) or other abnormalities occurring.
[0135] In an alternative embodiment, as Figure 8 shown, it further includes: S32. Use the query interface to obtain the configuration information of the SSD under test according to the test request for unrecoverable read errors occurring when the read count reaches the read interference threshold. After sequentially writing the sixth test data to the SSD under test according to the configuration information, use the query interface to obtain a fully written physical block.
[0136] The processing method of step S32 is the same as that of the foregoing step S2, and will not be elaborated here.
[0137] In an alternative embodiment, before executing using the query interface to obtain the configuration information of the SSD under test according to the test request for unrecoverable read errors occurring when the read count reaches the read interference threshold, it further includes: Execute the Format command to completely erase the user data of the SSD under test.
[0138] S33. Use the query interface to obtain the fourth read count, the fifth read interference threshold, the seventh block status, the first unrecoverable read error count, and the third bad block count of the physical block, and use the setting interface to set the fourth read count based on the fifth read interference threshold.
[0139] Specifically, use the block identification of the physical block as an input parameter to call the block information query interface to obtain the fourth read count, the fifth read interference threshold, and the seventh block status of the physical block, call the Vendor Smart information query interface to obtain the first uncorrectable read error count and the third bad block count, and determine the value to be set according to the fifth read interference threshold. Then, use the value to be set and the block identification of the physical block as input parameters to call the block information setting interface to set the fourth read count.
[0140] S34. Inject an uncorrectable read error into the physical block using the error injection interface.
[0141] Specifically, use the physical address of the physical block as an input parameter to call the UNC injection interface to inject an uncorrectable read error into the physical block.
[0142] S35. Sequentially read the sixth test data, and use the query interface to obtain the fifth read count, the eighth block status, the second uncorrectable read error count, and the fourth bad block count of the physical block.
[0143] Specifically, sequentially read the sixth test data, use the block identification of the physical block as an input parameter to call the block information query interface to obtain the fifth read count and the eighth block status of the physical block, and call the Vendor Smart information query interface to obtain the second uncorrectable read error count and the fourth bad block count.
[0144] S36. Determine whether the fifth read count reaches the fifth read interference threshold. If so, determine whether the eighth block status has changed according to the seventh block status. If not, determine that the fifth test result corresponding to the test request for an uncorrectable read error when the read count reaches the read interference threshold is a test failure. If it has changed, determine whether the second uncorrectable read error count and the fourth bad block count have increased according to the first uncorrectable read error count and the third bad block count. If both have increased, determine that the fifth test result corresponding to the test request for an uncorrectable read error when the read count reaches the read interference threshold is a test pass; otherwise, determine that the fifth test result corresponding to the test request for an uncorrectable read error when the read count reaches the read interference threshold is a test failure.
[0145] The present invention constructs and simulates trigger scenarios for various read interference functions by setting up interfaces, query interfaces, and error injection interfaces, including the basic business logic of the read interference function, the interaction between the read interference function and other firmware modules, the dynamic adjustment of the read interference threshold with the service life of the test disk, and the exception handling process of the read interference function. This helps improve the test coverage, shorten the test time, enhance the transparency of the test process, and thus improve the test efficiency and test effectiveness.
[0146] Please refer to Figure 2 , Embodiment 2 of the present invention is as follows: A read interference function test device, comprising: A request receiving module, configured to receive a read interference function test request of a solid state drive to be tested, where the read interference function test request includes a basic read interference function test request; A data writing module, configured to obtain configuration information of the solid state drive to be tested using a query interface according to the basic read interference function test request, and after sequentially writing first test data to the solid state drive to be tested according to the configuration information, obtain a physically full block using the query interface; A data setting module, configured to obtain a first read count, a first read interference threshold, and a first block status of the physical block using the query interface, and set the first read count based on the first read interference threshold using a setting interface; A data reading module, configured to sequentially read the first test data, and obtain a second read count and a second block status of the physical block using the query interface; A test result determination module, configured to determine a first test result corresponding to the basic read interference function test request based on the first read interference threshold, the second read count, the first block status, and the second block status.
[0147] Embodiment 3 of the present invention is as follows: A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each step of the read interference function test method in Embodiment 1 can be implemented.
[0148] Embodiment 4 of the present invention is as follows: Please refer to Figure 3 , An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, each step of the read interference function test method in Embodiment 1 is implemented.
[0149] In summary, the present invention provides a read interference function test method, apparatus, readable storage medium, and electronic device. After receiving a basic read interference function test request for a solid-state drive to be tested, the configuration information of the solid-state drive to be tested is obtained using a query interface. After sequentially writing first test data to the solid-state drive to be tested according to the configuration information, a full physical block is obtained using the query interface. The first read count, the first read interference threshold, and the first block status of the physical block are obtained using the query interface, and the first read count is set based on the first read interference threshold using a setting interface. The first test data is sequentially read, and the second read count and the second block status of the physical block are obtained using the query interface. The first test result is determined based on the first read interference threshold, the second read count, the first block status, and the second block status. The present invention can directly and accurately obtain the information required for testing using the query interface, and can flexibly set the current read count using the setting interface, without actually performing multiple read operations, shortening the test cycle, thereby achieving an efficient and reliable basic read interference function test. Moreover, when determining the test result, it is not just verifying the data consistency as in the prior art, but is determined based on the first read interference threshold, the second read count, the first block status, and the second block status obtained using the query interface. The test result is more reliable, and the test process is made more transparent, thus improving the efficiency and effectiveness of the read interference function test. In addition, the setting interface, the query interface, and the error injection interface are also used to implement the test of the change of the read interference threshold with the number of erasure times, the test of the interaction between the read interference function and other functional modules, and the test of the abnormal handling process of the read interference function, effectively improving the coverage rate of the read interference function test and ensuring the reliability of the read interference function under various conditions.
[0150] In the above embodiments provided by the present application, it should be understood that the disclosed methods, apparatuses, computer-readable storage media, and electronic devices can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation. For example, multiple components or modules can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, and the indirect coupling or communication connection of the devices or components or modules may be in an electrical, mechanical, or other form.
[0151] The components described as separate components may or may not be physically separated, and the components displayed as components may or may not be physical modules, that is, they may be located in one place, or may be distributed to multiple network modules. Some or all of the components can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0152] In addition, in each embodiment of the present invention, each functional module may be integrated into one processing module, or each component may exist physically alone, or two or more modules may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module.
[0153] If the above-mentioned integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, may be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0154] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps may be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.
[0155] In the above embodiments, the descriptions of each embodiment have their own focuses. For the parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0156] The above are only the embodiments of the present invention, and thus do not limit the patent scope of the present invention. All equivalent transformations made by using the content of the specification and drawings of the present invention, directly or indirectly applied in the related technical fields, are equally included in the patent protection scope of the present invention.
Claims
1. A read disturbance function test method, characterized in that: Includes steps: Receive a read disturb function test request of a solid state drive to be tested, wherein the read disturb function test request includes a read disturb function basic test request; According to the read disturbance function basic test request, the configuration information of the solid state drive to be tested is obtained using a query interface, and after the first test data is sequentially written into the solid state drive to be tested according to the configuration information, a full physical block is obtained using the query interface; Using the query interface to obtain a first read count, a first read disturbance threshold, and a first block state of the physical block, and using a setting interface to set the first read count based on the first read disturbance threshold; Sequentially read the first test data, and use the query interface to obtain a second read count and a second block status of the physical block; A first test result corresponding to the read disturb functional basis test request is determined based on the first read disturb threshold, the second read count, the first block status, and the second block status.
2. A read disturbance function testing method according to claim 1, characterized in that: The configuration information includes a mode; The sequentially writing the first test data into the solid state drive to be tested according to the configuration information comprises: If the mode is the SLC mode, sequentially writing first test data of a first preset data amount into the solid state drive to be tested; If the mode is the TLC mode, sequentially writing first test data of a second preset data amount into the solid state drive to be tested; If the mode is a mixed mode of TLC and SLC, the first test data of the third preset data amount is sequentially written to the solid state drive to be tested as the preset data write amount when testing the SLC physical block, and the first test data of the fourth preset data amount is sequentially written to the solid state drive to be tested as the preset data write amount when testing the TLC physical block, wherein the third preset data amount is determined based on the super block size, and the fourth preset data amount is determined based on the SLC cache size.
3. A read disturbance function testing method according to claim 2, characterized in that: The using the query interface to obtain a full physical block includes: If the first test data written sequentially is the first preset data amount, the query interface is used to obtain a physical block whose logical block address offset is the first offset, and the physical block whose logical block address offset is the first offset is used as a physical block of the full SLC; If the first test data written sequentially is the second preset data amount, the query interface is used to obtain a physical block whose logical block address offset is the second offset, and the physical block whose logical block address offset is the second offset is used as a physical block of the full TLC; If the first test data written sequentially is the third preset data amount, the query interface is used to obtain a physical block whose logical block address offset is the third offset, and the physical block whose logical block address offset is the third offset is used as a physical block of the full SLC; If the first test data written sequentially is the fourth preset data amount, the query interface is used to obtain a physical block whose logical block address offset is the fourth offset, and the physical block whose logical block address offset is the fourth offset is used as the physical block of the full TLC.
4. A read disturbance function testing method according to claim 1, characterized in that: Determining a first test result corresponding to the read disturbance function basic test request based on the first read disturbance threshold, the second read count, the first block state, and the second block state includes: If the second read count does not exceed the first read disturbance threshold, determining whether the first block state is consistent with the second block state, if consistent, determining that the first test result corresponding to the read disturbance function basic test request is a test pass, if inconsistent, determining that the first test result corresponding to the read disturbance function basic test request is a test fail; If the second read count exceeds the first read interference threshold, it is determined whether the second block state is different from the first block state, and the second block state is that the data is being refreshed or the data has been refreshed. If so, it is determined that the first test result corresponding to the read interference function basic test request is a passed test; if not, it is determined that the first test result corresponding to the read interference function basic test request is a failed test.
5. A read disturbance function testing method according to claim 1, characterized in that: The read disturbance function test request also includes a test request for a read disturbance threshold value varying with the number of erasures; Also includes: According to the test request of the read disturbance threshold changing with the erasure number, using the query interface to obtain the average erasure number of the solid state drive to be tested as the initial average erasure number, and completely erasing the user data of the solid state drive to be tested; After writing the second test data to the solid state drive to be tested, using the query interface to obtain a full physical block, and using the query interface to obtain a third block status of the physical block; Using the query interface to obtain a second read disturbance threshold of the physical block, and using the setting interface to set the average number of erasures to a preset number of erasures; Using the query interface to obtain a third read disturbance threshold of the physical block, and using the setting interface to set a read count of the physical block according to the third read disturbance threshold; Reading the second test data, and verifying data consistency between the read second test data and the written second test data to obtain a data consistency result; Using the query interface to obtain the fourth block state of the physical block, and using the setting interface to set the average number of erasures to the initial average number of erasures; Return to executing the step of erasing all user data of the solid state drive to be tested, until the number of executions reaches the total number of the preset erasure times, and each time the step of setting the average erasure times to the preset erasure times using the setting interface is executed, the preset erasure times are different, and the preset erasure times include a first preset erasure times, a second preset erasure times, and a third preset erasure times that increase in sequence; A second test result corresponding to the test request in which the read disturbance threshold varies with the number of erase times is determined based on the preset number of erase times, the second read disturbance threshold, the third read disturbance threshold, the data consistency result, the third block state, and the fourth block state.
6. A read disturbance function testing method according to claim 5, characterized in that: The determining, based on the preset number of erasures, the second read disturbance threshold, the third read disturbance threshold, the data consistency result, the third block state, and the fourth block state, a second test result corresponding to a test request in which the read disturbance threshold varies with the number of erasures comprises: If the preset number of erasures is the first preset number of erasures, then determining whether the third read interference threshold is the same as the second read interference threshold; if they are not the same, then determining that the second test result corresponding to the test request in which the read interference threshold varies with the number of erasures is a test failure; if they are the same, then determining whether the data consistency result is data consistency, and whether the third block state is different from the fourth block state; if both are the same, then determining that the second test result corresponding to the test request in which the read interference threshold varies with the number of erasures is a test pass; otherwise, determining that the second test result corresponding to the test request in which the read interference threshold varies with the number of erasures is a test failure; If the preset number of erase times is the second preset number of erase times or the third preset number of erase times, it is determined whether the third read interference threshold is the same as the second read interference threshold; if they are the same, it is determined that the second test result corresponding to the test request in which the read interference threshold changes with the number of erase times is a test failure; if they are not the same, it is determined whether the third read interference threshold when the preset number of erase times is the second preset number of erase times is less than the third read interference threshold when the preset number of erase times is the third preset number of erase times; if it is not less than, it is determined that the second test result corresponding to the test request in which the read interference threshold changes with the number of erase times is a test failure; if it is less than, it is determined whether the data consistency result is data consistency and whether the third block state is different from the fourth block state; if both are yes, it is determined that the second test result corresponding to the test request in which the read interference threshold changes with the number of erase times is a test pass; otherwise, it is determined that the second test result corresponding to the test request in which the read interference threshold changes with the number of erase times is a test failure.
7. A read disturbance function testing method according to claim 1, characterized in that: The read disturbance function test request also includes a test request for the interaction between the read disturbance function and other functional modules; Also includes: Using the query interface to obtain configuration information of the solid-state drive to be tested according to a test request of the read interference function interacting with other functional modules, and after sequentially writing third test data to the solid-state drive to be tested according to the configuration information, using the query interface to obtain a full physical block; Using the query interface to obtain a third read count, a fourth read disturbance threshold, and a fifth block state of the physical block, and using the setting interface to set the third read count based on the fourth read disturbance threshold; Sequentially read the third test data, and at the same time, use the query interface to obtain the third read count of the physical block at each preset time interval during the sequential reading process, and determine whether the third read count exceeds the fourth read interference threshold, and if so, perform operations of other functional modules on the solid state drive to be tested; Using the query interface to obtain the sixth block state of the physical block, and performing a data consistency check on the third test data sequentially read and the third test data sequentially written to obtain a consistency check result; A third test result corresponding to a test request for interaction between the read disturb function and other functional modules is determined based on the fifth block status, the sixth block status and the consistency check result.
8. A read disturbance function testing method according to claim 7, characterized in that: The determining, based on the fifth block state, the sixth block state and the consistency check result, of a third test result corresponding to a test request for interaction between the read disturb function and other functional modules comprises: Determine whether the fifth block state is different from the sixth block state. If not, determine that the third test result corresponding to the test request for interacting with the read interference function and other functional modules is a test failure. If so, determine whether the consistency check result is data consistent. If the data is consistent, determine that the third test result corresponding to the test request for interacting with the read interference function and other functional modules is a test pass. If the data is inconsistent, determine that the third test result corresponding to the test request for interacting with the read interference function and other functional modules is a test failure.
9. A read disturbance function testing method according to claim 1, characterized in that: The read disturb function test request also includes a test request for triggering the read disturb function when the remaining blank blocks are insufficient; Also includes: Erasing user data of the solid state drive to be tested according to the test request for triggering a read disturb function when the remaining blank blocks are insufficient; Using the query interface to obtain a threshold value of insufficient remaining blank blocks of the solid state drive to be tested; Sequentially writing fourth test data to the entire solid state drive to be tested; Using the query interface to obtain a first bad block count and a first remaining blank block count of the solid state drive to be tested; Writing fifth test data of a fifth preset data volume into the solid state drive to be tested, and using the query interface to obtain the physical address of the last logical block address of the written data; Determine the location of a first preset number of pages after the physical address as a target physical address, and continue to write the fifth test data of the fifth preset data amount to the solid state drive to be tested after injecting a programming error into the target physical address using an error injection interface; Using the query interface to obtain a second bad block count and a second remaining blank block count of the solid state drive to be tested; Determine whether the second bad block count is increased by one according to the first bad block count, and determine whether the second number of remaining blank blocks is decreased by one according to the first remaining blank block count, and if both are yes, return to execute the step of using the query interface to obtain the first bad block count and the first remaining blank block count of the solid-state hard disk to be tested, until the second number of remaining blank blocks of the solid-state hard disk to be tested is lower than the threshold value of insufficient remaining blank blocks; Using the query interface to obtain the physical address of the last logical block address of the written data in the solid state drive to be tested; If the block state of the target block of the physical address of the last logical block address of the write data is valid, using the setting interface to set the read count of the target block according to the read disturbance threshold of the target block; Reading the logical block address of the target block; Sending a non-data management command to the solid state drive to be tested; Determine whether a read error occurs when reading the logical block address of the target block, and whether the solid-state hard disk to be tested can execute the non-data management command; if both are true, determine that the fourth test result corresponding to the test request for triggering the read interference function when the remaining blank blocks are insufficient is a passed test; otherwise, determine that the fourth test result corresponding to the test request for triggering the read interference function when the remaining blank blocks are insufficient is a failed test.
10. A read disturbance function testing method according to claim 1, characterized in that: The read disturbance function test request also includes a test request for an unrecoverable read error that occurs when the read count reaches a read disturbance threshold; Also includes: Using the query interface to obtain configuration information of the solid-state drive to be tested according to the test request for an unrecoverable read error occurring when the read count reaches a read interference threshold, and after sequentially writing sixth test data to the solid-state drive to be tested according to the configuration information, using the query interface to obtain a full physical block; Using the query interface to obtain a fourth read count, a fifth read disturbance threshold, a seventh block status, a first unrecoverable read error count, and a third bad block count of the physical block, and using the setting interface to set the fourth read count based on the fifth read disturbance threshold; Injecting an unrecoverable read error into the physical block using an error injection interface; sequentially reading the sixth test data, and using the query interface to obtain a fifth read count, an eighth block status, a second unrecoverable read error count, and a fourth bad block count of the physical block; Determine whether the fifth read count reaches the fifth read interference threshold. If so, determine whether the eighth block state has changed according to the seventh block state. If not, determine that the fifth test result corresponding to the test request for an irrecoverable read error when the read count reaches the read interference threshold is a test failure. If it has changed, determine whether the second irrecoverable read error count and the fourth bad block count have increased according to the first irrecoverable read error count and the third bad block count. If both have increased, determine that the fifth test result corresponding to the test request for an irrecoverable read error when the read count reaches the read interference threshold is a test pass. Otherwise, determine that the fifth test result corresponding to the test request for an irrecoverable read error when the read count reaches the read interference threshold is a test failure.
11. A read disturbance function test device, characterized in that: include: A request receiving module, used for receiving a read disturb function test request of the solid state drive to be tested, wherein the read disturb function test request includes a read disturb function basic test request; A data writing module, configured to obtain configuration information of the solid state drive to be tested using a query interface according to the read disturbance function basic test request, and after sequentially writing first test data to the solid state drive to be tested according to the configuration information, use the query interface to obtain a full physical block; a data setting module, configured to obtain a first read count, a first read disturbance threshold, and a first block state of the physical block using the query interface, and to set the first read count based on the first read disturbance threshold using a setting interface; A data reading module, used for sequentially reading the first test data, and obtaining a second read count and a second block status of the physical block using the query interface; A test result determination module is used to determine a first test result corresponding to the read disturbance function basic test request based on the first read disturbance threshold, the second read count, the first block state and the second block state.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step in a read disturbance function testing method as claimed in any one of claims 1 to 10 is implemented.
13. An electronic 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, each step in the read disturbance function testing method according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Read interference test method and device, computer readable storage medium and electronic equipment
CN112185453A
Data processing method and apparatus, and storage medium
CN114008710A
SSD performance test method, system and equipment based on read interference and medium
CN114566206A
Flash memory read interference processing method and device, electronic equipment and storage medium
CN117672331A
Read interference detection method and device, equipment, storage medium and program product
CN118689410A