A method, system and medium for testing HMB characteristics of a solid state drive

By loading test scripts in solid-state drive tests and parsing test requirements, generating and verifying memory data, and then mapping them to the HMB actual space memory in the kernel memory space, the problem of lack of flexibility and error-making functions of HMB technology testing is solved, and efficient and accurate testing is achieved.

CN119166439BActive Publication Date: 2025-05-16SUZHOU DEGASTORAGE TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411350816.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2025-05-16
Estimated Expiration
2044-09-26

AI Technical Summary

Technical Problem

During the research and development of solid-state drives, the testing of HMB technology lacks test functions such as flexibility and error-making, making it difficult to fully cover the stability, reliability and compatibility of solid-state drive design.

Method used

By loading the test script, analyzing the test load parameters and test requirements, memory data is generated and filled into the HMB user space memory of the user memory space, data integrity verification is performed, and after passing the verification, the data is mapped into the HMB actual space memory of the kernel memory space for testing by the solid state hard disk.

Benefits of technology

The test of HMB characteristics is realized, ensuring the accuracy and stability of the test, improving the testing efficiency, reducing the test time, and reducing the interference factors caused by human operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166439B_ABST
    Figure CN119166439B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, system and medium for testing the HMB characteristics of a solid-state hard disk, wherein the method includes loading a test script, the test script includes a test load parameter and a test requirement; parsing the test load parameter and the test requirement, and generating a corresponding test program; generating required memory data according to the parsed test requirement, and filling the memory data into the HMB user space memory of the user memory space; performing a data integrity check on the memory data in the HMB user space memory; when the data integrity check is qualified, mapping the memory data in the HMB user space memory to the HMB actual space memory of the kernel memory space; the solid-state hard disk obtains the memory data from the HMB actual space memory and updates it to the solid-state hard disk controller, and the solid-state hard disk performs the test. The present invention can achieve the test purpose required for the HMB content test, and also ensure the stability of the system operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of solid state drive testing, and in particular to a method, system and medium for testing HMB characteristics of a solid state drive. Background Art

[0002] In the consumer storage industry, SSDs are low-cost oriented while requiring high performance. In order to reduce costs while minimizing the impact on performance, HMB (host memory buffer, hereinafter referred to as HMB) technology has been gradually introduced into entry-level and mainstream consumer SSDs. HMB is a piece of memory allocated by the host side to be used as the DRAM of its SSD. This scenario is defined in the NVMe protocol, but it is not like sharing video memory, directly allocating continuous space from the BIOS level. Instead, the NVMe driver allocates memory space of corresponding capacity in the physical address space managed by the host side to the SSD controller for use. This space may not be physically continuous. The NVMe driver pushes the corresponding base address and length list of the memory to the SSD controller. The SSD controller needs to update the corresponding list to the internal register for memory search. In this way, the SSD controller can store, for example, the FTL mapping table in the memory area on the host side. This means that after each command request is sent to the SSD, the SSD controller needs to access the memory space on the host side through the PCIe bus to extract the corresponding entry in the mapping table to find the physical address to which the corresponding command target logical address is mapped.

[0003] HMB, a new type of SSD mechanism, cleverly uses the host memory as a cache for the SSD. Therefore, during the development of SSDs, comprehensive testing coverage of SSDs with this mechanism is required to meet the test coverage requirements for SSD design stability, reliability, and compatibility. However, because the HMB space on the host side is limited to the kernel memory space under the operating system, user programs usually cannot access or modify the contents of the HMB memory in the kernel state. Therefore, from the perspective of SSD testing, it lacks the flexibility and error-making testing functions required for testing. Summary of the invention

[0004] In order to overcome the above-mentioned shortcomings, the purpose of the present invention is to provide a method, system and medium for testing the HMB characteristics of a solid-state drive, which can not only achieve the testing objectives required for HMB content testing, but also ensure the stability of system operation.

[0005] In order to achieve the above purpose, the technical solution adopted by the present invention is: a method for testing the HMB characteristics of a solid state drive, comprising the following steps:

[0006] Loading a test script, wherein the test script includes test load parameters and test requirements;

[0007] Analyze the test load parameters and test requirements, and generate corresponding test programs;

[0008] Generate required memory data according to the parsed test requirements, and fill the memory data into the HMB user space memory of the user memory space;

[0009] Performing a data integrity check on the memory data in the HMB user space memory;

[0010] When the data integrity check is qualified, the memory data in the HMB user space memory is mapped to the HMB actual space memory of the kernel memory space;

[0011] The solid state drive obtains memory data from the HMB actual space memory and updates it to the solid state drive controller, and the solid state drive is tested.

[0012] The beneficial effect of the present invention is that the HMB user space memory of the user memory space and the HMB actual space memory of the kernel memory space are spatially isolated, and the verification and synchronous mapping method is adopted to ensure the test purposes such as HMB memory modification and injection errors while ensuring that the reliability and stability of the entire test system operation are not affected. The test efficiency is greatly improved, the test time is reduced, and the additional interference factors caused by human operation are reduced. The accuracy and stability of the test are guaranteed.

[0013] Further, performing data integrity check on the memory data in the HMB user space memory specifically includes:

[0014] Issue instructions according to the test program, and modify and test the HMB user space memory according to the instructions;

[0015] The address position of the user memory space, the size of the memory data block and the content of the memory data are verified.

[0016] Furthermore, before the step of loading the test script, the HMB test initialization of the solid state drive is also included to determine the HMB memory size and memory location corresponding to the kernel memory space. Only after the initialization is qualified, can the subsequent test be carried out.

[0017] More specifically, the HMB test initialization of the solid state drive specifically includes:

[0018] Powering on the solid state drive;

[0019] Sending an identification command to the solid state drive to obtain first HMB information of the solid state drive;

[0020] Sending an HMB shutdown command and obtaining second HMB information when the solid state drive shuts down the HMB;

[0021] Comparing the first HMB information with the second HMB information, and determining whether the setting of the HMB function is supported;

[0022] When the HMB function is supported, an HMB enable command is issued, and third HMB information when the solid state drive enables the HMB is obtained;

[0023] Determining whether the HMB of the solid state drive has been turned on according to the third HMB information;

[0024] When enabled, HMB actual space memory is allocated in the kernel memory space and a pointer address of the kernel memory space corresponding to the HMB actual space memory is sent to the solid state drive.

[0025] Furthermore, the first HMB information, the second HMB information and the third HMB information all include an HMB recommended value and an HMB minimum value, wherein the HMB recommended value is the host memory capacity actually allocated to the HMB for use, and the HMB minimum value is the minimum memory allocation amount of the HMB to ensure normal operation.

[0026] Specifically, comparing the first HMB information and the second HMB information and determining whether the setting of the HMB function is supported specifically includes:

[0027] The HMB recommended value and HMB minimum value of the second HMB information are compared with the set threshold, and the change values ​​of the HMB recommended values ​​and HMB minimum values ​​of the first HMB information and the second HMB information are compared with the set range. When they are greater than the threshold and within the set range, it is determined that the HMB function is supported.

[0028] Further, judging whether the HMB of the solid state drive has been turned on according to the third HMB information specifically includes:

[0029] The HMB recommended value and the HMB minimum value of the third HMB information are compared with a set threshold value, and when they are greater than the set threshold value, it is determined that the HMB of the solid state drive has been turned on.

[0030] The present invention also discloses a test system for the HMB characteristics of a solid state drive, using the above test method, the test system includes a solid state drive and a host, the host includes a user memory space and a kernel memory space, and the user memory space is provided with:

[0031] A test management module, the test management module is used to parse the test load parameters and test requirements and generate corresponding test programs;

[0032] A user memory space management module, the user memory space management module generates required memory data according to the parsed test requirements, and the user memory space management module simultaneously performs a data integrity check on the memory data in the user memory space;

[0033] HMB user space memory, wherein memory data is stored in the HMB user space memory;

[0034] A mapping management module, wherein after the integrity check is passed, the mapping management module maps the memory data in the user memory space to the HMB actual space memory of the kernel memory space;

[0035] The solid state drive obtains memory data from the HMB actual space memory and updates it to the solid state drive controller, and the solid state drive is tested.

[0036] The HMB user space memory of the user memory space and the HMB actual space memory of the kernel memory space are isolated and synchronized after verification, which can ensure that the reliability and stability of the entire test system operation are not affected.

[0037] Furthermore, the host also includes an API interface, which is connected to the test management module and is used to load the test script.

[0038] The present invention also discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 The process of the test method in the embodiment of the present invention is Figure 1 ;

[0040] Figure 2 The process of the test method in the embodiment of the present invention is Figure 2 ;

[0041] Figure 3 A system block diagram of a test system in an embodiment of the present invention;

[0042] Figure 4 It is a system block diagram of a test system in the prior art. DETAILED DESCRIPTION

[0043] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.

[0044] See attached Figure 4 As shown, it is a block diagram structure of a host connected to a solid-state drive in the prior art. At this time, there is no cache chip inside the solid-state drive. The host CPU caches the commands to the solid-state drive in the host DRAM space, and then exchanges commands and data with the solid-state drive through the PCIe bus. A space will be opened up inside the solid-state drive controller to record the HMB memory address assigned to the solid-state drive by the host memory. This part is the HMB memory mapping table in the solid-state drive controller. When the association between the HMB memory mapping table and the host memory address is established, the solid-state drive controller will directly access the host's HMB memory space through the PCIe bus, and the host will also directly update the memory data to be updated through the HMB. In this way, the host and the solid-state drive control operate on the HMB memory interval in this DMA "direct memory access" mode to exchange data.

[0045] However, because HMB is in the kernel memory space, and since the kernel memory space has full access to hardware and memory, any kernel-mode code errors may cause system crashes or data loss. The use of kernel memory space is subject to strict restrictions and regulations to ensure system stability and security. These restrictions include access rights, memory management, system calls, memory protection, address space partitioning, process isolation, and security considerations. When designing and writing code involving kernel-mode memory, you need to fully understand these restrictions and follow relevant programming specifications and testing procedures. Therefore, operating HMB in kernel memory space to achieve testing purposes will be very risky and can easily cause system crashes.

[0046] Therefore, the present invention discloses a method for testing the HMB characteristics of a solid-state hard disk, which realizes the testing method required for testing the HMB characteristics of a solid-state hard disk, including testing functions such as memory error generation, while ensuring the stability of system operation, thereby ensuring the accuracy and flexibility of the test and preventing the system from crashing due to test errors.

[0047] See attached Figure 1 As shown, the test method includes the following steps:

[0048] S100. Load a test script, where the test script includes test load parameters and test requirements.

[0049] The test process or test requirements are managed and controlled through test scripts, so the content required for the test is to execute the desired test process according to the test script requirements.

[0050] S200: Analyze the test load parameters and test requirements, and generate corresponding test programs.

[0051] S300, generating required memory data according to the parsed test requirements, and filling the memory data into the HMB user space memory of the user memory space.

[0052] S400: Perform a data integrity check on the memory data stored in the HMB user space memory.

[0053] Perform data integrity check on the memory data in the HMB user space memory to ensure that when the memory data is later mapped to the kernel memory space, it will not cause serious consequences such as system crashes.

[0054] S500: When the data integrity check is qualified, the memory data stored in the HMB user space memory is mapped to the HMB actual space memory of the kernel memory space.

[0055] S600, the SSD obtains memory data from the HMB actual space memory and updates it to the SSD controller, and the SSD is tested.

[0056] The present invention isolates the HMB user space memory of the user memory space and the HMB actual space memory of the kernel memory space, and adopts the method of verification and synchronous mapping, which ensures the test purposes such as HMB memory modification and injection error while ensuring that the reliability and stability of the entire test system operation are not affected. The test efficiency is greatly improved, the test time is reduced, and the additional interference factors caused by human operation are reduced. The accuracy and stability of the test are guaranteed.

[0057] Step S400 specifically includes: issuing instructions according to the test program, modifying and testing the user memory space according to the instructions; and verifying the address position of the user memory space, the size of the memory data block, and the content of the memory data.

[0058] Only after the integrity check succeeds, data mapping is performed between the user memory space and the kernel memory space to ensure that after the user memory space is modified, the actual HMB actual memory data mapped to the kernel memory space will not cause the kernel memory space to crash.

[0059] In one embodiment, before step S100, step S000 is further included, in which a HMB test of the solid state drive is initialized to determine the HMB memory size and memory location corresponding to the kernel memory space.

[0060] After the SSD initialization is completed, the memory size and memory location corresponding to the kernel memory space have been determined, and only then can the HMB feature test be performed.

[0061] See attached Figure 2 As shown, the HMB test initialization of the solid state drive specifically includes:

[0062] S11. Power on the solid state drive.

[0063] At this time, necessary initialization is performed on the solid state drive so that the solid state drive enters a working state.

[0064] S12: Send an identification command to the solid state drive to obtain first HMB information of the solid state drive.

[0065] The content of the identification reply includes HMB information defined in the NVMe specification, where the first HMB information includes two key parameters of HMB: HMB recommended value (HMPRE) and HMB minimum value (HMMIN). The HMB recommended value is the host memory capacity actually allocated to HMB, which provides the device with the optimal performance memory allocation. The HMB minimum value is the minimum memory allocation to ensure the normal operation of HMB. A value lower than this value may affect performance.

[0066] S13: Send an HMB shutdown command, and obtain the second HMB information when the solid state drive shuts down the HMB.

[0067] When the HMB off command is executed, that is, after the HMB is off, the HMB recommended value (HMPRE) and the HMB minimum value (HMMIN) of the second HMB information obtained by the host should be 0, indicating that the HMB function has been turned off and the related HMB information is invalid.

[0068] S14: Compare the first HMB information and the second HMB information, and determine whether the setting of the HMB function is supported.

[0069] Specifically, the HMB recommended value and HMB minimum value of the second HMB information are compared with the set threshold, and the change values ​​of the HMB recommended values ​​and HMB minimum values ​​of the first HMB information and the second HMB information are compared with the set range. When they are greater than the threshold and within the set range, it is determined that the HMB function is supported.

[0070] When it is determined that the HMB function is not supported, the self-test ends and fails.

[0071] S15. When the HMB function is supported, an HMB enable command is issued, and third HMB information when the solid state drive enables HMB is obtained.

[0072] S16. Determine whether the HMB of the solid state drive is turned on according to the third HMB information.

[0073] Specifically, the HMB recommended value and the HMB minimum value of the third HMB information are compared with a set threshold value, and when they are greater than the set threshold value, it is determined that the HMB of the solid state drive has been turned on.

[0074] When it is determined that it is not turned on, the self-test ends and the self-test fails.

[0075] S17, when enabled, allocates HMB actual space memory in the kernel memory space and sends the pointer address of the kernel memory space corresponding to the HMB actual space memory to the solid state drive.

[0076] At this point, the initialization of the solid state drive is completed. Only if the initialization is qualified, the subsequent functional test can be performed; if the initialization is unqualified, the subsequent steps S100-S600 will not be performed.

[0077] In one embodiment, see the attached Figure 3 As shown, the present invention also discloses a test system for the HMB characteristics of a solid state drive. The test method described above is adopted, and the test system includes a solid state drive and a host. The host includes a user memory space and a kernel memory space.

[0078] The user memory space is provided with a test management module, a user memory space management module, a mapping management module and an HMB user space memory.

[0079] The test management module is used to parse the test load parameters and test requirements and generate corresponding test programs.

[0080] The test management module stores the HMB test management program, which is the main entry program of the test program. The HMB test management program is the brain for implementing the HMB test and is the main logical control part of the HMB test.

[0081] A user memory space management module, wherein the user memory space management module generates required memory data according to the parsed test requirements and fills the memory data into the user memory space, and the user memory space management module simultaneously performs a data integrity check on the memory data in the user memory space.

[0082] The user memory space management module is used to access / modify / verify the memory mapping part of the user memory space. And simulate the test logic to ensure that after the user memory space memory is modified, the actual memory data of the HMB actual space memory mapped to the kernel memory space will not cause the kernel memory space to crash.

[0083] HMB user space memory, wherein memory data is stored in the HMB user space memory. The data in the HMB user space memory is synchronized with the actual memory data in the HMB actual space memory of the kernel memory space, and its main purpose is to isolate the data in the kernel memory space before modification.

[0084] In general, when we test HMB, we will first modify and verify the HMB user space memory. The HMB test manager will issue instructions to the user memory space management module, which is responsible for modifying and testing the HMB user space memory. The address location / memory data block size and memory data content of the HMB user space memory will be fully verified by the user memory space management module before being mapped and synchronized with the HMB actual space memory of the kernel memory space. This ensures the integrity of the memory data, so that the kernel state data will not crash due to misoperation and the system will not be able to run.

[0085] A mapping management module maps the memory data in the HMB user space memory to the HMB actual space memory of the kernel memory space after the integrity check is qualified.

[0086] The kernel memory space includes the HMB actual space memory, and the HMB actual space memory stores the memory data mapped by the mapping management module.

[0087] The solid state drive obtains memory data from the HMB actual space memory and updates it to the solid state drive controller, and the solid state drive is tested.

[0088] The system in this embodiment isolates the HMB user space memory of the user memory space and the HMB actual space memory of the kernel memory space, and synchronizes them after verification, which can ensure that the reliability and stability of the operation of the entire test system are not affected.

[0089] In one embodiment, the HMB test management program is used to implement the test functions of the HMB test, such as the following test functions:

[0090] 1).set_hmb(enable_flag): enable or disable HMB;

[0091] 2).hmb_get_info(): Get the current HMB information (list (address and size) of HMDLEC / HSIZE / HMDLA / hmb blocks);

[0092] 3).hmb_set_byte(block_id, offset, value): Modify the value of a certain offset in HMB in block_id;

[0093] 4).hmb_get_byte(block_id, offset): Get the value of a certain offset in HMB in block_id;

[0094] 5).hmb_set_block(block_id, buff_size_b, buff): sets the entire value of a HMB block in block_id to the value in buff;

[0095] 6).hmb_get_block(block_id, buff_size_b, buff): Get the value of a HMB block in block_id and put it into buff;

[0096] 7).hmb_clear_block(block_id): Set the HMB block data in block_id to 0;

[0097] 8).hmb_alloc(entry_size_list): allocates a specified number of HMB blocks with list (each block size must be 4k aligned and greater than 4k, less than or equal to 4M), and after allocation, maps HMB user space memory and kernel space;

[0098] 9).hmb_free(): release the allocated HMB actual space memory;

[0099] 10).get_hmb_b(offset): treat the allocated multiple HMB blocks as a whole continuous space and get the value at a certain offset;

[0100] 11).get_hmb_buffer(offset, buff, length): treat the allocated multiple HMB blocks as a whole continuous space, get the value of length bytes at a certain offset, and store it in buff;

[0101] 12).set_hmb_bitflip_b(offset, length): treat the allocated multiple HMB blocks as a whole continuous space and flip all the value bits at a certain offset;

[0102] 13).set_hmb_b(offset, value, count): treat the allocated multiple HMB blocks as a whole continuous space, and set the value of count bytes starting from offset to value;

[0103] 14).set_hmb_dw(offset, dw_value, count): treat the allocated multiple HMB blocks as a whole continuous space, and set the value of count dwords starting from offset to value.

[0104] In one embodiment, the host further includes an API interface, which is connected to the test management module and is used to load test scripts. The API interface summarizes the calling interface of the HMB test management program and is open to upper-level script calls. The test script can be implemented in Python language, Linux Shell tool or other test script languages. The tester only needs to call the HMB test API interface to implement the test function of HMB, and the tester does not need to perform complex memory management operations.

[0105] The API interface has the following features:

[0106] 1) Basic API functions:

[0107] Ensure to verify API accessibility and ensure that the API service can be accessed and responded normally. Whether the API request method works as expected. At the same time, verify the integrity of the API parameters and ensure that the parameters of the API request have the correct response, including missing parameters, invalid parameters, parameter ranges, etc.

[0108] 2) API data integrity verification

[0109] Data creation: whether the API can correctly create and return new data;

[0110] Data reading: whether the API can correctly read and return existing data;

[0111] Data update: whether the API can update existing data and return the correct response;

[0112] Data deletion: Whether the API can delete the specified data and return a correct response.

[0113] 3) Security of API data

[0114] Authentication and authorization: whether the API properly authenticates and authorizes requests;

[0115] Data protection: Whether the API has taken appropriate data encryption and protection measures.

[0116] 4) Performance and stress handling

[0117] Response time: The response time of the API under different loads;

[0118] Throughput: How many requests the API can handle in a given amount of time.

[0119] Concurrency testing: Multiple users access the API at the same time to test its performance.

[0120] 5) Error handling capabilities

[0121] Ensure that the API returns the correct error code and descriptive information. Ensure that the API supports retries and test whether its retry logic is correct. Test whether there is an appropriate degradation strategy to ensure service availability when problems occur in the API service.

[0122] 6) Recording and tracing during API transmission

[0123] Verify that API communications are logging enough information to facilitate troubleshooting if issues arise.

[0124] As for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the corresponding method embodiment, and it has the corresponding technical effects.

[0125] The present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0126] In this embodiment, if the real-time data verification test method of the solid state drive is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0127] The above implementation modes are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with this technology to understand the content of the present invention and implement it, and they cannot be used to limit the protection scope of the present invention. Any equivalent changes or modifications made according to the spirit of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for testing HMB characteristics of a solid state drive, characterized in that: The steps include: Loading a test script, wherein the test script includes test load parameters and test requirements; Analyze the test load parameters and test requirements, and generate corresponding test programs; Generate required memory data according to the parsed test requirements, and fill the memory data into the HMB user space memory of the user memory space; Performing a data integrity check on the memory data in the HMB user space memory; When the data integrity check is qualified, the memory data in the HMB user space memory is mapped to the HMB actual space memory of the kernel memory space; The solid state drive obtains memory data from the HMB actual space memory and updates the memory data to the solid state drive controller to test the solid state drive.

2. The method for testing the HMB characteristics of a solid state drive according to claim 1, wherein: Performing data integrity check on the memory data in the HMB user space memory specifically includes: Issue instructions according to the test program, and modify and test the HMB user space memory according to the instructions; The address position of the user memory space, the size of the memory data block and the content of the memory data are verified.

3. The method for testing the HMB characteristics of a solid state drive according to claim 1, wherein: Before the step of loading the test script, the HMB test initialization of the solid state drive is also included to determine the HMB memory size and memory location corresponding to the kernel memory space.

4. The method for testing the HMB characteristics of a solid state drive according to claim 3, wherein: The HMB test initialization of the solid state drive specifically includes: Powering on the solid state drive; Sending an identification command to the solid state drive to obtain first HMB information of the solid state drive; Sending an HMB shutdown command and obtaining second HMB information when the solid state drive shuts down the HMB; Comparing the first HMB information with the second HMB information, and determining whether the setting of the HMB function is supported; When the HMB function is supported, an HMB enable command is issued, and third HMB information when the solid state drive enables the HMB is obtained; Determining whether the HMB of the solid state drive has been turned on according to the third HMB information; When enabled, HMB actual space memory is allocated in the kernel memory space and a pointer address of the kernel memory space corresponding to the HMB actual space memory is sent to the solid state drive.

5. The method for testing the HMB characteristics of a solid state drive according to claim 4, characterized in that: The first HMB information, the second HMB information and the third HMB information all include an HMB recommended value and an HMB minimum value, wherein the HMB recommended value is to set the host memory capacity actually allocated to the HMB for use, and the HMB minimum value is the minimum memory allocation amount of the HMB to ensure normal operation.

6. The method for testing the HMB characteristics of a solid state drive according to claim 5, characterized in that: The comparing the first HMB information and the second HMB information and determining whether the setting of the HMB function is supported specifically includes: The HMB recommended value and HMB minimum value of the second HMB information are compared with the set threshold, and the change values ​​of the HMB recommended values ​​and HMB minimum values ​​of the first HMB information and the second HMB information are compared with the set range. When they are greater than the threshold and within the set range, it is determined that the HMB function is supported.

7. The method for testing the HMB characteristics of a solid state drive according to claim 5, characterized in that: The determining whether the HMB of the solid state drive has been turned on according to the third HMB information specifically includes: The HMB recommended value and the HMB minimum value of the third HMB information are compared with a set threshold value, and when they are greater than the set threshold value, it is determined that the HMB of the solid state drive has been turned on.

8. A test system for HMB characteristics of a solid state drive, characterized by: The test method according to any one of claims 1 to 6 is adopted, wherein the test system comprises a solid state drive and a host, wherein the host comprises a user memory space and a kernel memory space, wherein the user memory space is provided with: A test management module, the test management module is used to parse the test load parameters and test requirements and generate corresponding test programs; A user memory space management module, the user memory space management module generates required memory data according to the parsed test requirements, and the user memory space management module also performs data integrity check on the memory data in the user memory space; HMB user space memory, wherein memory data is stored in the HMB user space memory; A mapping management module, wherein after the integrity check is passed, the mapping management module maps the memory data in the user memory space to the HMB actual space memory of the kernel memory space; The solid state drive obtains memory data from the HMB actual space memory and updates the memory data to the solid state drive controller to test the solid state drive.

9. The solid state drive HMB characteristic testing system according to claim 8, characterized in that: The host also includes an API interface, which is connected to the test management module and is used to load a test script.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • SSD log recording method and system based on host memory and computer equipment

    CN111522679A

  • Performance test method and device covering HMB characteristics of solid state disk

    CN116701232A