Self-testing methods, devices, computer equipment, and storage media for solid-state drive (SSD) HMB storage space

By cooperating with the SSD, the HMB storage space is self-tested, which solves the stability and reliability issues of the HMB storage space in solid-state drives and improves the stability and performance of the firmware.

CN115168099BActive Publication Date: 2026-03-10SUZHOU UNIONMEMORY INFORMATION SYST LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-07
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing HMB storage space in solid-state drives has stability and reliability issues, affecting firmware performance and user experience.

Method used

The system obtains the HMB-related attributes of the SSD from the host, allocates and prepares the HMB descriptor, sends it to the SSD to configure the HMB-related registers, and performs a self-test through the registers. If the self-test passes, the SSD can be used normally; otherwise, an exception is handled.

Benefits of technology

It improves the stability of HMB storage space and reduces the probability of anomalies during firmware operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115168099B_ABST
    Figure CN115168099B_ABST
Patent Text Reader

Abstract

This invention relates to a self-testing method, apparatus, computer device, and storage medium for the HMB storage space of a solid-state drive (SSD). The method includes: a host acquiring HMB-related attributes of the SSD; the host allocating HMB storage space according to the HMB-related attributes and preparing an HMB descriptor; the host sending the HMB descriptor to the SSD, and the SSD configuring its own HMB-related registers according to the HMB descriptor; the SSD performing a self-test of the HMB storage space through the HMB-related registers; determining whether the HMB storage space self-test passes; if it passes, the firmware uses the HMB storage space normally; if it fails, the firmware performs abnormal handling on the HMB storage space. This invention uses the SSD to perform a self-test of the HMB storage space, thereby determining whether the HMB storage space can be used, thus reducing the probability of firmware anomalies during operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of self-testing technology for solid-state drive HMB storage space, and in particular to self-testing methods, devices, computer equipment, and storage media for solid-state drive HMB storage space. Background Technology

[0002] HMB, or Host Memory Buffer, is a memory region provided by the host for SSD use via the NVMe protocol. For DRAM-less SSDs, HMB plays an indispensable role in improving performance. However, due to the wide variety of physical interfaces on different host devices, various problems may arise when using SSD HMB.

[0003] Existing HMB application solutions rely on hardware HMB IP modules to verify HMB storage space. During the application of HMB storage space, the firmware verifies the stability and reliability of the HMB storage space. If the HMB storage space is unstable or unreliable, it will cause abnormalities in the operation of the firmware, thereby affecting the overall performance and user experience of the product. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of the prior art and provide a self-testing method, apparatus, computer equipment, and storage medium for solid-state drive (SSD) HMB storage space.

[0005] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0006] Firstly, this embodiment provides a self-testing method for the HMB storage space of a solid-state drive, including the following steps:

[0007] The host obtains the HMB-related attributes of the SSD;

[0008] The host allocates HMB storage space based on HMB-related attributes and prepares HMB descriptors;

[0009] The host sends the HMB descriptor to the SSD, and the SSD configures its own HMB-related registers according to the HMB descriptor;

[0010] SSDs perform self-tests of HMB storage space through HMB-related registers;

[0011] Determine if the HMB storage space self-test passes;

[0012] If the HMB storage space self-test passes, the firmware will use the HMB storage space normally.

[0013] If the self-test of the HMB storage space fails, the firmware will perform abnormal processing on the HMB storage space.

[0014] The further technical solution is as follows: In the step of the host obtaining the HMB-related attributes of the SSD, the HMB-related attributes include the memory page capacity size and the supported memory descriptor entry count size.

[0015] The further technical solution is as follows: In the step of the host allocating HMB storage space according to HMB related attributes and preparing HMB descriptors, the HMB descriptor refers to the information provided by the host to the solid-state drive, which describes the physical address of the HMB space allocated to the solid-state drive.

[0016] The further technical solution is as follows: In the self-test step of the SSD through the HMB related registers for the HMB storage space, the self-test of the HMB storage space includes the following steps:

[0017] The firmware writes the entire HMB storage space to the set value;

[0018] The firmware reads the value from the HMB storage space, i.e., reads the value;

[0019] Verify whether the read value is equal to the set value; if the read value is equal to the set value, the self-test passes; if the read value is not equal to the set value, the self-test fails.

[0020] Secondly, this embodiment provides a self-testing device for solid-state drive HMB storage space, including: an acquisition unit, an allocation preparation unit, a configuration distribution unit, a self-testing unit, a judgment unit, a usage unit, and an exception handling unit;

[0021] The acquisition unit is used by the host to acquire the HMB-related attributes of the SSD;

[0022] The allocation preparation unit is used by the host to allocate HMB storage space according to HMB related attributes and prepare HMB descriptors.

[0023] The configuration sending unit is used by the host to send the HMB descriptor to the SSD, and the SSD configures its own HMB-related registers according to the HMB descriptor.

[0024] The self-test unit is used by the SSD to perform a self-test of the HMB storage space through HMB-related registers;

[0025] The judgment unit is used to determine whether the self-test of the HMB storage space has passed;

[0026] The usage unit is used so that if the self-test of the HMB storage space passes, the firmware can use the HMB storage space normally.

[0027] The exception handling unit is used to perform exception handling on the HMB storage space if the self-test of the HMB storage space fails.

[0028] The further technical solution is as follows: In the acquisition unit, the HMB-related attributes include the memory page capacity size and the supported memory descriptor entry count size.

[0029] The further technical solution is as follows: In the allocation preparation unit, the HMB descriptor refers to the information provided by the host to the solid-state drive, which describes the physical address of the HMB space allocated to the solid-state drive.

[0030] The further technical solution is as follows: the self-test unit includes a writing module, a reading module and a verification module;

[0031] The writing module is used for the firmware to write the entire HMB storage space to the set value;

[0032] The reading module is used by the firmware to read the value of the HMB storage space, i.e., to read the value;

[0033] The verification module is used to verify whether the read value is equal to the set value; if the read value is equal to the set value, the self-test passes; if the read value is not equal to the set value, the self-test fails.

[0034] Thirdly, this embodiment provides a computer device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the self-testing method for the solid-state drive HMB storage space as described above.

[0035] Fourthly, this embodiment provides a storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor, can implement the self-testing method for the solid-state drive HMB storage space as described above.

[0036] The beneficial effects of this invention compared to the prior art are: by performing a self-test on the HMB storage space through the SSD, it can determine whether the HMB storage space can be used, thereby reducing the probability of firmware malfunctions during operation.

[0037] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. Attached Figure Description

[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0039] Figure 1A flowchart illustrating the self-test method for solid-state drive HMB storage space provided in this embodiment of the invention. Figure 1 ;

[0040] Figure 2 A flowchart illustrating the self-test method for solid-state drive HMB storage space provided in this embodiment of the invention. Figure 2 ;

[0041] Figure 3 A schematic diagram of a self-testing device for solid-state drive HMB storage space provided in an embodiment of the present invention. Figure 1 ;

[0042] Figure 4 A schematic diagram of a self-testing device for solid-state drive HMB storage space provided in an embodiment of the present invention. Figure 2 ;

[0043] Figure 5 A schematic block diagram of a computer device provided for an embodiment of the present invention. Detailed Implementation

[0044] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0045] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0046] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0047] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0048] Please see Figure 1 The specific embodiment shown in this invention discloses a self-testing method for the HMB storage space of a solid-state drive, comprising the following steps:

[0049] S1, The host obtains the HMB-related attributes of the SSD;

[0050] Specifically, in step S1, HMB-related attributes include memory page size and the number of supported memory descriptor entries.

[0051] S2, the host allocates HMB storage space according to HMB related attributes and prepares HMB descriptors;

[0052] Specifically, in step S2, the HMB descriptor refers to the information provided by the host to the solid-state drive (SSD) that describes the physical address of the HMB space allocated to the SSD.

[0053] Specifically, the allocation of HMB space to the SSD by the host is a host action, which the SSD cannot interfere with.

[0054] S3, the host sends the HMB descriptor to the SSD, and the SSD configures its own HMB-related registers according to the HMB descriptor;

[0055] Specifically, HMB-related registers include registers such as host memory descriptor list address, host memory buffer size, and host memory descriptor list entry count.

[0056] S4, the SSD performs a self-test of the HMB storage space through HMB-related registers;

[0057] Please see Figure 2 As shown, in step S4, the self-test of the HMB storage space includes the following steps:

[0058] S41, the firmware writes the entire HMB storage space to the set value;

[0059] Specifically, the firmware uses DMA to write the entire HMB memory space to the set value. DMA (Direct Memory Access) is a method that can quickly copy data from one address space to another. To speed up the HMB self-test process, this solution uses DMA to assist in data transfer. DWORD is a data type in programming languages, occupying 4 bytes.

[0060] Specifically, the settings include the values ​​0x55555555 and 0xaaaaaaaa.

[0061] S42, the firmware reads the value from the HMB storage space, i.e., reads the value;

[0062] Specifically, the firmware reads the value of the HMB storage space via DMA and then uses it for verification.

[0063] S43, check if the read value is equal to the set value; if the read value is equal to the set value, the self-test passes; if the read value is not equal to the set value, the self-test fails.

[0064] Specifically, using the formula (32-bit HMB address * 12345678) >> 16 + (32-bit HMB address * 12345678) << 16, a different value is written to each DWORD of the entire HMB storage space. Then, using the formula (32-bit HMB address * 12345678) >> 16 + (32-bit HMB address * 12345678) << 16, the value of each DWORD in the HMB storage space is verified.

[0065] The above formula is used to verify whether the read value is equal to the set value. If the read value is equal to the set value, the self-test passes; if the read value is not equal to the set value, the self-test fails.

[0066] S5, determine whether the HMB storage space self-test has passed;

[0067] S6. If the self-test of the HMB storage space passes, the firmware will use the HMB storage space normally.

[0068] Specifically, the firmware normally uses HMB storage space as a data cache.

[0069] S7. If the self-test of the HMB storage space fails, the firmware will perform abnormal processing on the HMB storage space.

[0070] Specifically, the firmware performs abnormal handling on the HMB storage space, and then HMB is not enabled on this power-on.

[0071] This invention performs a self-test on the HMB storage space using an SSD to determine whether the HMB storage space is usable, thereby reducing the probability of firmware malfunctions during operation.

[0072] Please see Figure 3 As shown, the present invention also discloses a self-testing device for solid-state drive HMB storage space, including: an acquisition unit 10, an allocation preparation unit 20, a configuration distribution unit 30, a self-testing unit 40, a judgment unit 50, a usage unit 60, and an exception handling unit 70.

[0073] The acquisition unit 10 is used by the host to acquire the HMB-related attributes of the SSD;

[0074] The allocation preparation unit 20 is used by the host to allocate HMB storage space according to HMB related attributes and prepare HMB descriptors.

[0075] The configuration sending unit 30 is used by the host to send the HMB descriptor to the SSD, and the SSD configures its own HMB-related registers according to the HMB descriptor.

[0076] The self-test unit 40 is used for the SSD to perform a self-test of the HMB storage space through the HMB-related registers;

[0077] The judgment unit 50 is used to determine whether the self-test of the HMB storage space has passed;

[0078] The usage unit 60 is used so that if the self-test of the HMB storage space passes, the firmware can use the HMB storage space normally.

[0079] The exception handling unit 70 is used to perform exception handling on the HMB storage space if the self-test of the HMB storage space fails.

[0080] In the acquisition unit 10, the HMB-related attributes include the memory page capacity size and the supported memory descriptor entry count size.

[0081] In the allocation preparation unit 20, the HMB descriptor refers to the information provided by the host to the solid-state drive, describing the physical address of the HMB space allocated to the solid-state drive.

[0082] Please see Figure 4 As shown, the self-testing unit 40 includes a writing module 41, a reading module 42, and a verification module 43;

[0083] The writing module 41 is used for the firmware to write the entire HMB storage space to a set value.

[0084] The reading module 42 is used for the firmware to read the value of the HMB storage space, i.e., to read the value;

[0085] The verification module 43 is used to verify whether the read value is equal to the set value; if the read value is equal to the set value, the self-test passes; if the read value is not equal to the set value, the self-test fails.

[0086] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the self-test device and each unit of the above-mentioned solid-state drive HMB storage space can be referred to the corresponding description in the foregoing method embodiments. For the sake of convenience and brevity, it will not be repeated here.

[0087] The self-testing device for the aforementioned solid-state drive HMB storage space can be implemented as a computer program, which can, for example... Figure 5It runs on the computer device shown.

[0088] Please see Figure 5 , Figure 5 This is a schematic block diagram of a computer device 500 provided in an embodiment of this application; the computer device 500 can be a terminal or a server, wherein the terminal can be an electronic device with communication functions such as a smartphone, tablet computer, laptop computer, desktop computer, personal digital assistant, and wearable device. The server can be a standalone server or a server cluster composed of multiple servers.

[0089] See Figure 5 The computer device 500 includes a processor 502, a memory, and a network interface 505 connected via a system bus 501. The memory may include a non-volatile storage medium 503 and internal memory 504.

[0090] The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions that, when executed, cause the processor 502 to perform a self-test method for the solid-state drive (HMB) storage space.

[0091] The processor 502 provides computing and control capabilities to support the operation of the entire computer device 500.

[0092] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can perform a self-test method for the solid-state drive HMB storage space.

[0093] This network interface 505 is used for network communication with other devices. Those skilled in the art will understand that... Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 500 to which the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0094] The processor 502 is used to run a computer program 5032 stored in the memory to perform the following steps:

[0095] Step S1: The host obtains the HMB-related attributes of the SSD;

[0096] Step S2: The host allocates HMB storage space according to HMB related attributes and prepares HMB descriptors;

[0097] Step S3: The host sends the HMB descriptor to the SSD, and the SSD configures its own HMB-related registers according to the HMB descriptor;

[0098] Step S4: The SSD performs a self-test of the HMB storage space through the HMB-related registers;

[0099] Step S5: Determine whether the self-test of the HMB storage space has passed;

[0100] Step S6: If the self-test of the HMB storage space passes, the firmware will use the HMB storage space normally.

[0101] Step S7: If the self-test of the HMB storage space fails, the firmware will perform abnormal processing on the HMB storage space.

[0102] It should be understood that in the embodiments of this application, the processor 502 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0103] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program includes program instructions and can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.

[0104] Therefore, the present invention also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions that, when executed by a processor, can implement the above-described self-test method for solid-state drive (HMB) storage space. The storage medium stores a computer program, which includes program instructions that, when executed by a processor, can implement the above-described method. The program instructions include the following steps:

[0105] Step S1: The host obtains the HMB-related attributes of the SSD;

[0106] Step S2: The host allocates HMB storage space according to HMB related attributes and prepares HMB descriptors;

[0107] Step S3: The host sends the HMB descriptor to the SSD, and the SSD configures its own HMB-related registers according to the HMB descriptor;

[0108] Step S4: The SSD performs a self-test of the HMB storage space through the HMB-related registers;

[0109] Step S5: Determine whether the self-test of the HMB storage space has passed;

[0110] Step S6: If the self-test of the HMB storage space passes, the firmware will use the HMB storage space normally.

[0111] Step S7: If the self-test of the HMB storage space fails, the firmware will perform abnormal processing on the HMB storage space.

[0112] The storage medium can be any computer-readable storage medium capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), magnetic disk, or optical disk.

[0113] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0114] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0115] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the device of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0116] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0117] The above embodiments are preferred implementations of the present invention. In addition, the present invention can be implemented in other ways. Any obvious substitutions without departing from the concept of the present technical solution are within the protection scope of the present invention.

Claims

1. A self-checking method for HMB storage space of a solid state disk, characterized in that, The method comprises the following steps: The host obtains HMB related attributes of the SSD; The host allocates HMB storage space according to the HMB related attributes and prepares an HMB descriptor; The host sends the HMB descriptor to the SSD, and the SSD configures its own HMB related registers according to the HMB descriptor; The SSD performs self-checking on the HMB storage space through the HMB related registers; It is judged whether the self-checking on the HMB storage space passes or not; If the self-checking on the HMB storage space passes, the firmware normally uses the HMB storage space; If the self-checking on the HMB storage space does not pass, the firmware performs abnormal processing on the HMB storage space; In the step of performing self-checking on the HMB storage space by the SSD through the HMB related registers, the self-checking on the HMB storage space comprises the following steps: The firmware writes a set value to the whole HMB storage space; The firmware reads the value of the HMB storage space, i.e. a read value; It is checked whether the read value is equal to the set value; if the read value is equal to the set value, the self-checking passes; if the read value is not equal to the set value, the self-checking does not pass; In the step of allocating the HMB storage space by the host according to the HMB related attributes and preparing the HMB descriptor, the HMB descriptor refers to information provided by the host to the SSD, describing the physical address of the HMB space allocated by the SSD.

2. The self-checking method of the solid state drive HMB storage space according to claim 1, characterized in that, In the step of obtaining the HMB related attributes of the SSD by the host, the HMB related attributes include the memory page capacity size and the supported memory descriptor entry count size.

3. A self-checking device for HMB storage space of a solid state disk, characterized in that, It comprises: An obtaining unit, an allocation and preparation unit, a sending and configuring unit, a self-checking unit, a judging unit, a using unit and an abnormal processing unit; The obtaining unit is used for obtaining HMB related attributes of the SSD by the host; The allocation and preparation unit is used for allocating HMB storage space by the host according to the HMB related attributes and preparing an HMB descriptor; The sending and configuring unit is used for sending the HMB descriptor to the SSD by the host, and configuring its own HMB related registers by the SSD according to the HMB descriptor; The self-checking unit is used for performing self-checking on the HMB storage space by the SSD through the HMB related registers; The judging unit is used for judging whether the self-checking on the HMB storage space passes or not; The using unit is used for normally using the HMB storage space by the firmware if the self-checking on the HMB storage space passes; The abnormal processing unit is used for performing abnormal processing on the HMB storage space by the firmware if the self-checking on the HMB storage space does not pass; The self-checking unit comprises a writing module, a reading module and a checking module; The writing module is used for writing a set value to the whole HMB storage space by the firmware; The reading module is used for reading the value of the HMB storage space by the firmware, i.e. a read value; The checking module is used for checking whether the read value is equal to the set value; if the read value is equal to the set value, the self-checking passes; if the read value is not equal to the set value, the self-checking does not pass; In the allocation and preparation unit, the HMB descriptor refers to information provided by the host to the SSD, describing the physical address of the HMB space allocated by the SSD.

4. The self-checking device for HMB storage space of solid state disk according to claim 3, characterized in that, In the obtaining unit, the HMB related attributes include the memory page capacity size and the supported memory descriptor entry count size.

5. A computer device, comprising: The computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the self-checking method of the HMB storage space of the solid state disk according to any one of claims 1-2 when executing the computer program.

6. A storage medium, characterized by The storage medium stores a computer program, the computer program comprises program instructions, and the program instructions can implement the self-checking method of the HMB storage space of the solid state disk according to any one of claims 1-2 when executed by a processor.

Citation Information

Patent Citations

  • Data processing

    CN108735267A