Data writing method and storage device

By determining the NAND Flash storage area type based on the data type to be written and switching appropriately, the storage efficiency problem caused by the performance differences of different Pages is solved, and data processing efficiency and system performance are improved.

CN111488122BActive Publication Date: 2025-01-10HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010186905.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2017-10-25
Publication Date
2025-01-10
Estimated Expiration
2037-10-25

AI Technical Summary

Technical Problem

The existing NAND Flash storage devices have low processing efficiency when storing application data with different processing requirements. This is mainly due to the different performance of storage data in different pages, which makes the storage devices unable to effectively meet the data storage needs of different applications.

Method used

By receiving a write command carrying the data type to be written, the storage area type is determined according to the data type, and the data is written to a suitable storage area, including SLC, MLC, TLC, QLC and other areas. If there is no idle Page, the low performance will be switched to The area is a high-performance area, which improves resource utilization and data writing efficiency.

Benefits of technology

It improves data processing efficiency and system performance, meets the storage needs of different applications, and enhances the reliability and resource utilization of data writing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111488122B_ABST
    Figure CN111488122B_ABST
Patent Text Reader

Abstract

The present application provides a data writing method and storage device. The method is applied to a solid-state storage device SSD, and the method includes: receiving a write command, the write command carries the type of data to be written; according to the type of the data to be written, determining the type of storage area in the SSD where the data to be written is written, the SSD includes multiple types of storage areas; according to the type of the storage area, determining the target storage area where the data to be written is written; and writing the data to be written into the target storage area. The embodiments of the present application can improve the efficiency of data processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and more specifically, to a data writing method and a storage device. Background Art

[0002] With the continuous development of storage technology, solid state drives (SSDs) using NAND Flash as storage media have gradually become the mainstream storage form. NAND Flash is a non-volatile random access storage medium, which is characterized by the fact that data does not disappear after power failure.

[0003] Currently, NAND Flash stores data in multiple blocks in the order of reception to improve concurrency. Data is randomly stored in each page within a block. However, due to the different performance of storing data in different pages, for example, pages can be divided into three types: least significant bit LSB page, center significant bit CSB page, most significant bit MSB page, and the performance of LSB page, CSB page, and MSB page decreases in turn.

[0004] Therefore, the current storage method makes the storage device have low processing efficiency when storing data of applications with different processing requirements. Summary of the invention

[0005] The present application provides a data writing method and a storage device, which can improve the efficiency of data processing.

[0006] In a first aspect, a data writing method is provided, the method comprising: receiving a write command, the write command carrying the type of data to be written; determining the type of storage area in an SSD into which the data to be written is written according to the type of the data to be written, the SSD comprising multiple types of storage areas; determining a target storage area into which the data to be written is written according to the type of the storage area; and writing the data to be written into the target storage area.

[0007] The storage device receives a write command carrying the type of data to be written, and determines the type of storage area to write the data to be written according to the type of the data to be written, and then determines the target storage area to write the data to be written according to the type of the storage area. In this way, the storage device can store the data in a suitable storage area, that is, the storage device can meet the different needs of applications, improve data processing efficiency, and improve system performance.

[0008] In some possible implementations, the SSD stores a correspondence between data types and storage area types, and determining the type of storage area in the SSD into which the data to be written is written based on the type of the data to be written includes: determining the type of the target storage area into which the data to be written is written based on the type of the data to be written and the correspondence.

[0009] The storage device can determine the type of the target storage area to which the data to be written is to be written according to the correspondence between the data type and the storage area type, as well as the type of the data to be written, thereby further improving the efficiency of writing data into the storage device.

[0010] In some possible implementations, the SSD includes a plurality of storage blocks, and the SSD is divided into different types of storage areas according to types of storage blocks, and the corresponding relationship is a corresponding relationship between data types and types of storage blocks.

[0011] The storage device can determine the type of the target storage block to which the data is to be written based on the correspondence between the data type and the storage block type, as well as the type of the data to be written, thereby improving the efficiency of writing data to the storage device and the reliability of data writing.

[0012] In some possible implementations, the SSD includes multiple storage blocks, each storage block includes at least one type of storage page, and the SSD is divided into different types of storage areas according to the type of storage page, and the correspondence is a correspondence between the data type and the type of the storage page.

[0013] The storage device can determine the type of the target storage page where the data to be written is written based on the correspondence between the data type and the storage page type, as well as the type of the data to be written, thereby improving at least one of the read latency, write latency, and read / write reliability.

[0014] In some possible implementations, different types of storage pages correspond to a storage list respectively, and each storage list records a type of storage page; determining the target storage area for writing the data to be written according to the type of the storage area includes: according to the type of the storage page, finding an available storage page in the storage list corresponding to the storage page type as the target storage area; if there is an available storage page in the storage list, using the available storage page as the target storage area; if there is no available storage page in the storage list, obtaining a free storage block in the SSD, and using the first storage page of the free storage block as the target storage area.

[0015] The storage device can be compatible with the writing method of the traditional solution in which the Block writes data in the order of the Page, thereby improving the reliability of data writing to the storage device while being compatible with the traditional solution.

[0016] In some possible implementations, the SSD includes at least two of an SLC area, an MLC area, a TLC area, and a QLC area, and the performance of the SLC area, the MLC area, the TLC area, and the QLC area decreases in sequence. Before determining a target storage area for writing the data to be written according to the type of the storage area, the method further includes: if none of the storage blocks in the storage area corresponding to the type of the storage area in the SSD where the data to be written is written includes a free storage page, converting the type of at least one block including free storage pages in the storage area having a performance lower than the type of the storage area in the SSD where the data to be written is written to the same type as the type of the storage area in the SSD where the data to be written is written.

[0017] If the storage area of ​​the type of storage area in the SSD into which the data is to be written does not contain a block that includes an available free page, the storage device can switch the block in the MLC area, TLC area or QLC area to the block in the SLC area, that is, the storage device can switch the block in the low-performance storage area to the block in the higher-performance storage area, thereby avoiding waste of idle resources in the high-performance priority storage area and improving the resource utilization of the storage device.

[0018] In some possible implementations, the storage block includes at least two of an LSB page, a CSB page, and the MSB page, and the performance of the LSB page, the CSB page, and the MSB page decreases in sequence, and determining the target storage area for writing the data to be written according to the type of the storage area includes: if the storage area of ​​the type of the storage area in the SSD where the data to be written is written is the MSB page or the CSB page, and there is no available storage page in the storage area of ​​the type of the storage area in the SSD where the data to be written is written, determining at least one available storage page having a higher performance than that corresponding to the type of the storage area in the SSD where the data to be written is written as the target storage area.

[0019] When there is no free available Page in the Page corresponding to the low-performance Page type, the storage device can determine a free available Page with higher performance as the target storage area, thereby avoiding waste of free resources of the high-performance available Page and improving resource utilization of the storage device.

[0020] In a second aspect, a storage device is provided, the storage device comprising a module for executing the method in the first aspect or any possible implementation manner of the first aspect.

[0021] In a third aspect, a storage device is provided, the storage device comprising: a processor, a memory, and a communication interface. The processor is connected to the memory and the communication interface. The memory is used to store instructions, the processor is used to execute the instructions, and the communication interface is used to communicate with other network elements under the control of the processor. When the processor executes the instructions stored in the memory, the execution causes the processor to execute the method in the first aspect or any possible implementation of the first aspect.

[0022] According to a fourth aspect, a computer storage medium is provided, in which a program code is stored, wherein the program code is used to indicate instructions for executing the method in the first aspect or any possible implementation of the first aspect.

[0023] In a fifth aspect, a system chip is provided, which includes an input and output interface, at least one processor, at least one memory and a bus, wherein the at least one memory is used to store instructions, and the at least one processor is used to call instructions of the at least one memory to perform operations of the methods in the above aspects.

[0024] Based on the above scheme, the storage device receives a write command carrying the type of data to be written, and determines the type of storage area to write the data to be written according to the type of the data to be written, and then determines the target storage area to write the data to be written according to the type of the storage area, so that the storage device can store the data in a suitable storage area, that is, the storage device can meet the different needs of applications, improve data processing efficiency, and improve system performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 is a schematic diagram of the structure of a floating gate transistor;

[0026] Figure 2 This is a schematic diagram of the LUN structure;

[0027] Figure 3 It is a schematic diagram of the characteristics of different storage cells in NAND Flash;

[0028] Figure 4 It is a schematic diagram of the level distribution of different storage units in Block;

[0029] Figure 5 It is a schematic diagram of the sharing relationship of Page in a Block;

[0030] Figure 6 This is a schematic diagram of current NAND Flash data storage;

[0031] Figure 7 is a schematic flow chart of a data writing method according to an embodiment of the present application;

[0032] Figure 8 is a mapping relationship table between bit values ​​and delays in an embodiment of the present application;

[0033] Fig. 9 is a schematic diagram of data storage according to an embodiment of the present application;

[0034] Fig.10 is a schematic diagram of reading data according to another embodiment of the present application;

[0035] Fig.11 is a schematic flow chart of a data writing method according to another embodiment of the present application;

[0036] Fig.12 is a schematic diagram of a data writing method according to another embodiment of the present application;

[0037] Fig.13 is a schematic diagram of a data writing method according to another embodiment of the present application;

[0038] Fig.14 is a schematic block diagram of a storage device according to an embodiment of the present application;

[0039] Fig.15 It is a schematic structural diagram of a storage device according to an embodiment of the present application. DETAILED DESCRIPTION

[0040] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0041] With the continuous development of storage technology, solid state disks (SSDs) with NAND Flash as storage media have gradually become the mainstream storage form. NAND Flash is a non-volatile random access storage medium with the characteristics of data not disappearing after power failure, large capacity, fast read and write speed, and suitable for large-capacity data storage. The performance of SSD has made a qualitative leap compared to the performance of hard disk drives (HDDs) with traditional magnetic media. Specifically, the number of commands that SSD can process per second reaches hundreds of thousands.

[0042] The current mainstream NAND Flash is based on a floating gate transistor design, which latches charge through the floating gate. The charge is stored in the floating gate and can still be maintained when there is no power supply. Figure 1 is a schematic diagram of the basic structure of a floating gate transistor, such as Figure 1As shown, NAND Flash is a dual-gate transistor design, including a source, a drain, a gate, a floating gate, a silicon substrate and an insulating layer. The floating gate is located between the gate and the silicon substrate and is separated by an insulating layer, which can be composed of oxygen-nitrogen-oxygen or silicon dioxide (SiO2). The floating gate transistor can form a charge potential well for storing charge, and the floating gate records information by latching the charge.

[0043] The floating gate transistor can use whether there is charge stored on the floating gate or the amount of charge stored to obtain the threshold voltage of the transistor, and the threshold voltage of the transistor obtained can be used to represent the data information. A floating gate transistor corresponds to a unit (cell) of NAND Flash. The process of writing data to the cell (programming process) is the process of injecting charge into the charge potential well. NAND Flash uses FN tunneling (Fowler Nordheim Tunneling) to charge the floating gate through the silicon base layer. However, before programming NAND Flash, the original data must be erased first. The erasing process is to release the charge in the floating gate through the FN tunneling effect.

[0044] When the NAND Flash is erased, there is no charge in the cell and the threshold voltage read is a low level, for example, it can be represented by the data "1"; after programming, charge is injected into the cell and the threshold voltage read is a high level, which can be represented by the data "0".

[0045] Block is the smallest unit that NAND flash can perform erase operations on. It is usually composed of multiple pages. Page is the smallest unit that can perform programming and read operations. It is usually 4KB / 8KB / 16KB in size. Figure 2 As shown in Figure 1, Cell is the smallest operation erase / write / read unit in Page, corresponding to a floating gate transistor, and can store 1 bit or more bits.

[0046] The operations of reading and writing data in NAND Flash mainly involve erasing, programming (or writing) and reading. Among them, the basic operation unit of programming and reading is Page, and the basic operation unit of erasing is Block.

[0047] In the embodiment of the present application, the storage area in the NAND Flash can be divided into single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC) and quad-level cell (QLC) according to the different bit data stored in the cell. Storage areas with different structures will also be different in terms of performance and reliability. For example, Figure 3 The storage areas of the different structures shown are in terms of read rate, write rate, erase rate, number of erase and write cycles, data retention capability, cost, density and operating current.

[0048] Specifically, SLC stores only 1 bit of data, that is, the charge in the floating gate is divided into two levels corresponding to 0 and 1 to represent 1 bit of information, such as Figure 4 As shown. Usually, the erasure number of SLC is 50K or 100K times, and it has the characteristics of long life, fast performance and high price. MLC can store 2 bits of data, with a large data density, and can represent 2 information bits through the four levels corresponding to 00, 01, 10, and 11 in the floating gate. Usually, the erasure number of MLC is about 3K, and it has the characteristics of low life, slow performance and low price. TLC can store 3 bits of data, with a higher data density, and can represent 3 information bits through the eight levels corresponding to 000, 001, 010, 011, 100, 101, 110, and 111 in the floating gate. Usually, the erasure number of TLC is several hundred times, and it has the characteristics of low life, slow performance and low price. QLC can store 4 bits of data, and the 4 information bits can be represented by the sixteen levels corresponding to 0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, and 1111 in the floating gate. Usually, the performance of QLC is weaker than that of TLC.

[0049] In 16nm MLC, most of the time, three pages in a block share a set of storage space, such as Figure 5As shown in the figure, Page 48, Page 49 and Page 112 share a set of storage space. Pages that share a set of storage space can be divided into three types. Page 48 corresponds to the least significant bit LSB Page, Page 49 corresponds to the central significant bit CSB Page, and Page 112 corresponds to the most significant bit MSB Page. Among them, the read latency of LSB Page is 40us and the data retention capability is the strongest, the read latency of CSB Page is 70us and the data retention capability is the second, and the read latency of MSB Page is 112us and the data retention capability is weaker.

[0050] Currently, NAND Flash stores data in multiple blocks in the order in which it is received to improve concurrency. Figure 6 As shown, NAND Flash stores data in the order in which it receives data, namely, write commands (CMD) 1, CMD2, and CMD3. Data is randomly stored in each Page within the Block. However, due to the different performance of storing data in different Pages, the current storage method makes the storage device have low processing efficiency when storing data of applications with different processing requirements.

[0051] Figure 7 A schematic flow chart of a data writing method according to an embodiment of the present application is shown. The method comprises:

[0052] 701. A storage device receives a write command sent by an upper layer application. The write command carries the type of data to be written.

[0053] The storage device in the embodiment of the present application is an SSD including NAND Flash.

[0054] The storage device communicates with the host where the upper layer application is located through the Non-Volatile Memory Express (NVMe) protocol. The write command defined by the NVMe protocol will carry the type of data to be written. In this embodiment, the type of data to be written is identified by the write latency requirement for the write request. Specifically, Figure 8As shown in FIG. 1 , a write latency field is defined in the NVMe write command. The write latency field defines different latency requirements. 00b, 01b, 10b and 11b are used to identify the latency requirements of the write command, where 00b indicates that the write request does not require latency (No latency information provided), that is, the application has no requirements for the length of time to write data, 01b indicates that the write request can accept a longer latency (Longer latency acceptable), that is, the application can accept a longer time to write data, 10b indicates a typical latency, that is, the application requires the length of time to write data to be a more common length of time, and 11b indicates the shortest possible latency, that is, the application requires a shorter length of time to write data. When the upper-layer application issues a command, one of the latency requirements can be selected to indicate the type of data to be written.

[0055] It should be noted that the write command also carries the logical address of the data to be written and the length of the data to be written.

[0056] 702. The storage device determines the type of storage area into which the data to be written is written according to the type of the data to be written carried in the write command.

[0057] In one embodiment, the storage device may determine the type of the target storage area where the data to be written is to be written according to the type of the data to be written and the correspondence between the type of data stored in the SSD and the type of the storage area.

[0058] Specifically, the storage device may directly determine the target storage area for the data to be written, or may indirectly determine the target storage area for the data to be written, according to the type of the data to be written and the corresponding relationship.

[0059] For example, if the type of the data to be written exists in the corresponding relationship, the type of the storage area corresponding to the type of the data to be written in the corresponding relationship can be determined as the type of the target storage area. If the type of the data to be written does not exist in the corresponding relationship, the type of the storage area corresponding to other types similar to the type of the data to be written can be determined as the type of the target storage area.

[0060] Optionally, different storage area types may include different bits for storing data in blocks included in storage areas.

[0061] For example, the storage area can be a single-layer storage unit SLC area for storing two bits of data, or a multi-layer storage unit MLC area for storing four bits of data, or a three-layer storage unit TLC area for storing eight bits of data, or a four-layer storage unit QLC area for storing 16 bits of data.

[0062] It should be understood that the storage area may also be other storage areas for storing data with a bit size greater than 16 bits, and this application does not limit this.

[0063] In another embodiment, the SSD includes a plurality of storage blocks, and the SSD is divided into different types of storage areas according to the types of the storage blocks, and the corresponding relationship is a corresponding relationship between the data type and the type of the storage block.

[0064] Specifically, the storage device includes different types of storage areas, and different types of storage areas have different storage performances. In the storage device, the mapping relationship between the data type of the data to be written and the type of the storage block can be pre-set. For example, the type of the storage block corresponding to 00b in the write latency field can be set to the SLC storage area, the type of the storage block corresponding to 01b can be set to the MLC storage area, the type of the storage block corresponding to 10b can be set to the TLC storage area, and the type of the storage block corresponding to 11b can be set to the QLC area. In this way, when the storage device receives the write command, the type of the storage block to which the data to be written can be determined according to the type of the data to be written in the write command.

[0065] For example, an SSD may include at least one of an SLC storage area, an MLC storage area, a TLC storage area, and a QLC storage area. All cells included in a Block may be of the same type, and the same type of Blocks form a type of storage area, for example, multiple SLC-type Blocks form an SLC storage area, multiple MLC-type Blocks form an MLC storage area, and TLC-type Blocks form a TLC storage area.

[0066] like Fig. 9 As shown, the application in the host stores the data to be written in the storage area of ​​the SSD. The storage area can be divided into four levels of areas: SLC area, MLC area, TLC area and QLC area.

[0067] It should be noted that the performance of the SLC area, MLC area, TLC area and QLC area can be divided according to data processing efficiency, reliability, etc. For example, if the SLC area has the highest data processing efficiency compared to the other three types of areas, it can be considered that the performance of this area is the highest.

[0068] It should be understood that in the following embodiments, the storage area divided according to the block unit may be referred to as a “Block storage area”.

[0069] 703 : Determine a target storage area for writing the to-be-written data according to the type of the storage area.

[0070] After determining the type of storage area where the data to be written is written, a free area in the storage area of ​​the corresponding type can be selected to write the data to be written. For example, at least one free block Block in the block storage area of ​​the type of storage area in the SSD where the data to be written is written is used as the target storage area.

[0071] Optionally, if there is no free block in the storage area of ​​the type of the storage area in the SSD where the data to be written is written, the storage device may convert the Block type in other types of storage areas into a type consistent with the Block included in the storage area of ​​the type of the storage area in the SSD where the data to be written is written.

[0072] For example, the MLC area, TLC area, or QLC area can switch some blocks to SLC type blocks, thereby improving storage performance.

[0073] Optionally, the storage device may reduce the storage capacity of some blocks in the MLC area, TLC area or QLC area, thereby improving the storage performance of these blocks. For example, the storage device may reduce the storage capacity of some blocks in the MLC area, and then convert these blocks into SCL type blocks.

[0074] 704 , the storage device writes the data to be written into the target storage area.

[0075] Optionally, after determining the target storage area, the storage device may return confirmation information to the application. The application may send the data to be written to the storage device, and after receiving the data to be written, the storage device stores the data to be written in the target storage area.

[0076] Optionally, the storage device may also receive a read command, where the read command is used to request to read data and the read command carries the type of data requested to be read, and determines a scheduling type of the data requested to be read according to the type of the data.

[0077] Specifically, the storage device places the read command into different scheduling queues according to the type of data carried by the read command, wherein the storage device preferentially schedules data of a high priority type, and stores the data of a high priority type in a storage area of ​​a high priority type, thereby shortening the read response time and further meeting application requirements.

[0078] For example, Fig.10 As shown, if the priority level type of the data carried by read command 8 and read command 1 is a high priority type, the priority level type of the data carried by read command 2 and read command 3 is a medium priority type, and the priority level type of the data carried by read command 5 and read command 0 is a low priority type, then the storage device can prioritize reading command 8 and read command 1, followed by reading command 2 and read command 3, and finally scheduling reading command 5 and read command 0.

[0079] Therefore, in the data writing method of the embodiment of the present application, the storage device receives a write command carrying the type of data to be written, and determines the type of storage block to write the data to be written according to the type of the data to be written, and then determines the target storage block to write the data to be written according to the type of the storage block. In this way, the storage device can store the data in a suitable storage block, that is, the storage device can meet the different needs of applications, thereby improving data processing efficiency and system performance.

[0080] Fig.11 A schematic flow chart showing a data writing method according to another embodiment of the present application.

[0081] 1101. A storage device receives a write command sent by an upper layer application. The write command carries the type of data to be written.

[0082] It should be understood that the implementation of this step may be the same as step 701 in the above embodiment, and will not be described here to avoid repetition.

[0083] 1102. The storage device determines the type of storage area into which the data to be written is written according to the type of the data to be written carried in the write command.

[0084] In one embodiment, the storage device may determine the type of the target storage area where the data to be written is to be written according to the type of the data to be written and the correspondence between the type of data stored in the SSD and the type of the storage area.

[0085] Optionally, the read latency, write latency and / or read / write reliability of Pages in blocks included in storage areas corresponding to types of different storage areas are different.

[0086] In another embodiment, since the SSD includes different types of storage blocks, such as SLC storage blocks, MLC storage blocks, and TLC storage blocks. Each type of storage block may include different types of storage pages. For example, the SLC storage block includes at least one of SLBPage, CSB Page, and MSB Page. In this embodiment, the storage area type of the storage device is the type of the storage page.

[0087] Specifically, the SSD may include an LSB Page, a CSB Page, and an MSB Page. The storage performance of the LSB Page is the lowest, the storage performance of the CSB Page is higher than that of the LSB Page, and the storage performance of the most significant bit MSB Page is higher than that of the CSB Page. In the storage device, the mapping relationship between the data type of the data to be written and the storage page type can be pre-set. For example, the Page type corresponding to 00b and 01b in the write delay field can be set to an LSB Page, the Page type corresponding to 10b can be set to a CSB Page, and the Page type corresponding to 11b can be set to an MSB Page. In this way, when the storage device receives the write command, it can determine the Page type of the data to be written according to the type of the data to be written in the write command. In other words, the storage device can write the data to be written into the appropriate Page, thereby improving the data storage performance.

[0088] Optionally, the Page may be a least significant bit LSB Page, a center significant bit CSB Page, a most significant bit MSB Page, or other Pages.

[0089] Specifically, the storage device can divide the storage area into at least two performance levels in units of Page according to performance and reliability. Among them, the performance of the least significant bit LSB Page is the lowest, the performance of the central significant bit CSB Page is higher than that of the LSB Page, and the performance of the most significant bit MSB Page is higher than that of the CSB Page. In this way, the storage device can select the corresponding Page type according to the correspondence between the type of data to be written and the Page type, so that the storage device can well serve at least two applications with different requirements, thereby improving system performance.

[0090] For example, Fig. 9 As shown, the four storage areas SLC area, MLC area, TLC area and QLC area in the storage area can be replaced by three types of areas: LSB Page, CSB Page and MSB Page.

[0091] It should be understood that each block may include different types of Pages.

[0092] 1103. The storage device determines a target storage area for writing the to-be-written data according to the type of the storage area.

[0093] After determining the type of storage area where the data to be written is written, a free area in the storage area of ​​the corresponding type can be selected to write the data to be written. For example, at least one free page corresponding to the page type of the storage area in the SSD where the data to be written is written is used as the target storage area.

[0094] Optionally, different types of storage pages may correspond to a storage list respectively, and each storage list records a type of storage page. The storage device may search for an idle storage page as the target storage area in the storage list corresponding to the storage page type according to the type of the storage page. If there is an available storage page in the storage list, the available storage page is used as the target storage area, and the data to be written is written into the available storage page. If there is no available storage page in the storage list, a free storage block is obtained in the SSD, the first storage page in the free storage block is used as the target storage area, and the data to be written is written into the first storage page.

[0095] After the storage device completes writing of the data to be written in the current storage page, the next storage page is added to the corresponding storage list. For example, if there is a usable storage page in the storage list, after completing the data writing, the next page of the usable storage page is added to the storage list. If there is no usable storage page in the storage list, after completing the data writing to the first storage page, the second storage page is added to the storage list.

[0096] It should be understood that in the embodiments of the present application, the storage list can be called a "stack". For example, the storage list corresponding to the LSB Page type is called an "LSB stack", the storage list corresponding to the CSB Page type is called a "CSB stack", and the storage list corresponding to the MSB Page type is called an "MSB stack".

[0097] For example, a storage device can divide the Block storage area into three Page types, such as Fig.12 and Fig.13 shown. Specifically, Fig.12In the example, the storage device can hang multiple Pages to the corresponding type areas respectively, Block13 Page50, Block18 Page48, Block33 Page1, and Block5 Page0 to the LSB stack, Block98 Page49, Block22 Page43, Block76 Page35, and Block66 Page17 to the CSB stack, Block1 Page157, Block27 Page139, Block39 Page121, and Block9 Page112 to the MSB stack. The storage device can store the data to be written in at least one free Page under the corresponding stack according to the type of the data to be written.

[0098] Optionally, the storage device divides the currently available Pages into different storage lists within the Block.

[0099] Specifically, the pages in a block are numbered in sequence, and the storage device stores data in the order of the pages. That is, if Page 48 in a block is not used, Page 49 cannot be used directly for data storage.

[0100] The storage device records the currently available Pages in the storage list. If a Page in the Block of the storage device is currently writing data, the other Pages in the Block are unavailable Pages. After the storage device completes writing to the Page, the storage device can store the next Page in the corresponding storage list.

[0101] For example, pages of different types (LSB, CSB, and MSB) can appear alternately. Figure 5 Taking the Page in Block 18 as an example, after data is stored in Block 18Page48 belonging to the LSB area, the next data needs to be stored in Block 18Page50, and Block 18Page49 belongs to the CSB area. If Block 18Page49 does not store data, it cannot be directly stored in Block 18Page50 belonging to the LSB area. In this way, the storage device can hang Block 18Page49 that can be used for data storage into the CSB stack, and then can be used to write data.

[0102] It should be noted that, in this embodiment, Pages that cannot be used to store data will not be stored in the storage list.

[0103] It should be understood that Pages of the same type that can be used in different Blocks can be stored in the same storage list.

[0104] Optionally, if there is no available Page in the storage list corresponding to the Page type of the storage area in the SSD where the data to be written is written, a new Block can be found and Page0 can be attached to the corresponding storage list to start data storage.

[0105] Optionally, if there is no available Page in the storage list corresponding to the Page type of the storage area in the SSD where the data to be written is written, the storage device may determine a higher performance Page as the target storage area. In other words, by processing data with a higher performance Page, resources can be fully utilized to avoid data waiting for a suitable storage area, causing data congestion.

[0106] For example, if the Page type of the storage area in the SSD where the data to be written is written is an MSB Page, and there is no free Page in the storage list corresponding to the MSB Page, the storage device may determine at least one available Page of the CSB Page as the target storage area, or determine at least one available Page of the MSB Page as the target storage area. If the storage area type of the storage area in the SSD where the data to be written is written is a CSB Page, and there is no free Page in the CSB Page, at least one free Page of the LSB Page is determined as the target storage area.

[0107] It should be understood that the storage device may also determine a Page of a lower performance type as the target storage area, and in the case that no free storage area exists for a Page of a higher performance type, data processing efficiency may be improved, and this application does not limit this.

[0108] Optionally, the storage device can determine both free blocks and free pages that meet the requirements of the data to be written according to the type of data to be written. For example, the storage device can use at least one page belonging to the LSB Page area in a block in the MLC area as the target storage area.

[0109] Optionally, the storage device determines the target storage area in the storage area according to the type of data to be written, and selects an update type area from the storage area according to the type of data to be written, and writes at least one page in the update type area of ​​the storage area in the SSD where the data to be written is written as the target storage area. The storage area includes at least two update type areas, and the frequencies of updating the stored data of any two update type areas of the at least two update type areas are different.

[0110] Specifically, the storage device divides the storage area into multiple storage areas according to the frequency of updating the stored data, and obtains multiple update type areas. Since the storage device has a limited time to store data, the storage device can choose to store the data in the appropriate update type area according to the type of data to be written. For example, the storage device can pre-set the mapping relationship between the type of data to be written and the update type area, and the storage device can determine the update type area according to the mapping relationship and the type of data to be written. This avoids the frequent inspection and refresh of data caused by selecting an inappropriate update type area to affect the system performance, or the inspection and refresh rate is too low to cause the reliability of data to decrease. Therefore, the embodiment of the present application can achieve the reliability of different data without affecting the system performance.

[0111] For example, Fig. 9 As shown, four storage areas in the storage area, namely the SLC area, the MLC area, the TLC area and the QLC area, can be replaced with areas of various update types.

[0112] It should be understood that the area of ​​each update type can be in units of Page, or in units of any one of Device, Target, LUN, Plane, and Block, and this application does not limit this.

[0113] It should also be understood that the capacities of the areas of various update types may be the same, or the capacities of some update types may be different, or the capacities of all update types may be different.

[0114] Optionally, the storage device may also use at least two types of storage areas that meet the above three types of block storage area, page, and update type area as target storage areas. For example, the storage device may use at least one page in an area that is both an LSB page and a certain update type in a block in the MLC area as the target storage area.

[0115] 1104. The storage device writes the data to be written into the target storage area.

[0116] Therefore, in the data writing method of the embodiment of the present application, the storage device receives a write command carrying the type of data to be written, and determines the type of storage page to write the data to be written according to the type of the data to be written, and then determines the target storage page to write the data to be written according to the type of the storage page. In this way, the storage device can store the data in a suitable storage page, that is, the storage device can meet the different needs of applications, thereby improving data processing efficiency and system performance.

[0117] Fig.14 FIG. 1 is a schematic block diagram of a storage device 1400 according to an embodiment of the present application. Fig.14 As shown, the storage device 1400 includes:

[0118] The receiving module 1410 is used to receive a write command, where the write command carries the type of data to be written;

[0119] A processing module 1420 is used to determine the type of storage area in the SSD where the data to be written is written according to the type of the data to be written, and the SSD includes multiple types of storage areas;

[0120] The processing module 1420 is further used to determine a target storage area for writing the to-be-written data according to the type of the storage area;

[0121] The processing module 1420 is further configured to write the data to be written into the target storage area.

[0122] Optionally, the SSD stores a correspondence between data types and storage area types, and the processing module 1420 is specifically used to determine the type of the target storage area for writing the data to be written according to the type of the data to be written and the correspondence.

[0123] Optionally, the SSD includes a plurality of storage blocks, and the SSD is divided into different types of storage areas according to types of storage blocks, and the corresponding relationship is a corresponding relationship between data types and types of storage blocks.

[0124] Optionally, the SSD includes multiple storage blocks, each storage block includes at least one type of storage page, the SSD is divided into different types of storage areas according to the type of storage page, and the corresponding relationship is a corresponding relationship between the data type and the type of the storage page.

[0125] Optionally, different types of storage pages correspond to a storage list respectively, and each storage list records a type of storage page;

[0126] The processing module 1420 is specifically used for:

[0127] According to the type of the storage page, find an available storage page in the storage list corresponding to the storage page type as the target storage area;

[0128] If there is an available storage page in the storage list, the available storage page is used as the target storage area;

[0129] If there is no available storage page in the storage list, a free storage block is obtained from the SSD, and the first storage page of the free storage block is used as the target storage area.

[0130] Optionally, the SSD includes at least two of an SLC area, an MLC area, a TLC area and a QLC area, and the performance of the SLC area, the MLC area, the TLC area and the QLC area decreases in sequence. If the storage blocks in the storage area corresponding to the type of the storage area in the SSD where the data to be written is written do not include free storage pages, the processing module 1420 converts the type of at least one block including free storage pages in the storage area having a performance lower than the type of the storage area in the SSD where the data to be written is written to the same type as the type of the storage area in the SSD where the data to be written is written.

[0131] Optionally, the storage block includes at least two of an LSB page, a CSB page, and the MSB page, and the performances of the LSB page, the CSB page, and the MSB page decrease in sequence, and the processing module 1420 is specifically configured to:

[0132] If the storage area of ​​the type of the storage area in the SSD where the data to be written is written is the MSB page or the CSB page, and there is no available storage page in the storage area of ​​the type of the storage area in the SSD where the data to be written is written, at least one available storage page corresponding to the type of the storage area in the SSD where the data to be written has a higher performance than that of the storage area in the SSD where the data to be written is determined as the target storage area.

[0133] Therefore, in the storage device of the embodiment of the present application, the storage device receives a write command carrying the type of data to be written, and determines the type of storage area to write the data to be written according to the type of the data to be written, and then determines the target storage area to write the data to be written according to the type of the storage area. In this way, the storage device can store the data in a suitable storage area, that is, the storage device can meet the different needs of applications, thereby improving data processing efficiency and system performance.

[0134] It should be understood that the storage device 1400 according to the embodiment of the present application may correspond to Figure 7 The storage device in the data writing method of the embodiment shown, and the above-mentioned and other management operations and / or functions of each module in the storage device 1400 are respectively for implementing the corresponding steps of the aforementioned methods, and for the sake of brevity, they are not repeated here.

[0135] The receiving module 1410 in the embodiment of the present application may be implemented by a transceiver, and the processing module 1420 may be implemented by a processor. Fig.15 As shown, the storage device 1500 may include a transceiver 1510, a processor 1520 and a memory 1530. The memory 1530 may be used to store indication information, and may also be used to store codes and instructions executed by the processor 1520.

[0136] It should be understood that the processor 1520 can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by the hardware integrated logic circuit in the processor or the instruction in the form of software. The above processor can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor can be combined to perform. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0137] It can be understood that the memory 1530 in the embodiment of the present invention can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).

[0138] It should be noted that the memory of the embodiments of the present application is intended to include, but is not limited to, these and any other suitable types of memory.

[0139] An embodiment of the present application also provides a computer storage medium, which can store program instructions for indicating any of the above methods.

[0140] Optionally, the storage medium may specifically be the memory 1530 .

[0141] An embodiment of the present application also provides a system chip, which includes an input and output interface, at least one processor, at least one memory and a bus, wherein the at least one memory is used to store instructions, and the at least one processor is used to call instructions of the at least one memory to perform the operations of the methods of the above-mentioned embodiments.

[0142] The chip system of the embodiment of the present application includes a processor for supporting distributed units, centralized units and storage devices to implement the functions involved in the above embodiments, for example, generating or processing the data and / or information involved in the above methods.

[0143] In one possible design, the chip system also includes a memory, which is used to store necessary program instructions and data for distributed units, centralized units, and terminal devices. The chip system can be composed of chips, or it can include chips and other discrete devices. It should be understood that the data and / or information processed by the chip can come from the application, and the processed data and / or information can also be sent to the application, which is not limited in this application.

[0144] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0145] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0146] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0147] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0148] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0149] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0150] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A data writing method, applied to a solid-state storage device SSD, characterized in that: The method comprises: receiving a write command, wherein the write command carries a type of data to be written, wherein different data types correspond to different latency requirements; Determining, according to the type of the data to be written, the type of a storage area in the SSD where the data to be written is written, wherein the SSD includes multiple types of storage areas; Determining, according to the type of the storage area, a target storage area for writing the data to be written; The data to be written is written into the target storage area.

2. The method according to claim 1, characterized in that The SSD stores a correspondence between data types and storage area types, and determining the type of the storage area in the SSD where the data to be written is written according to the type of the data to be written includes: The type of the target storage area for writing the data to be written is determined according to the type of the data to be written and the corresponding relationship.

3. The method according to claim 2, characterized in that The SSD includes a plurality of storage blocks. The SSD is divided into different types of storage areas according to types of storage blocks. The corresponding relationship is a corresponding relationship between data types and types of storage blocks.

4. The method according to claim 3, characterized in that The SSD includes at least two of an SLC area, an MLC area, a TLC area, and a QLC area, and the performance of the SLC area, the MLC area, the TLC area, and the QLC area decreases in sequence. Before determining a target storage area for writing the data to be written according to the type of the storage area, the method further includes: If none of the storage blocks in the storage area corresponding to the type of the storage area in the SSD where the data to be written is written includes free storage pages, the type of at least one block including free storage pages in the storage area with lower performance than the type of the storage area in the SSD where the data to be written is converted to the same type as the type of the storage area in the SSD where the data to be written is written.

5. The method according to claim 2, characterized in that: The SSD includes a plurality of storage blocks, each storage block includes at least one type of storage page, and the corresponding relationship is a corresponding relationship between a data type and a type of the storage page.

6. The method according to claim 5, characterized in that Different types of storage pages correspond to a storage list respectively, and each storage list records a type of storage page; Determining, according to the type of the storage area, a target storage area for writing the to-be-written data comprises: According to the type of the storage page, find an available storage page in the storage list corresponding to the storage page type as the target storage area; If there is an available storage page in the storage list, using the available storage page as the target storage area; If there is no available storage page in the storage list, a free storage block is obtained in the SSD, and the first storage page of the free storage block is used as the target storage area.

7. The method according to claim 5 or 6, characterized in that: The storage block includes at least two of an LSB page, a CSB page, and an MSB page, and the performance of the LSB page, the CSB page, and the MSB page decreases in sequence, and determining, according to the type of the storage area, a target storage area for writing the data to be written includes: If the storage area of ​​the type of the storage area in the SSD where the data to be written is written is the MSB page or the CSB page, and there is no available storage page in the storage area of ​​the type of the storage area in the SSD where the data to be written is written, at least one available storage page corresponding to the type of the storage area in the SSD where the data to be written has a performance higher than that of the storage area in the SSD where the data to be written is determined as the target storage area.

8. A storage device, applied to a solid-state storage device SSD, characterized in that: The storage device comprises: A receiving module, configured to receive a write command, wherein the write command carries the type of data to be written, wherein different data types correspond to different latency requirements; A processing module, configured to determine, according to the type of the data to be written, the type of storage area in the SSD into which the data to be written is written, wherein the SSD includes storage areas of multiple types; The processing module is further used to determine a target storage area for writing the data to be written according to the type of the storage area; The processing module is further configured to write the data to be written into the target storage area.

9. The storage device according to claim 8, characterized in that: The SSD stores a correspondence between data types and storage area types, and the processing module is specifically used to: The type of the target storage area for writing the data to be written is determined according to the type of the data to be written and the corresponding relationship.

10. The storage device according to claim 9, characterized in that: The SSD includes a plurality of storage blocks. The SSD is divided into different types of storage areas according to types of storage blocks. The corresponding relationship is a corresponding relationship between data types and types of storage blocks.

11. The storage device according to claim 10, characterized in that: The SSD includes at least two of an SLC area, an MLC area, a TLC area, and a QLC area, and the performance of the SLC area, the MLC area, the TLC area, and the QLC area decreases in sequence. If none of the storage blocks in the block storage area corresponding to the type of the storage area in the SSD where the data to be written is written includes a free storage page, the processing module is further used to convert the type of at least one block including free storage pages in the storage area having a performance lower than the type of the storage area in the SSD where the data to be written is written to the same type as the type of the storage area in the SSD where the data to be written is written.

12. The storage device according to claim 9, characterized in that: The SSD includes a plurality of storage blocks, each storage block includes at least one type of storage page, the SSD is divided into different types of storage areas according to the type of storage page, and the corresponding relationship is a corresponding relationship between a data type and a type of the storage page.

13. The storage device according to claim 12, characterized in that: Different types of storage pages correspond to a storage list respectively, and each storage list records a type of storage page; The processing module is specifically used for: According to the type of the storage page, find an available storage page in the storage list corresponding to the storage page type as the target storage area; If there is an available storage page in the storage list, using the available storage page as the target storage area; If there is no available storage page in the storage list, a free storage block is obtained in the SSD, and the first storage page of the free storage block is used as the target storage area.

14. The storage device according to claim 12 or 13, characterized in that: The storage block includes at least two of an LSB page, a CSB page, and an MSB page, and the performances of the LSB page, the CSB page, and the MSB page decrease in sequence, and the processing module is specifically used for: If the storage area of ​​the type of the storage area in the SSD where the data to be written is written is the MSB page or the CSB page, and there is no available storage page in the storage area of ​​the type of the storage area in the SSD where the data to be written is written, at least one available storage page corresponding to the type of the storage area in the SSD where the data to be written has a performance higher than that of the storage area in the SSD where the data to be written is determined as the target storage area.

Citation Information

Patent Citations

  • Solid state memory (ssm), computer system including an ssm, and method of operating an ssm

    CN101369451A

  • Method of configuring memory cells in a solid state drive and controller therefor

    US20170177258A1