HMB entry management method and solid state hard disk control system
By directly accessing the primary or secondary mapping table in the host memory buffer, the performance problem of DRAM-Less solid-state drives when reading mapping data is solved, faster access speeds are achieved, and the read performance of solid-state drives is improved.
Patent Information
- Application Number
- CN202110880087.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-02
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-08-02
AI Technical Summary
DRAM-Less solid-state drives need to access NAND Flash twice when reading mapped data, resulting in reduced read performance.
By directly accessing the primary or secondary mapping table in the host memory buffer (HMB), the physical address is obtained, thereby reducing access time overhead and improving read performance.
The table lookup time overhead is shortened and the read performance of the solid state drive is improved. In particular, the physical address can be obtained through one access to the HMB, which significantly improves the read speed.
Smart Images

Figure CN113590506B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of SSD mapping table management, and in particular to a table entry management method of an HMB and a control system of a solid state drive. Background Art
[0002] The Host Memory Buffer (HMB) function allows the SSD (Solid State Drive) main control chip to use the host DRAM like the DRAM (Dynamic Random Access Memory) on the SSD. That is, the host allocates a piece of memory (which may not be continuous in physical address) from its main memory for the SSD to use.
[0003] Currently, there are two designs of mainstream SSDs. One is with DRAM, which can be used to cache data and mapping tables. The other is without DRAM (i.e., DRAM-Less solution), in which the mapping table uses two-level mapping. The first-level mapping and a small amount of second-level mapping are stored in SRAM (Static Random-Access Memory), and the second-level mapping data is stored in NAND Flash. For the DRAM-Less solution, since most of its mapping tables are stored in NAND Flash, it needs to access Flash twice when performing random reads. The first time is to obtain the mapping table, and the second time is to actually read the user data. If the mapping data is stored in NAND Flash, it will take more time to read the mapping data, thereby reducing the read performance of the SSD. Summary of the invention
[0004] In view of the above problems, the purpose of the present invention is to provide a table entry management method of HMB and a control system of a solid-state hard disk, which adopts primary mapping or secondary mapping to directly access the HMB address of the physical address of the corresponding data in the HMB, thereby further reducing the time overhead caused by accessing the HMB.
[0005] According to one aspect of the present invention, there is provided a method for managing HMB entries, comprising: obtaining a logical address in a host operation instruction; accessing a primary mapping table according to the logical address and obtaining a secondary index address; accessing the host HMB according to the secondary index address to obtain a physical address; and performing corresponding data operations on a memory of a solid-state drive according to the physical address.
[0006] Optionally, accessing the first-level mapping table according to the logical address and obtaining the second-level index address includes: accessing the first-level mapping table in the SRAM chip of the solid-state drive according to the logical address; querying the first-level mapping table to obtain the physical address of the corresponding data at the second-level index address of the HMB.
[0007] Optionally, accessing the first-level mapping table according to the logical address and obtaining the second-level index address includes: performing a hash function on the logical address to obtain the first-level index address; accessing the first-level mapping table in the host HMB according to the first-level index address and obtaining the second-level index address.
[0008] Optionally, accessing the HMB to obtain the physical address according to the secondary index address includes: accessing a secondary mapping table in the host HMB according to the secondary index address, and querying the secondary mapping table to obtain the physical address.
[0009] According to another aspect of the present invention, a control system of a solid-state hard disk is provided, comprising: a host interface, connected to a host to receive operation instructions, the meta-information of the operation instructions including a logical address of user data; a controller, connected to a memory, performing data operations based on a physical address of the user data; a processor, connected to the host interface and the controller, wherein when the host accesses the solid-state hard disk, the processor obtains the logical address of the user data, searches a first-level mapping table according to the logical address to obtain a second-level index address, and accesses the HMB according to the second-level index address to obtain the physical address of the user data.
[0010] Optionally, the processor performs a hash function on the logical address to obtain a first-level index address, and searches a first-level mapping table according to the first-level index address.
[0011] Optionally, the processor searches a secondary mapping table according to the secondary index address to obtain a physical address of the user data.
[0012] Optionally, the method further includes: an SRAM chip, in which a first mapping table is stored.
[0013] Optionally, the SRAM chip includes a storage module and a link module, the storage module is used to store a primary mapping table, and the storage module establishes a connection with the host through the link module.
[0014] The HMB table entry management method provided by the present invention adopts a two-level mapping, which can first obtain the address of the first-level mapping table stored in the HMB from the logical address of the host operation instruction, and then obtain the logical address in the second-level mapping table according to the first-level mapping table. This address indicates the location of the corresponding data in the memory of the solid-state hard disk. Since the time used for table lookup in the host's HMB is much shorter than the time required for table lookup in the solid-state hard disk, the time overhead generated by table lookup during the entire operation process can be shortened, thereby improving the read performance of the solid-state hard disk.
[0015] Furthermore, a first-level mapping solution can be adopted, and the physical address of the corresponding data mapped in the HMB can be directly obtained through the first-level mapping table in the SRAM in the SSD. The number of accesses to the HMB is reduced from the original two accesses to one access, which greatly shortens the time overhead caused by querying the mapping table and further improves the read performance of the SSD. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The above and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:
[0017] Figure 1a An architectural diagram of a computer system according to an embodiment of the present invention is shown;
[0018] Figure 1b A flowchart of a method for managing HMB entries according to a first embodiment of the present invention is shown;
[0019] Figure 1c Show Figure 1b The mapping relationship between logical addresses and physical addresses in the computer system shown;
[0020] Figure 2a shows an architecture diagram of an HMB according to a second embodiment of the present invention;
[0021] Figure 2b A flow chart of an HMB entry management method according to a second embodiment of the present invention is shown. DETAILED DESCRIPTION
[0022] The present invention is described below based on embodiments, but the present invention is not limited to these embodiments. In the detailed description of the present invention below, some specific details are described in detail. It is possible for a person skilled in the art to fully understand the present invention without the description of these details. In order to avoid confusing the essence of the present invention, known methods, processes, and procedures are not described in detail. In addition, the drawings are not necessarily drawn to scale.
[0023] The flowcharts and block diagrams in the accompanying drawings illustrate the possible system frameworks, functions and operations of the systems, methods and devices of the embodiments of the present invention. The boxes on the flowcharts and block diagrams can represent a module, a program segment or just a piece of code, and the modules, program segments and codes are all executable instructions for implementing the specified logical functions. It should also be noted that the executable instructions for implementing the specified logical functions can be recombined to generate new modules and program segments. Therefore, the boxes and the order of the boxes in the accompanying drawings are only used to better illustrate the process and steps of the embodiments, and should not be used as a limitation on the invention itself.
[0024] The following terms are used below.
[0025] Address mapping: Mapping of logical addresses to physical addresses, the core function of the memory control system, which is the basis of many other modules.
[0026] The specific implementation of the present invention is further described in detail below in conjunction with the drawings and examples.
[0027] Figure 1a An architectural diagram of a computer system according to an embodiment of the present invention is shown; Figure 1b A flowchart of a method for managing HMB entries according to a first embodiment of the present invention is shown; Figure 1c Show Figure 1b The mapping relationship between logical addresses and physical addresses in the computer system is shown.
[0028] For DRAM-less SSDs, the host HMB (Host Memory Buffer) provides a mechanism that allows the solid-state drive (SSD) to use the free memory space on the host side of the host through the NVMe protocol. This memory space can replace DRAM and be used for L2P table access on the SSD side, thereby accelerating SSD performance while saving costs.
[0029] refer to Figure 1a The computer system of the embodiment of the present invention includes: a host 110, a control system 120 and a memory 130. The control system 120 and the memory 130 are both solid state hard disks, and the storage medium of the memory 130 is, for example, a flash memory chip array.
[0030] The host interface 121 of the control system 120 is connected to the host 110 to transmit instructions. The host interface 121 is, for example, SATA, M.2, mSATA and PCI-E. The processor 122 is connected to the host interface 121, the controller 124 and the SRAM chip 123. The SRAM chip 123 in the control system 120 can be used to store the L2P mapping table, for example. The processor 122 is used to implement the core software layer of memory control, namely FTL (Flash Translation Layer), so that the operating system and the file system can access the memory 130 like accessing a hard disk. The FTL also has the characteristics of supporting all SLC (Single Level Cell) and MLC (Multi-Level Cell), supporting bad block management, wear leveling, garbage collection, power-off recovery, write balancing technology, etc. The core function of the FTL is address mapping.
[0031] The memory 130 includes a flash memory chip array. In order to improve data read and write performance, the controller 124 of the control system 120 can read and write the flash memory chips of the memory 130 via multiple channels. Each channel is connected to a group of flash memory chips. Each flash memory chip includes multiple physical blocks, and each physical block includes multiple physical pages. Data access operations on the flash memory chip include reading, writing and erasing. Due to the physical characteristics of the flash memory chip, the basic unit of data operation is, for example, a physical page, and the basic unit of the erase operation is, for example, a physical block.
[0032] When the host 110 performs data operations, the control system 120 receives instructions from the host 110. The control system 120 maps the logical address in the instruction into a physical address, which is used to represent the location in the memory 130, including a channel, a physical block, and a physical page.
[0033] In the HMB of the host 110, a mapping table for mapping logical addresses to physical addresses is stored. The SSD obtains the corresponding physical address and performs corresponding operations according to the mapping table. Since the mapping table is stored on the host 110 side, and the time required to look up the table from the host side is less than the time required to look up the table from the solid state drive, the time overhead generated by the table lookup can be shortened, and the read performance of the SSD can be improved.
[0034] Figure 1b FIG. 1 is a flowchart of a method for managing an entry of an HMB according to a first embodiment of the present invention. In this embodiment, a read operation is used as an example to illustrate the method for managing an entry of an HMB. Figure 1a and Figure 1c , the method specifically comprises the following steps:
[0035] Step S01: Calculate the corresponding first-level index address according to the logical address.
[0036] In this step, the host 110 sends a read operation instruction to the solid-state drive (SSD), and the host interface 121 of the control system 120 receives the read operation instruction from the host 110. The read operation instruction includes at least the logical address of the read data, and the processor 122 calculates according to the obtained logical address to obtain the first-level index address corresponding to the logical address.
[0037] In this embodiment, a hash function is used to process the logical address to obtain a primary index address.
[0038] Step S02: search the first-level mapping table in the HMB according to the first-level index address as an index and obtain the second-level index address.
[0039] In this embodiment, the first-level index address points to the location of the first-level mapping table in the host HMB, so the first-level mapping table 10 can be found according to the first-level index address as an index. Further, the address of the second-level mapping table 20 is stored in the first-level mapping table 10, so the second-level index address pointing to the second-level mapping table 20 can be obtained by querying the first-level mapping table.
[0040] In this embodiment, reference Figure 1a In the HMB of the host, there are two areas, which are used to store the first-level mapping table 10 and the second-level mapping table 20 respectively. When the host sends an operation instruction to the SSD, the interface end of the SSD parses the first-level index address according to the logical address in the operation instruction.
[0041] Step S03: search the secondary mapping table in the HMB according to the secondary index address as an index and obtain the physical address.
[0042] In this embodiment, the secondary index address points to the location of the secondary mapping table in the host HMB, so the secondary mapping table 20 can be found according to the secondary index address as an index. Further, the physical address of the corresponding data in the memory 130 of the SSD is stored in the secondary mapping table 20, so the physical address pointing to the storage of the corresponding data can be obtained by querying the secondary mapping table.
[0043] Step S04: Read the required data from the memory according to the physical address.
[0044] In this embodiment, the physical address points to a location in the memory in the SSD, and therefore, a read operation can be performed on the corresponding information stored in the memory according to the physical address.
[0045] Further, refer to Figure 1c, the index of the first-level mapping table is the first-level index address calculated according to the logical address, and the content of the first-level mapping table is the second-level index address of the second-level mapping table. The index of the second-level mapping table is the second-level index address, and the content is the physical address of the corresponding data in the memory 130. In this embodiment, the mapping table is stored in the HMB of the host 110. When the SSD performs address mapping, compared with accessing the mapping table stored in the memory 130, accessing the mapping table stored in the HMB of the host 110 can find the physical address of the corresponding data more quickly, thereby realizing the corresponding data operation, thereby improving the performance of the SSD.
[0046] Among them, the control system 120 in the SSD calculates the first-level index address according to the logical address in the host data operation instruction, searches the first-level mapping table in the host HMB to obtain the second-level index address, and then searches the second-level mapping table in the host HMB based on the second-level index address to obtain the physical address of the data operation. The logical block address of the second-level index address in the first-level mapping table corresponds to the block address of the storage location of the second-level mapping table itself, and the block address of the physical address in the second-level mapping table corresponds to the block address of the user data storage in the SSD. Since the second-level mapping table is stored on a predetermined physical block in the host HMB, the logical block address of the first-level mapping table does not need to represent all block addresses of the entire host memory, but only needs to represent a specific block address of the entire host memory, thereby reducing the storage capacity requirement of the first-level mapping table. Furthermore, the control system 120 in the SSD performs corresponding data operations on the memory 130 via the controller 124 based on the physical address.
[0047] In this embodiment, a two-level mapping is adopted, and the address of the first-level mapping table stored in the HMB can be first obtained from the logical address of the host operation instruction, and then the logical address in the second-level mapping table is obtained according to the first-level mapping table. This address indicates the location of the corresponding data in the memory of the solid-state hard disk. Since the time used for table lookup in the host's HMB is much shorter than the time required for table lookup in the solid-state hard disk, the time overhead generated by table lookup during the entire operation process can be shortened, thereby improving the read performance of the solid-state hard disk.
[0048] Figure 2a shows an architecture diagram of an HMB according to a second embodiment of the present invention; Figure 2b FIG. 1 is a flowchart of a method for managing HMB entries according to a second embodiment of the present invention. Figure 2a and Figure 2b The specific steps of the flowchart of the HMB entry management method of the second embodiment of the present invention include:
[0049] Step S11: query the first-level mapping table according to the logical address and obtain the second-level index address.
[0050] In this step, the host 110 sends a read operation instruction to the solid-state drive (SSD), and the host interface 121 of the control system 120 receives the read operation instruction from the host 110, where the read operation instruction includes at least the logical address of the read data, and the processor 122 queries the first-level mapping table according to the obtained logical address, wherein the first-level mapping table is located in the SRAM of the solid-state drive, and since the memory of the SRAM is limited, the SRAM stores the storage address of the physical address of the corresponding data in the HMB, that is, querying the first-level mapping table can obtain the second-level index address, and the second-level index address points to the address in the HMB.
[0051] In this embodiment, reference Figure 1a and Figure 2a The first-level mapping table is stored in the SRAM chip 123 of the solid-state drive SSD, and the physical address of the data in the memory 130 of the solid-state drive is directly stored in the HMB of the host. In this way, the control system 120 of the solid-state drive can access the first-level mapping table in the SRAM chip 123 through the logical address in the host's operation instruction, and then directly access the physical address of the corresponding data stored in the HMB in the memory 130 of the solid-state drive.
[0052] In this embodiment, the SRAM chip 123 includes two parts, one part is a storage module for storing a primary mapping table, and the other part is a link module. Specifically, after accessing the primary mapping table, the address of the corresponding data in the HMB is accessed through the link module. In the SRAM chip 123, the storage module and the link module are both composed of multiple units, wherein the primary mapping table is stored in n units SLOT(0) to SLOT(n) of the storage module, and each unit SLOT stores a part of the content of the primary mapping table. The link module is also divided into m units HMB_ID0 to HMB_IDm, and n and m are both natural numbers greater than 1. Since the storage space of the SRAM chip 123 is limited, n of the storage module is greater than m, and the physical address stored in the HMB of the memory 130 is also divided into x address units DATAPHYSICAL ADDR SLOT(0) to DATA PHYSICAL ADDR SLOT(x). In the process of accessing HMB through the SRAM chip 123, the m units HMB_ID0~HMB_IDm in the link module first establish connection relationships with the m units SLOT in the storage module and the m address units in the HMB respectively. After the access is completed, the connection relationship is disconnected and the link relationship is re-established with the previously unconnected storage module unit SLOT and the address unit DATA PHYSICAL ADDR SLOT in the HMB, thereby realizing the access path between the SRAM chip 123 and the HMB.
[0053] Step S12: query the HMB according to the secondary index address and obtain the physical address.
[0054] In this embodiment, the secondary index address points to the location of the physical address stored in the host HMB, so the secondary mapping table 20 can be found based on the secondary index address as an index. Further, the physical address of the corresponding data in the memory 130 of the SSD is stored in the secondary mapping table 20, so the physical address pointing to the storage of the corresponding data can be obtained by querying the secondary mapping table.
[0055] Step S13: Read the required data from the memory according to the physical address.
[0056] In this embodiment, the physical address points to a location in the memory in the SSD, and therefore, a read operation can be performed on the corresponding information stored in the memory according to the physical address.
[0057] In this embodiment, a first-level mapping scheme is adopted, and the physical address of the corresponding data mapped in the HMB can be directly obtained through the first-level mapping table in the SRAM chip in the SSD. The number of accesses to the HMB is reduced from the original two accesses to one access, which greatly shortens the time overhead caused by querying the mapping table and further improves the read performance of the SSD.
[0058] According to the embodiments of the present invention as described above, these embodiments do not describe all the details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and changes can be made based on the above description. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can make good use of the present invention and the modified use based on the present invention. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. A method for managing HMB entries, applied to a DRAM-Less solid state drive, wherein the DRAM-Less solid state drive comprises an SRAM chip, It is characterized in that The SRAM chip includes a storage module and a link module, wherein n units in the storage module store a primary mapping table, and m units in the link module store a secondary index address, wherein n is greater than m, and both n and m are natural numbers greater than 1, including: Get the logical address in the host operation instruction; The m units in the link module respectively establish connection relationships with the m units in the storage module and the m address units in the host HMB; Accessing a primary mapping table of no more than m units in the storage module according to the logical address to obtain a secondary index address of no more than m units in the link module; Access the host HMB to obtain the physical address according to the secondary index address; The corresponding data operation is performed on the memory of the solid state drive according to the physical address.
2. The table entry management method according to claim 1, It is characterized in that The host HMB includes x address units, where x is a natural number greater than m. Accessing the host HMB to obtain a physical address according to the secondary index address includes: Access no more than m address units in the host HMB according to the secondary index addresses of no more than m units in the link module, and access physical addresses in the no more than m address units; After acquiring the physical address by accessing the m address units of the host connected to the m units in the link module according to the secondary index address, the method further comprises: The connection relationship is disconnected, and the m units in the link module re-establish a connection relationship with the units in the storage module and the host address unit that were not connected before.
3. A control system for a solid state hard disk, It is characterized in that The system comprises: A host interface, connected to a host to receive an operation instruction, wherein meta information of the operation instruction includes a logical address of user data; A controller, connected to the memory, performs data operations based on the physical address of the user data; A processor connected to the host interface and the controller, An SRAM chip, the SRAM chip comprising a storage module and a link module, n units in the storage module store a primary mapping table, and m units in the link module store a secondary index address, wherein n is greater than m, and both n and m are natural numbers greater than 1; Among them, when the host accesses the solid-state hard disk, the processor obtains the logical address of the user data, the m units in the link module respectively establish connection relationships with the m units in the storage module and the m address units in the host HMB, and the processor accesses the first-level mapping table of no more than m units in the storage module according to the logical address to obtain the second-level index address of no more than m units in the link module, and accesses the HMB according to the second-level index address to obtain the physical address of the user data.
4. The control system according to claim 3, It is characterized in that The processor searches the secondary mapping table in the host HMB according to the secondary index address to obtain the physical address of the user data.
5. The control system according to claim 3, It is characterized in that The host HMB includes x address units, where x is a natural number greater than m; The processor accesses a primary mapping table of no more than m units in the storage module according to the logical address to obtain a secondary index address of no more than m units in the link module; After the processor accesses the m address units of the host connected to the m units in the link module according to the secondary index address, the link module disconnects the connection relationship, and the m units in the link module re-establish a connection relationship with the units in the storage module that were not previously connected and the host address units.
Citation Information
Patent Citations
Controller, operating method thereof, and memory system including the same
CN111831579A
Method and device for realizing solid-state drive based on host memory buffer
CN112416819A
