Solid state disk mapping management method and device, solid state disk and storage medium

By creating multiple namespaces in a solid-state drive and using different mapping algorithms, the problem of excessive storage overhead of mapping tables in super-large capacity SSDs is solved, and the memory usage and DRAM dependency is reduced while maintaining high performance.

CN120336209APending Publication Date: 2025-07-18HEFEI DATANG STORAGE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510510203.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-22
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

Traditional 4K mapping algorithms have excessive storage overhead for mapping tables in ultra-large capacity solid-state drives, resulting in increased DRAM dependence, high hardware implementation costs and difficult to meet compactness and energy efficiency requirements.

Method used

Create multiple namespaces in a solid-state drive, and use different mapping algorithms for each namespace. Select the appropriate namespace for storage according to the data type, and generate a mapping table.

Benefits of technology

Significantly reduce the memory occupied by mapping tables, reduce dependence on DRAM, and promote the practical development of super-large-capacity SSDs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120336209A_ABST
    Figure CN120336209A_ABST
Patent Text Reader

Abstract

The invention discloses a solid state disk mapping management method and device, a solid state disk and a storage medium, and the method comprises the steps: creating two or more namespaces, and determining the range of LBAs contained in the created namespaces and an adopted mapping algorithm; wherein one namespace adopts one mapping algorithm; the mapping algorithms adopted by the at least two namespaces are different; and when data is written, determining a namespace corresponding to the to-be-written data according to the received LBA of the to-be-written data and the range of the LBAs contained in different namespaces, and generating a mapping table according to a mapping algorithm adopted by the corresponding namespace. According to the scheme, the memory occupied by the mapping table can be remarkably reduced while high performance is kept.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to, but is not limited to, the field of storage technology, and in particular, to a method and apparatus for solid-state drive mapping management, a solid-state drive, and a storage medium. Background Art

[0002] In the design of solid-state drives (SSDs), the 4K mapping algorithm is a key technology widely used to improve random write performance. This algorithm adjusts the management unit of the flash translation layer to 4KB data blocks, thereby reducing read / write amplification and optimizing random access latency. Since the management granularity of the 4K mapping algorithm aligns with the common 4K I / O operations of the host file system, this technology can significantly improve the performance of SSDs in random write scenarios, especially suitable for application environments with high I / O loads such as databases and virtualization.

[0003] However, with the continuous increase in the capacity of solid-state drives, especially the popularization of artificial intelligence (AI) training and inference scenarios in recent years, ultra-large-capacity SSDs (such as dozens of terabytes or even hundreds of terabytes) have gradually become the mainstream of market demand. In this context, the limitations of the traditional 4K mapping algorithm are becoming increasingly prominent: (1) Excessive storage overhead of the mapping table: The size of the mapping table required by the 4K mapping algorithm grows linearly with the SSD capacity, usually occupying about one-thousandth of the storage capacity (e.g., a 1TB SSD requires 1GB of DRAM to store the mapping table). For ultra-large-capacity SSDs (such as 100TB), the mapping table needs to occupy up to 100GB of DRAM, which poses huge challenges in terms of physical space layout, power consumption control, and cost. (2) Hardware implementation is not feasible: Ultra-large-capacity DRAM (such as dozens of gigabytes) not only significantly increases the manufacturing cost of SSDs but also complicates the PCB design, making it difficult to meet the requirements of actual products for compactness and energy efficiency.

[0004] In the prior art, although the 4K mapping algorithm performs well in small-capacity or consumer-grade SSDs, its linear growth characteristic of storage overhead makes it unable to meet the needs of ultra-large-capacity SSDs in the AI era. Therefore, there is an urgent need for a new mapping management method that can significantly reduce the dependence on DRAM for the mapping table while maintaining high performance, thereby promoting the practical development of ultra-large-capacity SSDs. Summary of the Invention

[0005] The following is an overview of the subject matter described in detail in this article. This overview is not intended to limit the scope of protection of the claims.

[0006] The present application provides a solid-state drive mapping management method, apparatus, solid-state drive, and storage medium, which can significantly reduce the memory occupied by the mapping table while maintaining high performance, thereby reducing the dependence of the mapping table on DRAM, and thus promoting the practical development of ultra-large-capacity SSDs.

[0007] An embodiment of the present application provides a solid-state drive mapping management method, the method including: Create two or more namespaces, and determine the range of LBAs included in the created namespaces and the mapping algorithms used; wherein, one namespace uses one mapping algorithm; at least two namespaces use different mapping algorithms; When writing data, determine the namespace corresponding to the data to be written according to the LBA of the data to be written received and the range of LBAs included in different namespaces, and generate a mapping table according to the mapping algorithm used by the corresponding namespace.

[0008] An embodiment of the present application further provides a solid-state drive mapping management apparatus, including: a memory and a processor; the memory is used to store a program for solid-state drive mapping management; the processor is used to read the program for solid-state drive mapping management and execute the solid-state drive mapping management method according to any embodiment of the present application.

[0009] An embodiment of the present application further provides a solid-state drive, and the mapping table of the solid-state drive is established by using the solid-state drive mapping management method according to any embodiment of the present application.

[0010] An embodiment of the present application further provides a non-transitory computer-readable storage medium, the computer-readable storage medium stores a computer program, wherein the computer program can implement the solid-state drive mapping management method according to any embodiment of the present application when executed by a processor.

[0011] Compared with the related art, a solid-state drive mapping management method, apparatus, solid-state drive, and storage medium provided by an embodiment of the present application create two or more namespaces in the solid-state drive, determine the range of LBAs included in the created namespaces and the mapping algorithms to be used, and ensure that one namespace uses one mapping algorithm and at least two namespaces use different mapping algorithms. In this way, when writing data, the namespace corresponding to the data to be written can be determined according to the LBA of the data to be written received and the range of LBAs included in different namespaces, and a mapping table can be generated according to the mapping algorithm used by the corresponding namespace. Compared with the solid-state drive that only uses the 4KB mapping algorithm in the prior art, the solid-state drive in this embodiment uses multiple different mapping algorithms to create different namespaces, so that an appropriate namespace can be selected for storage according to the data type. In this way, while maintaining high performance, the memory occupied by the mapping table can be significantly reduced, thereby reducing the dependence of the mapping table on DRAM, and thus promoting the practical development of ultra-large-capacity SSDs.

[0012] Other features and advantages of the present application will be described in the following specification, and, in part, will become apparent from the specification or will be understood by implementing the present application. Other advantages of the present application can be realized and obtained through the solutions described in the specification and the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The accompanying drawings are used to provide an understanding of the technical solutions of the present application, and constitute a part of the specification. They are used together with the embodiments of the present application to explain the technical solutions of the present application, and do not constitute a limitation to the technical solutions of the present application.

[0014] Figure 1 It is a brief flowchart of the solid-state drive mapping management method according to the embodiment of the present application; Figure 2 It is a schematic diagram of the solid-state drive mapping management apparatus according to the embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0015] The present application describes multiple embodiments, but the description is exemplary rather than restrictive, and it is obvious to those of ordinary skill in the art that there can be more embodiments and implementation solutions within the scope of the embodiments described in the present application. Although many possible feature combinations are shown in the accompanying drawings and discussed in the detailed description, many other combination ways of the disclosed features are also possible. Unless specifically restricted, any feature or element of any embodiment can be combined with any other feature or element in any other embodiment, or can replace any other feature or element in any other embodiment.

[0016] This application includes and contemplates combinations with features and elements known to those of ordinary skill in the art. The disclosed embodiments, features, and elements of this application can also be combined with any conventional features or elements to form unique inventive solutions. Any feature or element of any embodiment can also be combined with features or elements from other inventive solutions to form another unique inventive solution. Therefore, it should be understood that any feature shown and / or discussed in this application can be implemented alone or in any suitable combination. Therefore, the embodiments are not subject to other limitations except those made in accordance with the appended claims and their equivalents. In addition, various modifications and changes can be made within the scope of the appended claims.

[0017] In addition, when describing representative embodiments, the specification may have presented the method and / or process as a particular sequence of steps. However, to the extent that the method or process does not depend on the particular order of the steps described herein, the method or process should not be limited to the particular order of steps described. As will be understood by those of ordinary skill in the art, other step orders are possible. Therefore, the particular order of steps set forth in the specification should not be construed as a limitation on the claims. In addition, the claims directed to the method and / or process should not be limited to performing their steps in the order written, as those skilled in the art can readily understand that these orders can vary and still remain within the spirit and scope of the embodiments of this application.

[0018] The following are the explanations of some identifiers mentioned in this application: LCA: Logical Cluster Address, logical cluster address; LBA: Logical Block Address, logical block address (the address seen by the host); PPA: Physical Page Address, physical page address (the actual storage location of the flash memory).

[0019] The following is a brief introduction to some content related to this application: A solid-state drive is a new type of storage device that has significant advantages such as large capacity, high reliability, fast read and write speeds, shock and drop resistance, low power consumption, and no noise compared with traditional mechanical hard drives. With these characteristics, solid-state drives have been widely used in the fields of consumer-grade PCs and enterprise-level servers.

[0020] Solid state drives are mainly composed of three core components: a solid state drive controller, a flash memory array, and a DRAM cache. Among them: (1) The solid state drive controller is responsible for data management and transmission control. (2) The flash memory array consists of multiple flash memory chips (NAND Flash Dies), and its architecture has a high degree of parallelism: multiple Dies form multiple channels and multiple banks, and read and write operations can be executed concurrently between different channels and banks; each Die consists of multiple blocks, and each block consists of multiple pages; the physical area size used to store user data in each page is 16KB. (3) The DRAM cache is mainly used to store the mapping table inside the solid state drive and the temporary storage of read and write data.

[0021] When writing or reading data stored in a solid state drive, the channel and bank of the flash memory array are first determined, and then the block and page are determined. When the system application writes data to the solid state drive, it depends on the upper layer application to access the data segment number LBA in the logical space of the solid state drive. The solid state drive controller will convert the LBA into LCA inside. In general application scenarios, the size of LBA is 512 Byte. According to different mapping methods inside the solid state drive, the size of LCA is also different. If the 4K mapping method is adopted inside the solid state drive, the size of LCA is 4096 Byte; if the 16K mapping method is adopted inside the solid state drive, the size of LCA is 16384 Byte. When the 4K mapping method is adopted, the LCA0 data is the data set of LBA0~LBA7; when the 16K mapping method is adopted, the LCA0 data is the data set of LBA0~LBA 31 data set.

[0022] During the data access process, the solid state drive controller needs to perform multi-level address conversion: first convert the LBA accessed by the system application into LCA, and then map the LCA to the physical address PPA of the flash memory array (i.e., the channel, bank, block, and page where the data is stored). The mapping relationship between LCA and PPA constitutes the mapping table from the logical space data segment address of the solid state drive to the physical address of the flash memory array. When the system reads data from the flash memory, first convert the requested LBA into the corresponding LCA, then find the PPA according to the LCA in the mapping table (i.e., the actual location where the data is stored in the flash memory storage array), read the data from the flash memory array according to the PPA, and return the data to the upper layer application.

[0023] In the technology of solid-state drives based on NVMe (Non-Volatile Memory Express), a namespace is a collection of logical block addresses (LBAs) accessible by host software. A namespace is not an isolation of physical storage units, but an isolation of the host-addressable storage space achieved through logical partitioning. There are many reasons for host software to decompose an NVMe SSD into multiple namespaces, such as logical isolation and multi-tenant support, security isolation (supporting independent encryption), selective write protection, and optimizing write performance and durability by using overprovisioning, etc.

[0024] An embodiment of this application provides a method for managing solid-state drive mapping, as Figure 1 shown, the method may include the following steps: Step S110: Create two or more namespaces, and determine the range of LBAs included in the created namespaces and the mapping algorithms used; wherein, one namespace uses one mapping algorithm; the mapping algorithms used by at least two namespaces are different; Step S120: When writing data, determine the namespace corresponding to the data to be written according to the LBA of the data to be written received and the range of LBAs included in different namespaces, and generate a mapping table according to the mapping algorithm used by the corresponding namespace.

[0025] The method for managing solid-state drive mapping in this embodiment creates two or more namespaces in the solid-state drive, determines the range of LBAs included in the created namespaces and the mapping algorithms used, and ensures that one namespace uses one mapping algorithm and the mapping algorithms used by at least two namespaces are different. In this way, when writing data, the namespace corresponding to the data to be written can be determined according to the LBA of the data to be written received and the range of LBAs included in different namespaces, and a mapping table can be generated according to the mapping algorithm used by the corresponding namespace. Compared with the solid-state drive that only uses the 4KB mapping algorithm in the prior art, the solid-state drive in this embodiment uses multiple different mapping algorithms to create different namespaces, so that the appropriate namespace can be selected for storage according to the data type (for example, writing continuous data into the namespace using the mapping algorithm with high granularity, and writing random data into the namespace using the mapping algorithm with low granularity). In this way, while maintaining high performance, the memory occupied by the mapping table can be significantly reduced, thereby reducing the dependence of the mapping table on DRAM, and thus promoting the practical development of ultra-large-capacity SSDs.

[0026] It should be noted that compared with the 4KB mapping algorithm, the 16KB mapping algorithm is a high-granularity mapping algorithm, and the 4KB mapping algorithm is a low-granularity mapping algorithm.

[0027] Exemplarily, taking the 4KB mapping algorithm and the 16KB mapping algorithm as examples, it is explained why, compared with a solid-state drive that only uses the 4KB mapping algorithm in the prior art, the present embodiment using multiple different mapping algorithms to create different namespaces can reduce the memory occupied by the mapping table. For example, for a solid-state drive with a capacity of 1TB, the size of the DRAM space occupied by the mapping table formed by the 4K mapping algorithm is 1GB, and the size of the DRAM space occupied by the mapping table formed by the 16K mapping algorithm is 1GB / 4 = 256MB. Then, in the case where the solid-state drive of the present embodiment includes two namespaces created by the 4KB mapping algorithm and the 16KB mapping algorithm, the size of the DRAM space occupied by the mapping table of the solid-state drive of the present embodiment is 256MB - 1GB (excluding endpoints).

[0028] In an exemplary embodiment, generating a mapping table according to the mapping algorithm adopted by the corresponding namespace may include: Determining a mapping granularity according to the mapping algorithm adopted by the corresponding namespace; Dividing the LBA of the data to be written into different LCAs according to the mapping granularity, and generating a corresponding PPA for each LCA respectively; Generating a mapping table according to the corresponding relationship between the LCA and the PPA.

[0029] Wherein, the mapping granularity refers to the number of consecutive LBAs included in the LCA in the namespace adopting the algorithm corresponding to the mapping granularity.

[0030] For the solid-state drive mapping management method of the present embodiment, for namespaces created by different mapping algorithms in the solid-state drive, the mapping granularity is determined according to the mapping algorithm adopted by the corresponding namespace; furthermore, the LBA of the data to be written can be divided into different LCAs according to the mapping granularity, and a corresponding PPA is generated for each LCA respectively; then, a mapping table can be generated according to the corresponding relationship between the LCA and the PPA. Through this solution, writing the data to be written into namespaces created by different mapping algorithms and generating a mapping table are realized. This solution significantly reduces the memory occupied by the mapping table while maintaining high performance.

[0031] In an exemplary embodiment, dividing the LBA of the data to be written into different LCAs according to the mapping granularity includes: According to the mapping granularity, divide the LBA of the data to be written into different LCAs in a manner corresponding to the type of the data to be written; the types include random data and sequential data.

[0032] In the SSD mapping management method of this embodiment, for random data and sequential data, the LBA of the data to be written is divided into different LCAs in a manner corresponding to the type of the data to be written, which can achieve writing sequential data into a namespace using a high-granularity mapping algorithm and writing random data into a namespace using a low-granularity mapping algorithm. In this way, while maintaining high performance, the memory occupied by the mapping table can be significantly reduced, thereby reducing the dependence of the mapping table on DRAM, and thus promoting the practical development of ultra-large-capacity SSDs.

[0033] In an example of this embodiment, when the data to be written is sequential data, the step of dividing the LBA of the data to be written into different LCAs according to the mapping granularity in a manner corresponding to the type of the data to be written includes: starting from the first LBA of the data to be written, using the mapping granularity as the division interval, dividing the LBA of the data to be written into different groups, and generating a corresponding LCA according to each LBA group; When the data to be written is random data, the step of dividing the LBA of the data to be written into different LCAs according to the mapping granularity in a manner corresponding to the type of the data to be written includes: starting from the first LBA of the data to be written, using the mapping granularity as the division interval, determining the range of LBAs included in each LCA; and dividing each LBA in the data to be written into the corresponding LCA according to the range of LBAs included in each LCA.

[0034] The SSD mapping management method of this example determines the division methods of the LBA and LCA of the data to be written in the cases where the data to be written is sequential data and the data to be written is random data, and further determines the generation method of the mapping table.

[0035] In an exemplary embodiment, the mapping algorithms include a 4KB mapping algorithm and a 16KB mapping algorithm; when the mapping algorithm adopted by the corresponding namespace is the 16KB mapping algorithm, the mapping granularity is 32; when the mapping algorithm adopted by the corresponding namespace is the 4KB mapping algorithm, the mapping granularity is 8.

[0036] The SSD mapping management method of this embodiment, the SSD includes namespaces created by two methods of a 4KB mapping algorithm and a 16KB mapping algorithm, and determines the mapping granularities corresponding to these two namespaces.

[0037] In an example of this embodiment, when the data to be written is continuous data and the mapping algorithm adopted by the corresponding namespace is a 16KB mapping algorithm, the step of dividing the LBAs of the data to be written into different LCAs according to the mapping granularity includes: starting from the first LBA of the data to be written, dividing the LBAs of the data to be written into different groups at an interval of 32 in the mapping granularity, and generating a corresponding LCA according to each LBA group; When the data to be written is random data and the mapping algorithm adopted by the corresponding namespace is a 4KB mapping algorithm, the step of dividing the LBAs of the data to be written into different LCAs according to the mapping granularity includes: starting from the first LBA of the data to be written, determining the range of LBAs included in each LCA at an interval of 8 in the mapping granularity; dividing each LBA in the data to be written into the corresponding LCA according to the range of LBAs included in each LCA; In an example of this embodiment, when the data to be written is continuous data and the mapping algorithm adopted by the corresponding namespace is a 4KB mapping algorithm, the step of dividing the LBAs of the data to be written into different LCAs according to the mapping granularity includes: starting from the first LBA of the data to be written, dividing the LBAs of the data to be written into different groups at an interval of 8 in the mapping granularity, and generating a corresponding LCA according to each LBA group; When the data to be written is random data and the mapping algorithm adopted by the corresponding namespace is a 16KB mapping algorithm, the step of dividing the LBAs of the data to be written into different LCAs according to the mapping granularity includes: starting from the first LBA of the data to be written, determining the range of LBAs included in each LCA at an interval of 32 in the mapping granularity; dividing each LBA in the data to be written into the corresponding LCA according to the range of LBAs included in each LCA.

[0038] The solid-state drive mapping management method of this example illustrates the implementation method of dividing the LBAs of different types of data to be written (random data and sequential data) into LCAs in the case where the solid-state drive includes namespaces created by two methods: 4KB mapping algorithm and 16KB mapping algorithm. In addition, it also illustrates that the solid-state drive of this application divides the LBAs of the data to be written into different LCAs according to the mapping granularity in a manner corresponding to the type of the data to be written (or in other words, writes the data to be written into different types of namespaces according to the mapping granularity in a manner corresponding to the type of the data to be written), that is, writes sequential data into the namespace using the mapping algorithm with high granularity, and writes random data into the namespace using the mapping algorithm with low granularity. In this way, it is possible to significantly reduce the memory occupied by the mapping table while maintaining high performance as much as possible. However, in order to maintain the flexibility of the namespace, this application does not limit that only "sequential data is written into the namespace using the mapping algorithm with high granularity, and random data is written into the namespace using the mapping algorithm with low granularity". For example, in the case where the user specifies the namespace into which the data to be written is to be written (such as specifying the namespace into which the data to be written is to be written according to the service type), the data to be written can be written into the corresponding namespace according to the method of this example.

[0039] In an exemplary embodiment, when the data to be written is random data and the mapping algorithm adopted by the corresponding namespace is the 16KB mapping algorithm, after dividing each LBA in the data to be written into the corresponding LCA according to the range of LBAs included in each LCA, it further includes: For any LCA, when this LCA is written for the first time, directly generate a PPA corresponding to this LCA; when this LCA is not written for the first time, obtain the PPA corresponding to this LCA and obtain the value of the unfilled LBA in this LCA, fill the value of the unfilled LBA into the corresponding position of this LCA, and generate the corresponding PPA according to the filled LCA.

[0040] The solid-state drive mapping management method of this embodiment performs special writing processing for this method in the case where the data to be written is random data and the mapping algorithm adopted by the corresponding namespace is the 16KB mapping algorithm, because the LBAs corresponding to random data may not fill the LCA, so as to ensure the correctness of data writing.

[0041] The following is a specific example of the solid-state drive mapping management method of the embodiment of this application, which may include the following steps: Step S210: Create namespaces, including: creating corresponding numbers of namespaces according to the number of namespaces supported by the ultra-large-capacity solid-state drive, the total physical capacity of the ultra-large-capacity solid-state drive, and the I / O load characteristics of the upper-layer user application.

[0042] Exemplarily, the range of the user-visible capacity LBA of the ultra-large-capacity solid-state drive is from LBA0 to LBA t , and at the same time, the ultra-large-capacity solid-state drive supports creating 2 namespaces. Then, two namespaces can be created, namely namespace_1 and namespace_2. Among them, the size of namespace_1 is from LBA0 to LBA t / 2 , which is mainly used to receive continuous data written by the application; the size of namespace_2 is from LBA t / 2+1 to LBA t , which is mainly used to receive random data written by the application; and format namespace_1 to adopt a 16KB mapping algorithm and format namespace_2 to adopt a 4KB mapping algorithm.

[0043] It should be noted that the present application does not limit the size and number of the created namespaces. On the basis of not exceeding the maximum capacity of the solid-state drive, the size and number of the namespaces can be determined by the user of the solid-state drive according to their own business needs. Exemplarily, when creating a certain namespace, the user of the solid-state drive can specify the mapping algorithm used by the namespace in the creation instruction for creating the namespace.

[0044] Step S220: When writing data, determine the namespace corresponding to the data to be written according to the LBA value of the received data to be written and the range of LBAs included in different namespaces, and generate a mapping table according to the I / O load characteristics of the data to be written and the mapping algorithm adopted by the corresponding namespace.

[0045] Exemplarily, still taking the creation of two namespaces, namespace_1 and namespace_2, in step S210 as an example for specific illustration, it can include the following four cases: (1) In the first case, when the upper-layer application writes continuous data to namespace_1, such as writing from LBA0 to LBA 255 , the following steps S2211 - step S2212 can be included: Step S2211: Determine that the mapping granularity is 32 according to the 16KB mapping algorithm adopted by namespace_1. When the solid-state drive controller receives a command to write to namespace_1, convert LBA0 to LBA 255 to LCA 0|(0<<31) ~LCA 7|(0<<31) ; where 0 in (0<<31) is the ID number of namespace_1 (i.e., namespace ID, and namespace ID is also called NSID, which is the identifier for the controller to access the namespace).

[0046] Step S2212: The solid-state drive controller generates corresponding PPA according to the LCA 0|(0<<31) ~LCA 7|(0<<31) in the logical space of namespace_1 i ~PPA i+7 ; where i is an integer.

[0047] After the above steps S2211 and S2212, the solid-state drive controller generates a mapping table <LCA 0|(0<<31) , PPA i >, <LCA 1|(0<<31) , PPA i+1 >, ……, <LCA 7|(0<<31) , PPA i+7 > in the DRAM inside the solid-state drive.

[0048] (2) In the second case, when the upper-layer application writes random data to namespace_2, such as writing LBA0 to LBA7, LBA 32 ~LBA 39 , LBA 80 ~LBA 87 , the following steps S2221 - S2222 can be included: Step S2221: Determine that the mapping granularity is 8 according to the 4KB mapping algorithm adopted by namespace_2. When the solid-state drive controller receives a command to write to namespace_2, convert LBA0 to LBA7 to LCA 0|(1<<31) , LBA 32 ~LBA 39 to LCA 4|(1<<31) , LBA 80 ~LBA 87 to LCA 10|(1<<31) ; where 1 in (1<<31) is the ID number of namespace_2.

[0049] Step S2222: The solid-state drive controller generates corresponding PPAs according to the LCAs in the namespace_2 logical space 0|(1<<31) LCAs 4|(1<<31) LCAs 10|(1<<31) to generate corresponding PPAs z PPAs z+1 PPAs z+2 ; where z is an integer.

[0050] After the above steps S2221 and S2222, the solid-state drive controller generates a mapping table <LCA 0|(1<<31) , PPA z >、<LCA 4|(1<<31) , PPA z+1 >、<LCA 10|(1<<31) , PPA z+2 > in the DRAM inside the solid-state drive.

[0051] (3) In the third case, when the upper-layer application writes continuous data to namespace_2, such as writing LBA0 to LBA 255 , the following steps S2231 - S2232 can be included: Step S2231: Determine that the mapping granularity is 8 according to the 4KB mapping algorithm adopted by namespace_2. When the solid-state drive controller receives a command to write to namespace_2, convert LBA0 to LBA 255 to LCA 0|(1<<31) to LCA 31|(1<<31) according to the mapping granularity 8; where 1 in (1<<31) is the ID number of namespace_2.

[0052] Step S2232: The solid-state drive controller generates corresponding PPAs 0|(1<<31) to 31|(1<<31) according to the LCAs in the namespace_2 logical space y to y+31 ; where y is an integer.

[0053] After the above steps S2231 and S2232, the solid-state drive controller generates a mapping table <LCA 0|(1<<31) , PPA y >, <LCA 1|(1<<31) , PPA y+1 >, ……, <LCA 31|(1<<31) , PPA y+31 > in the DRAM inside the solid-state drive.

[0054] (4) In the fourth case, when the upper-layer application writes random data to namespace_1, such as writing to LBA0~LBA7, LBA 32 ~LBA 39 , LBA 80 ~LBA 87 , the following steps S2241 - S2242 can be included: Step S2241: Determine that the mapping granularity is 32 according to the 16KB mapping algorithm adopted by namespace_1. When the solid-state drive controller receives a command to write to namespace_1, convert LBA0~LBA7 to LCA 0|(0<<31) , LBA 32 ~LBA 39 to LCA 1|(0<<31) , LBA 80~LBA87 to LCA 2|(0<<31) ; where 0 in (0<<31) is the ID number of namespace_1.

[0055] Step S2242: The solid-state drive controller looks up the mapping table according to the LCA 0|(0<<31) in the logical space of namespace_1 to obtain <LCA 0|(0<<31) , PPA m .

[0056] a. If LCA 0|(0<<31) is written for the first time, then PPA m is 0xffffffff. At this time, the solid-state drive controller generates the corresponding PPA j , and PPA j is the specific physical address written to the flash array by LCA 0|(0<<31) ; b. If LCA 0|(0<<31) is not written for the first time, then PPA m is the specific physical address where the previous LCA 0|(0<<31) was written to the flash array. The solid-state drive controller reads 16KB of data from the flash array according to PPA m . This 16KB of data corresponds to the write data of the previous LBA0~LBA 31 ; The solid-state drive controller overwrites the position where the previous LBA0~LBA7 data is located in the 16KB data with the write data of the current LBA0~LBA7 to form new 16KB data (that is, this new 16KB data is composed of the write data of the current LBA0~LBA7 and the write data of the previous LBA8~LBA 31 ); After that, the solid-state drive controller generates the corresponding new PPA j , PPAj That is the LCA 0|(0<<31) The specific physical address written to the flash memory array, the write flash memory array PPA j The 16KB data is the newly formed 16KB data; c. LCA 1|(0<<31) 、LCA 2|(0<<31) The processing flow refers to the above LCA 0|(0<<31) processing process.

[0057] After the above steps S2241 and S2242, the solid-state drive controller generates a mapping table <LCA 0|(0<<31) , PPA j > in the DRAM inside the solid-state drive, <LCA 1|(0<<31) , PPA j+1 >, <LCA 2|(0<<31) , PPA j+2 .

[0058] In summary, the solid-state drive mapping management method of this embodiment can adopt different mapping algorithms for different I / Os in different ranges of logical space according to the I / O load characteristics of the data written by the user, and can effectively reduce the size of the mapping table of the ultra-large-capacity solid-state drive without affecting performance, thereby reducing the dependence of the mapping table on the DRAM, and thus promoting the practical development of the ultra-large-capacity SSD.

[0059] An embodiment of the present application also provides a solid-state drive mapping management device, as Figure 2 shown, including: a memory and a processor; The memory is used to store a program for solid-state drive mapping management; The processor is used to read the program for solid-state drive mapping management and execute the solid-state drive mapping management method as described in any embodiment of the present application.

[0060] An embodiment of the present application also provides a solid-state drive, and the mapping table of the solid-state drive is established by using the solid-state drive mapping management method as described in any embodiment of the present application.

[0061] An embodiment of the present application also provides a non-transitory computer-readable storage medium, and the computer-readable storage medium stores a computer program, wherein the computer program can implement the solid-state drive mapping management method as described in any embodiment of the present application when executed by a processor.

[0062] In summary, the present application implements a solid-state drive mapping management method, apparatus, solid-state drive, and storage medium. This solution logically divides the user space of an ultra-large-capacity solid-state drive, creates different namespaces corresponding to different logical spaces, and uses different mapping algorithms on different namespaces (logical spaces); according to the characteristics of the host write data I / O load, that is, to determine whether the application writes of the host are mainly sequential writes or random writes, and then writes different application load data to different namespaces. Since the mapping algorithms used in different namespaces are different, the sizes of the generated mapping tables are naturally different. Therefore, compared with the solid-state drives that only use the 4KB mapping algorithm in the prior art, this solution uses different mapping algorithms in different ranges of logical spaces according to the I / O load characteristics of the user-written data, and can effectively reduce the size of the mapping table of the ultra-large-capacity solid-state drive without affecting performance.

[0063] Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and apparatuses, can be implemented as software, firmware, hardware, and their appropriate combinations. In the hardware implementation, the division between the functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component can have multiple functions, or a function or step can be executed by several physical components in cooperation. Some or all components can be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium). As is well known to those of ordinary skill in the art, the term "computer storage medium" includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media include but are not limited to RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, a communication medium generally contains computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery medium.

[0064] In the description of this specification, the description with reference to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of this application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0065] Although the embodiments of this application have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limitations on this application. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.

Claims

1. A method for managing solid-state drive mapping, characterized in that The method includes: Create two or more namespaces, and determine the range of LBAs included in the created namespaces and the mapping algorithms adopted; wherein, one namespace adopts one mapping algorithm; the mapping algorithms adopted by at least two namespaces are different; When writing data, determine the namespace corresponding to the data to be written according to the LBA of the data to be written received and the range of LBAs included in different namespaces, and generate a mapping table according to the mapping algorithm adopted by the corresponding namespace.

2. The solid state drive mapping management method according to claim 1, wherein The generating a mapping table according to the mapping algorithm adopted by the corresponding namespace includes: Determine the mapping granularity according to the mapping algorithm adopted by the corresponding namespace; Divide the LBA of the data to be written into different LCAs according to the mapping granularity, and generate a corresponding PPA for each LCA respectively; Generate a mapping table according to the correspondence between LCA and PPA.

3. The solid state drive mapping management method according to claim 2, wherein The dividing the LBA of the data to be written into different LCAs according to the mapping granularity includes: Divide the LBA of the data to be written into different LCAs according to the mapping granularity in a manner corresponding to the type of the data to be written; the types include random data and continuous data.

4. The solid-state drive mapping management method according to claim 3, wherein: When the data to be written is continuous data, the dividing the LBA of the data to be written into different LCAs according to the mapping granularity in a manner corresponding to the type of the data to be written includes: starting from the first LBA of the data to be written, using the mapping granularity as the division interval, dividing the LBAs of the data to be written into different groups, and generating a corresponding LCA according to each LBA group.

5. The solid-state drive mapping management method according to claim 3, wherein: When the data to be written is random data, the dividing the LBA of the data to be written into different LCAs according to the mapping granularity in a manner corresponding to the type of the data to be written includes: starting from the first LBA of the data to be written, using the mapping granularity as the division interval, determining the range of LBAs included in each LCA; dividing each LBA in the data to be written into the corresponding LCA according to the range of LBAs included in each LCA.

6. The solid state drive mapping management method according to any one of claims 2-5, characterized in that The mapping algorithms include 4KB mapping algorithm and 16KB mapping algorithm; when the mapping algorithm adopted by the corresponding namespace is 16KB mapping algorithm, the mapping granularity is 32; when the mapping algorithm adopted by the corresponding namespace is 4KB mapping algorithm, the mapping granularity is 8.

7. The solid-state drive mapping management method according to claim 5, wherein When the data to be written is random data and the mapping algorithm adopted by the corresponding namespace is 16KB mapping algorithm, after dividing each LBA in the data to be written into the corresponding LCA according to the range of LBAs included in each LCA, it further includes: For any LCA, when the LCA is written for the first time, directly generate a PPA corresponding to the LCA; when the LCA is not written for the first time, obtain the PPA corresponding to the LCA and obtain the value of the unfilled LBA in the LCA, fill the value of the unfilled LBA into the corresponding position of the LCA, and generate a corresponding PPA according to the filled LCA.

8. A solid-state drive mapping management device, comprising: A memory and a processor, characterized in that: The memory is used to store a program for solid-state drive mapping management; The processor is used to read the program for solid-state drive mapping management and execute the solid-state drive mapping management method according to any one of claims 1 to 7.

9. A solid-state drive, characterized in that, The mapping table of the solid-state drive is established by using the solid-state drive mapping management method according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium storing a computer program, wherein, When the computer program is executed by the processor, it can implement the solid-state drive mapping management method according to any one of claims 1 to 7.