CN114830077A - Data storage method and storage device - Google Patents

Data storage method and storage device Download PDF

Info

Publication number
CN114830077A
CN114830077A CN201980102966.7A CN201980102966A CN114830077A CN 114830077 A CN114830077 A CN 114830077A CN 201980102966 A CN201980102966 A CN 201980102966A CN 114830077 A CN114830077 A CN 114830077A
Authority
CN
China
Prior art keywords
data
storage medium
storage
command
threshold
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201980102966.7A
Other languages
Chinese (zh)
Inventor
吴黎明
唐吉卓
沈绍锋
何江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of CN114830077A publication Critical patent/CN114830077A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

A data storage method and a storage device relate to the field of storage, and enable an SSD (220) to optimize the layout of data in the SSD (220), and improve the storage performance and the service life of the SSD (220). The specific scheme is as follows: the SSD (220) receives an IO command, the IO command is used for requesting to write first data into the storage device, the IO command also carries life time of the first data, and when the life cycle of the first data is larger than a first threshold value, the SSD (220) writes the first data into a second storage medium (1103).

Description

Data storage method and storage device Technical Field
The present application relates to the field of storage, and in particular, to a data storage method and a storage device.
Background
In a computer system, execution of each operation is implemented depending on different Input Output (IO) commands (e.g., a read IO command, a write IO command, etc.). Illustratively, a computer system is typically composed of a host (host) and a storage device. The host may write data to the storage device by issuing a write IO command. The storage Device may be a Solid State Device (SSD), or other memory component capable of storing information such as data and instructions.
However, there are some problems with the prior art based on the existing mechanism for handling IO commands. For example, the storage medium is taken as an SSD. When the SSD includes a plurality of storage media having different write rates, data to be written to the SSD may be randomly stored in the storage media having higher or lower write rates. The SSD cannot manage storage locations of data in different storage media, so that the layout of the data in the SSD is not ideal enough, and storage performance and lifetime of the SSD are affected.
Disclosure of Invention
The embodiment of the application provides a data storage method and a data storage device, so that the SSD can optimize the layout of data in the SSD, and the storage performance and the service life of the SSD are improved.
The technical scheme is as follows:
in a first aspect, embodiments of the present application provide a data storage method, which may be applied to a storage device including a first storage medium and a second storage medium. The storage device may be a Solid State Disk (SSD), and the write rate of the first storage medium is higher than the write rate of the second storage medium, and the method may include: the solid state disk receives an IO command, the IO command is used for requesting to write first data into the storage device, and the IO command also carries a life cycle (lifetime) of the first data; and responding to the IO command, and when the life cycle of the first data is larger than a first threshold, the solid state disk writes the first data into a second storage medium. In some embodiments, the IO command may be initiated by a Host (Host) to the solid state disk.
Based on the scheme, by carrying the life cycle in the IO command, the SSD can know the life cycle of the data requested to be processed by the IO command, so that the SSD writes the data in the corresponding storage medium, for example, directly writes the data with a longer life cycle in the NAND capable of storing the data for a long time, so that the SSD can optimize the layout of the data in the SSD, and improve the storage performance and the life of the SSD.
In one possible design, the solid state disk writes the first data to the first storage medium when the life cycle of the first data is less than a second threshold, where the second threshold is less than the first threshold. Based on the scheme, the SSD can write the data with a short life cycle into the NVM, so that the data can be replaced or deleted quickly after the life cycle is finished, further the layout of the data in the SSD can be optimized by the SSD, and the storage performance and the service life of the SSD are improved.
In one possible design, the IO command also carries a deadline (deadline). The deadline is used for indicating the response delay of the solid state disk for returning the IO command processing result to the host. When the life cycle of the first data is greater than a first threshold, the solid state disk writes the first data into a second storage medium, and the method comprises the following steps: and when the life cycle of the first data is greater than the first threshold and the deadline is greater than a third threshold, the solid state disk writes the first data into a second storage medium. Based on the scheme, the deadline is carried in the IO command, so that the SSD can know the delay requirement of returning the IO command, the data with lower delay requirement is written into the NAND capable of storing the data for a long time, the layout of the data in the SSD can be further optimized by the SSD, and the storage performance and the service life of the SSD are improved.
In one possible design, when the life cycle of the first data is greater than the second threshold and less than the first threshold, or the expiration time of the first data is less than the third threshold, the solid state disk writes the first data to the first storage medium. Based on the scheme, the SSD can cache the data meeting the conditions in the NVM, the processing speed of the data is properly improved, the layout of the data in the SSD can be further optimized by the SSD, and the storage performance and the service life of the SSD are improved.
In one possible design, after the first storage medium is completely occupied, the solid state disk writes the second data stored in the first storage medium into the second storage medium; wherein the second data is data having the longest life cycle among data stored in the first storage medium. Based on the scheme, when the NVM is fully occupied, the SSD can write the data with the longest life cycle into the NAND capable of storing the data for a long time, so that the SSD can optimize the layout of the data in the SSD, and the storage performance and the service life of the SSD are improved.
In one possible design, the solid state disk divides a physical storage block (block) of the second storage medium into a plurality of physical storage block groups, and different physical storage block groups correspond to different life cycle intervals; the solid state disk writes the first data into a second storage medium, and the method comprises the following steps: the solid state disk determines a first physical storage block group according to the life cycle of first data, wherein the life cycle of the first data falls into a life cycle interval corresponding to the first physical storage block group; and the solid state disk writes the first data into the first physical storage block group. Based on the scheme, the SSD can configure different blocks for data with different life cycles so as to write data with similar life cycles into the same block, so that when the life cycles of the data are ended, the whole block can be set to be invalid without screening the data with the life cycles not ended in the block and transferring the data.
In one possible design, the solid state disk divides a physical storage block (block) of the second storage medium into a plurality of physical storage block groups, including: according to the concurrent writing bandwidth of the second storage medium, dividing the physical storage blocks in the second storage medium, which are in the number corresponding to the concurrent writing bandwidth, into a plurality of physical storage block groups, wherein the concurrent writing bandwidth is the maximum number of the physical storage blocks capable of executing data writing at the same time of the second storage medium. Based on the scheme, the SSD can allocate the number of blocks to the data with the life cycles falling into different intervals according to the concurrent writing bandwidth, so that the corresponding data in each life cycle interval can be written into the blocks in parallel, and the data writing efficiency is improved.
In a second aspect, an embodiment of the present application provides a storage apparatus, including: a Controller (Controller), a first storage medium and a second storage medium, wherein a write rate of the first storage medium is higher than a write rate of the second storage medium; the controller is configured to receive an input/output (IO) command, where the IO command is used to request to write first data into a memory device, and the IO command also carries a life cycle (lifetime) of the first data; the controller is further configured to write the first data to the second storage medium when the life cycle of the first data is greater than a first threshold.
In one possible design, the controller is further configured to write the first data to the first storage medium when a life cycle of the first data is less than a second threshold, the second threshold being less than the first threshold.
In one possible design, the IO command also carries a deadline (deadline); the controller is further configured to write the first data to the second storage medium when the life cycle of the first data is greater than a first threshold and the expiration time is greater than a third threshold.
In one possible design, the controller is further configured to write the first data to the first storage medium when a life cycle of the first data is greater than a second threshold and less than the first threshold, or a deadline of the first data is less than a third threshold.
In one possible design, the controller is further configured to write the second data stored in the first storage medium to the second storage medium after the first storage medium is fully occupied; wherein the second data is data having the longest life cycle among data stored in the first storage medium.
In one possible design, the controller is further configured to divide a physical storage block (block) of the second storage medium into a plurality of physical storage block groups, different physical storage block groups corresponding to different lifecycle intervals; the controller is further configured to determine a first physical storage block group according to a life cycle of the first data, where the life cycle of the first data falls within a life cycle interval corresponding to the first physical storage block group; the controller writes the first data into the first physical storage block group.
In one possible design, the controller is further configured to divide physical storage blocks of the second storage medium, which are the number corresponding to the concurrent write bandwidth, into a plurality of physical storage block groups according to the concurrent write bandwidth of the second storage medium, where the concurrent write bandwidth is a maximum number of physical storage blocks of the second storage medium, to which data writing can be performed at the same time.
In a third aspect, an embodiment of the present application provides a computer-readable storage medium, which contains instructions that, when executed on a computer, cause the computer to perform the first aspect or the method of any one of the possible implementation manners of the first aspect. In some embodiments, the computer-readable storage medium is a non-volatile storage medium.
In a fourth aspect, embodiments of the present application provide a computer program product, which when run on a computer causes the method of the first aspect or any one of the possible implementations of the first aspect to be performed.
In a fifth aspect, embodiments of the present application provide a controller, which is coupled with a memory, which in some embodiments may include a computer-readable storage medium as provided in the third aspect. The processor, when executing the computer program or instructions in the memory, causes the method of the first aspect or any one of the possible implementations of the first aspect to be performed.
In a sixth aspect, an embodiment of the present application provides a chip, including: processing circuitry for invoking from the storage medium and executing the computer program stored in the storage medium to perform the steps performed by the processor in the first aspect or any one of the possible implementations of the first aspect, and an interface. In some embodiments, the storage medium may be a computer-readable storage medium as provided by the third aspect.
In a seventh aspect, embodiments of the present application provide a computer system, which may include a host and a storage device, for example, the storage device may be any one of the storage devices in the second aspect and possible designs thereof. Wherein the host is adapted to send an Input Output (IO) command to the storage device requesting writing of data to the storage device, and the data processor device is adapted to perform the method according to any one of the above first aspect and possible designs thereof in response to the IO command.
It should be understood that the storage device provided by the second aspect and any possible design thereof, the computer-readable storage medium provided by the third aspect, the computer program product provided by the fourth aspect, the controller provided by the fifth aspect, the chip provided by the sixth aspect, and the computer system provided by the seventh aspect may all correspond to the advantageous effects of the embodiments of the method provided by referring to the corresponding aspects, and are not described herein again.
Drawings
FIG. 1 is a schematic diagram of the composition of a NAND;
FIG. 2 is a schematic diagram of a memory system according to an embodiment of the present disclosure;
fig. 3 is a schematic composition diagram of an SSD according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a data storage method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of life time and deadline provided in the embodiment of the present application;
FIG. 6 is a diagram illustrating a data writing process according to an embodiment of the present application;
FIG. 7 is a schematic diagram illustrating yet another data writing method according to an embodiment of the present application;
FIG. 8 is a schematic flowchart of another data storage method according to an embodiment of the present application;
fig. 9 is a schematic flowchart of another data storage method according to an embodiment of the present application;
FIG. 10 is a schematic diagram illustrating a memory device according to an embodiment of the present disclosure;
fig. 11 is a schematic composition diagram of another memory device according to an embodiment of the present application.
Detailed Description
During operation of a computer system, a large amount of data needs to be stored in a memory device. Among them, SSDs are being widely used as a memory device having excellent performance.
In general, many SSDs employ a NAND flash memory (which may be simply referred to as NAND in this embodiment) as a storage medium to store data. For example, please refer to fig. 1, which is a schematic diagram of a NAND. As shown in fig. 1, each NAND consists of a plurality of dies (Die), each Die having a plurality of physical memory blocks (blocks), each Block having a plurality of pages (Page). When data needs to be written into the SSD, the SSD can write the data into different pages, and permanent storage of the data is realized.
With the gradual increase of the read-write capability requirement of the computer system on the memory device, the SSD also starts to use some other storage media with better performance, such as non-volatile storage (NVM) as its storage media. For example, the NVM can include Phase Change Random Access Memory (PCRAM), Magnetoresistive Random Access Memory (MRAM), Resistive Random Access Memory (ReRAM or RRAM), and the like.
By way of example, PCRAM (also known as PCM), is capable of storing data using the large difference in conductivity of chalcogenides in the crystalline (or crystalline) and amorphous (or amorphous) states. Here, a phase (phase) is a concept of physical chemistry, and refers to a plurality of states in which chemical properties of objects are completely the same but physical properties are different. For example, water has three distinct states, namely water vapor (vapor phase), liquid water (liquid phase), and solid water (solid phase). The process by which a substance changes from one phase to another may be referred to as a "phase change," such as the transformation of water from a liquid to a solid. Many substances have phase changes of not only gas, liquid and solid phases. PCRAMs store data by using the difference in conductivity that a particular material exhibits when it is transformed between crystalline and amorphous states.
MRAM is a nonvolatile Memory technology, and is expected to replace flash Memory and Dynamic Random Access Memory (DRAM) as a new general-purpose Memory. An MRAM memory is configured of one transistor and one Magnetic Tunnel Junction (MTJ) memory cell. The MTJ has three layers, the uppermost layer is a free layer, the middle is a tunnel junction, and the lower is a fixed layer. The polarization direction of the magnetic field of the free layer can be changed, while the direction of the magnetic field of the pinned layer is fixed. When the magnetic field directions of the free layer and the fixed layer are parallel, the memory cell has low resistance; when the magnetic field direction is reversed, a high resistance is exhibited. The MRAM memory determines whether stored data is 0 or 1 by detecting the level of resistance of a memory cell. Therefore, the MRAM can read data quickly without changing the state of the memory.
RRAM is currently the most popular new type of storage medium that is likely to replace flash memory. Memristions are not, in theory, fresh things. As early as 1971, professor maja begonia, university of california, berkeley, published a paper entitled "Memristor-The Missing Circuit Element," and proposed The theoretical basis for memristance. Chua teaches that when studying the relationship of current, voltage, charge and magnetic flux, it is concluded that in addition to capacitance, inductance and resistance, a fourth basic element, memristance, should be present in an electronic circuit. Memristors can control changes in their resistance values through changes in electrical current. After the voltage pulse is applied to the material, the material can generate a high resistance value; conversely, application of a voltage pulse in the other direction will cause the material to change to a low resistance value, and its resistance value will remain after power is turned off. The development of RRAM is changing day by day, and particularly in recent years, all indexes of RRAM are improved by several orders of magnitude compared with flash memory devices, which brings revolutionary changes to storage devices. For example: 1) reading and writing time delay: the RRAM can realize about 100ns of time delay, the read time delay is 1 order of magnitude higher than that of a flash memory device, and the write time delay is 3 orders of magnitude higher; 2) durable (durable): the RRAM Endurance can reach 1E6-1E12, and is improved by more than 2 orders of magnitude compared with a flash memory device; 3) retention time (Retention): RRAM Retention can reach 10 years, 10 times of the Retention of the flash memory device; 4) density and capacity: RRAMs can be made to be less than 5nm, support three-dimensional (3D) stacking, support multi-bit (multi-bit), and NAND will stop around 15 nm; 5) and the RRAM supports Byte (Byte) addressing, and can solve the problem of random writing of small data on storage.
However, higher costs are incurred due to the use of the above-described NVM. Therefore, in SSD, using the above NVM instead of NAND flash as the storage medium would be a long process. That is, in order to improve the read/write performance of the conventional SSD in consideration of the cost, the SSD including two or more kinds of storage media of NAND and NVM at the same time has become an indispensable development trend.
However, based on the prior art mechanism for processing the IO command and the corresponding data, the data written into the SSD is stored by hashing together at random. The storage of such data presents problems. For example, when a plurality of storage media having different write rates are included in the SSD, some data having a low frequency of use may be stored in the storage medium having a high write rate, thereby reducing the efficiency of use of the storage medium having a high write rate. Meanwhile, some data with high use frequency can be stored in the storage medium with low writing rate, so that the data can not be called quickly in the process of being frequently used (such as read out and the like). This makes the layout of data in the SSD less than ideal, which in turn affects the storage performance and lifetime of the SSD.
In order to solve the above problem, embodiments of the present application provide a data storage method and a storage device, so that an SSD can optimize the layout of data in the SSD, and improve the storage performance and the lifetime of the SSD.
The following detailed description of embodiments of the present application will be made with reference to the accompanying drawings.
Please refer to fig. 2, which is a schematic diagram illustrating a memory system according to an embodiment of the present disclosure. As shown in fig. 2, the storage system may include a Host (Host)210 and one or more SSDs 220. Among them, each SSD 220 of the one or more SSDs 220 may include a Controller (Controller)221 and a plurality of storage media 222.
The host 210 may be a host using the SSD 220, or may be a server or an array using the SSD 220. The plurality of storage media 222 may be NAND and/or NVM. When the SSD 220 includes both NAND and NVM, the ratio of the capacities of the NVM and the NAND in the SSD 220 may be flexibly selected according to a specific usage scenario, and the embodiment of the present application is not limited herein.
The host 210 and the controller 221 of each of the one or more SSDs 220 may be connected to each other via a Small Computer System Interface (SCSI)/Non-Volatile Memory host controller Interface (NVMe). Illustratively, the host 210 may send a write IO command to the controller 221. After the controller 221 receives the write IO command, the data requested to be processed by the write IO command may be written to the storage medium 222. In addition, the host 210 may also send a read IO command to the controller 221. After receiving the read IO command, the controller 221 may search whether the cache stores data to be read according to the address in the read IO command. If so, the data to be read is sent to the host 210, and if not, the data is obtained from the storage medium 222 and sent to the host 210. In practical applications, the controller 221 and the storage medium 222 may be integrated into one storage device (such as the SSD shown in fig. 2) or located in two devices independent from each other, and the embodiment of the present invention does not limit the position relationship between the controller 221 and the storage medium 222.
As an example, fig. 3 shows a schematic diagram of a composition of the SSD 220 of fig. 2. As shown in fig. 3, the SSD 220 may include therein a controller 221, a first storage medium (e.g., NVM), and a second storage medium (e.g., NAND). The controller 221 may receive an IO command sent by the host 210, and write data requested to be processed by the IO command into the first storage medium or the second storage medium, or read data requested to be read by the IO command from the first storage medium or the second storage medium and send the read data to the host 210. The NAND in the SSD 220 may be a three-dimensional TLC (3D TLC), a three-dimensional QLC (3D Quad-Level Cell), or other NAND. The NVM in the SSD 220 may be RRAM, or may be NVM of other forms such as PCRAM or MRAM. It can be understood that the NVM has better read/write performance, can respond to IO commands faster, and can process data requested to be processed by IO commands quickly.
The data storage method provided by the embodiment of the application can be realized based on the storage system shown in fig. 2. In the above description of fig. 2, the storage device is taken as an SSD for example. In practical applications, the storage device involved in the data storage method may also be other memory components capable of storing information such as data and commands. The embodiments of the present application are not limited thereto.
According to the data storage method provided by the embodiment of the application, the SSD can know the life cycle of the data requested to be processed by the IO command by carrying the life cycle (lifetime) in the IO command, so that the SSD can write the data into the corresponding storage medium. Further, by carrying deadline (dead time) in the IO command, the SSD can efficiently arrange the storage order or the storage sequence of the data, so as to ensure that the SSD can return the storage result of the data to the host within a specified time. Meanwhile, the SSD can also store data close to the lifetime in the same physical block according to the lifetime, so that when the SSD finds the physical block storing invalid data while recovering the blank block, the SSD can directly erase the whole physical block without migrating the valid data on the physical block.
In order to more clearly illustrate the data storage method provided by the embodiment of the present application, a storage device is taken as an SSD, the SSD includes two storage media, namely a NAND storage medium and an NVM storage medium, an IO command is a write request, and the IO command includes a life cycle (lifetime) and a deadline (deadline).
Referring to fig. 4, a schematic flow chart of a data storage method according to an embodiment of the present application is shown in fig. 4, where the method may include S401 to S402.
S401, the host issues an IO command for requesting to write the first data into the SSD.
When issuing an IO command, such as an IO command, for requesting to write first data into an SSD, a host (host) may carry a life cycle (lifetime) and an expiration time (deadline) of the first data in the IO command.
For example, the lifetime carried in the IO command may be set by the host according to the lifetime of the first data that the computer system requests to process for the IO command.
Wherein the lifetime may be used to indicate a duration of time that the first data is valid data. That is, the first data is valid within the lifetime, and outside the lifetime, the first data is invalid, can be overwritten by other valid data, or can be deleted. For example, lifetime may be indicated by the structure of "field C + field B + field a". The field a may be a 1-bit number (e.g., 0 or 1), and is used to indicate whether the lifetime of the data has expired and then becomes invalid. For example, when the field a is set to 1, the corresponding data automatically becomes invalid data after expiration, and may be automatically eliminated by the SSD, and when the field a is set to 0, the corresponding data does not automatically become invalid data after expiration, and the SSD stores the data as valid data until other indication that the data is set to invalid is received. The field B may include 2-bit data for indicating a unit corresponding to lifetime. For example, the minute is indicated by 00, the hour is indicated by 01, the day is indicated by 10, and the month is indicated by 11. The field C may include N-bit data for indicating the duration of lifetime in the unit indicated by the field B. N is an integer greater than or equal to 1, and the value of N may be determined according to the number of bytes included in the command structure corresponding to the IO command.
For example, an IO command requests to write video-monitored data into a storage medium of the SSD, and the video-monitored data generally has a set storage duration, and if the duration may be 3 months, the host may set field C of life time of the IO command to 11 (i.e., binary number of 3) and field B of life time to 11 (i.e., unit of life time is month). Meanwhile, the host can set the field A of the lifetime according to whether the data needs to be actively eliminated by the SSD, so that the SSD can actively set the data as invalid data after the data lifetime expires. As another example, the IO command requests that metadata or user data of a host be written to the storage medium of the SSD. Since the life time of such data is short and is rewritten more frequently, the host can set the field B and the field C of the life time according to the speed of metadata update, for example, to 1 hour or to 1 day.
It should be noted that, since data (such as metadata) with short lifetime is updated frequently, it is not necessary for the SSD to set the data as invalid data after the lifetime expires. Therefore, in the embodiment of the present application, in the lifetime of the IO command corresponding to such data, the field a may be set to 1, and may also be set to 0.
In the embodiment of the application, the lifetime carried in the IO command can be set by the host according to the delay requirement of the computer system for the IO command.
The deadline is used for indicating the response time delay of the processing result of the IO command. That is, the IO command needs to be executed in the deadline, and returns the processing result to the host. For example, the processing result may be an IO callback result after the IO command is completely executed. Illustratively, the deadline may be denoted by the structure of "field E + field D". The field D may include 2-bit data for indicating a unit of deadline. For example, microseconds is denoted by 00, milliseconds is denoted by 01, and seconds is denoted by 10. The field E may include M-bit data for indicating the duration of the deadline in the unit indicated by the field D. And M is an integer greater than or equal to 1, and the value of M can be determined according to the number of bytes included in the command structure body corresponding to the IO command.
For example, the IO command requests to write data generated internally during the operation of the array/server into the storage medium of the SSD, and since the data is insensitive to the latency requirement, the host may set the deadline of the IO command to a larger value, such as a deadline duration on the order of milliseconds (ms) to seconds(s). For another example, if the IO command requests to write host metadata or user data into the storage medium of the SSD, and the host metadata or user data needs to be updated into the storage medium of the SSD as soon as possible, that is, the data is sensitive to the delay requirement, the host may set the deadline of the IO command to a smaller value, such as a deadline duration on the order of microseconds (us) to milliseconds (ms).
In order to more clearly illustrate the setting method of lifetime and deadline, fig. 5 shows a data structure diagram of lifetime and deadline. The length of the data structure in the command structure of the IO command is 64 bits, and each row corresponds to 4 bytes. As shown in fig. 5, some flags are already set in the 0 th row and the 1 st row, and according to these flags, the SSD may complete the action of writing the data corresponding to the IO command to the storage medium. For example, in line 0, Byte (Byte)0 is marked with an operation code (Opcode), two bits (i.e., 8 th bit and 9 th bit) in the first Byte 1 are marked with whether the Command is a certain Command (FUSE: Fused operation) in the combined operation, two bits (i.e., 14 th bit and 15 th bit) in the last Byte 1 are marked with PSDT (PSDT: PRP or SGL for Data Transfer, which indicates the organization of the memory corresponding to the Command), and bytes 2 and 3 are marked with Command identifiers (Command Identifier). As another example, in line 1, bytes 0-4 are labeled with a Namespace Identifier (Namespace Identifier). In the embodiment of the present application, in line 3, two bytes (8 bits) of the 4 bytes may be used to mark a deadline, and the other two bytes may be used to mark a lifetime. For example, deadline is denoted by 16 bits in byte 0 and byte 1, and lifetime is denoted by 16 bits in byte 2 and byte 3. The 14 th bit and the 15 th bit may be used to indicate a field D of the deadline, and the 0 th bit to the 13 th bit may be used to indicate a field E of the deadline. If byte 0 and byte 1 are set to 0000000011110001, the corresponding deadline has a duration of 11100 milliseconds (binary), i.e., 60 milliseconds (decimal). Similarly, the 16 th bit may be used for field C indicating lifetime, the 17 th and 18 th bits may be used for field B indicating lifetime, and the 19 th to 31 th bits may be used for field a indicating lifetime. It should be noted that the above example is only an illustration of a method for setting deadline and lifetime, and other rules may also be followed for the method for setting deadline and lifetime, for example, if the deadline is set to default in units of 100 microseconds, and the lifetime is set to default in units of 1 minute, then the corresponding bit only needs to be set in the duration of the default unit.
S402, the SSD receives the IO command, and writes first data requested to be processed by the IO command into a first storage medium or a second storage medium according to the deadline and the lifetime carried by the IO command.
Wherein the first storage medium may be an NVM and the second storage medium may be a NAND.
In the embodiment of the application, according to the lifetime carried in the IO command, the SSD may determine the valid duration of the data requested to be processed by the IO command, and then the SSD may write the data with longer valid duration into the NAND and write the data with shorter valid duration into the NVM. According to the deadline carried in the IO command, the SSD may determine a requirement of the data requested to be processed by the IO command for the delay, and then the SSD may write the data with higher requirement for the delay into the NVM and write the data with lower requirement for the delay into the NAND.
For example, in some embodiments, the SSD may determine, according to the lifetime carried by the IO command, a duration of the lifetime of the IO command requesting to process the data (i.e., the first data). When the lifetime of the first data is long (for example, the first data is video monitoring data), that is, the first data is in a valid state for a long time, the SSD may directly write the first data into the NAND. When the lifetime of the first data is short (e.g., the first data is host metadata or user data), that is, the first data is updated in a short time or becomes invalid data after a short time, the SSD may write the first data into the NVM so that operations on the first data, such as subsequent updates, may be performed more quickly.
For example, as shown in fig. 6, after receiving an IO command, according to the lifetime carried by the IO command, when the lifetime is greater than a first threshold (e.g., f hours), the controller writes the first data into the NAND. When lifetime is less than a second threshold (e.g., g minutes), the first data is written to the NVM. Wherein the second threshold is less than the first threshold.
In other embodiments, the SSD may further write the first data into the NVM or the NAND according to the lifetime and the deadline carried by the IO command.
For example, as shown in fig. 7 (a) and 7 (b), after the controller receives the IO command, according to the lifetime and the deadline carried by the IO command, when the lifetime is greater than the first threshold (e.g., f hours) and the deadline is greater than the third threshold (e.g., e milliseconds), the first data is written into the NAND. The first data is written to the NVM when lifetime is less than a second threshold (e.g., g minutes), which is less than the first threshold.
In addition, when the lifetime and the deadline carried by the IO command do not satisfy the above condition (for example, the lifetime is greater than g minutes and less than f hours, or the deadline is less than e milliseconds), the first data may be cached in the NVM. As an example, the caching method may be: and temporarily writing the data into the NVM, and when the NVM is fully occupied, selecting the data with the maximum lifetime from the data stored in the NVM and writing the data into the NAND.
It should be noted that the first threshold, the second threshold, and the third threshold in the above examples may be flexibly set according to different usage scenarios. For example, in some usage scenarios, the lifetime of the data may be on the order of minutes or hours, and the first threshold may be set to a duration in hours and the second threshold may be set to a duration in minutes. For another example, in other usage scenarios, the deadline of the IO command is a duration on the order of milliseconds, and the third threshold may be set to a duration in seconds or milliseconds.
It is understood that the lifetime of the data is related to the attribute of the data, and therefore, the settings of the first threshold and the second threshold may also be determined according to the attribute of the data. For example, when the data is data for video surveillance, the first threshold or the second threshold may be set to a longer time duration in a usage scenario for the data because the data has a property of longer retention time, that is, the lifetime of the data is longer. For another example, when the data is the metadata of the host, since the data has the attribute of short retention time, that is, the lifetime of the data is short, in the usage scenario for the data, the first threshold or the second threshold may be set to a small duration. Similarly, the deadline of the data is related to the attribute of the data, and therefore, in a usage scenario for different data, the setting of the third threshold may be determined according to the attribute of the data.
In addition, the setting of the thresholds (such as the first threshold, the second threshold, and the third threshold) may be preset in the SSD, or may be set by the user in different scenarios. The embodiments of the present application are not limited thereto.
Illustratively, S402 in fig. 4 may include S801-S803 as shown in fig. 8.
S801, receiving the IO command by the SSD.
When the deadline is greater than the third threshold and the lifetime is greater than the first threshold, executing the following S802; when the lifetime is less than the second threshold, or the lifetime is greater than the second threshold and less than the first threshold, or the deadline is less than the third threshold, the following S803 is performed.
S802, writing the first data into the NAND.
S803, writing the first data into the NVM.
It should be noted that, in the embodiment of the present application, the host may also set only the deadline of the IO command. The SSD may determine, according to the deadline carried by the IO command, a requirement of the first data requested to be processed by the IO command for the time delay. When the first data is sensitive to the delay (for example, the first data is metadata of a host or user data), that is, the IO command needs to be executed as soon as possible and an execution result is returned to the host, the storage device may write the first data into the NVM having the faster write rate and return the execution result to the host, where the execution result may be an IO callback message of the IO command, and is used to indicate that the data requested to be processed by the host IO command has been written. When the first data is not latency sensitive (e.g., the first data is data generated internally during the operation of the array/server), i.e., the IO command does not need to be executed in a short time and returns an execution result to the host, the memory device may write the first data into the NAND with the slower write rate and return the execution result to the host.
When data is written into the NAND, the existing data needs to be erased and then written, and a large amount of user data and metadata need to be migrated in the process, so that the data volume actually processed by the SSD when data is written is much larger than the data volume of the data to be written, which may also be referred to as write amplification. It can be appreciated that due to the write amplification, a large amount of data processing pressure is added to the SSD, which also affects the firmware life of the SSD. In order to solve the problem, further, when data is written into the NAND, according to different lifetimes carried by IO commands, data with similar lifetimes can be written into the same block, and write amplification is reduced without changing existing hardware.
Thus, as shown in FIG. 9, the above-described S802 may include the following S901-S902.
S901, dividing the block of the second storage medium into a plurality of physical storage block groups, wherein different physical storage block groups correspond to different life cycle intervals.
It will be appreciated that in actual use, a large amount of data will need to be written to the NAND for storage. The lifetime of these data is also different and may cover a large time area. In the embodiment of the application, different blocks can be divided for data with different lifetime in the NAND.
For example, 16 blocks are divided for data with different lifetime in the NAND, and each block may correspond to a lifetime interval. For example, the lifetime section corresponding to 16 blocks may be (0,24h ], (1d, 2d ], (2d, 4d ], (4d, 8d ], (8d, 16d ], (16d, 32d ], (32d, 2m ], (2m, 4m ], (4m, 6m ], (6m, 8m ], (8m, 10m ], (10m, 12m ], (1y, 2y ], (2y, 3y ], (3y, 4y ], [4y, ∞) where h represents an hour unit, d represents a day unit, m represents a month unit, and y represents an year unit.
In the embodiment of the present application, the process of dividing the block group by the plurality of lifetime may be implemented by a plurality of methods, and an exemplary description is given below.
In some embodiments, the partitioning of the block groups may be performed according to the concurrent write bandwidth of the NAND. The concurrent write bandwidth of the NAND is the maximum number of blocks that can simultaneously perform data write at the same time. For example, taking the concurrent write bandwidth of the NAND as 64 and the lifetime intervals as 16 as examples, at most 4 blocks may be allocated to the data corresponding to each lifetime interval, so that the data included in 16 different intervals by the lifetime respectively may be written in the NAND in parallel.
In other embodiments, a corresponding number of blocks may be respectively allocated to data corresponding to different lifetime intervals according to the IO write bandwidth of the lifetime interval. For example, the IO write bandwidth of the first group of data corresponding to lifetime interval 1 is a M/s, and the IO write bandwidth of the second group of data corresponding to lifetime interval 2 is 3a M/s, so that the number of blocks allocated to the second group of data may be 3 times the number of blocks allocated to the first group of data.
In other embodiments, a corresponding number of blocks may be respectively allocated to data corresponding to different lifetime intervals, according to the IO write bandwidth size of the lifetime interval and the write rate of each block. For example, the write rate of block in the NAND is b M/s, the IO write bandwidth of the first group of data corresponding to the lifetime interval 3 is a M/s, and the IO write bandwidth of the second group of data corresponding to the lifetime interval 4 is 3a M/s. If 3a is smaller than b, 1 block can be distributed to the first group of data and the second group of data, so that the utilization rate of the blocks is improved; if b is larger than 2a and b is smaller than 3a, 1 block can be allocated to the first group of data, and 2 blocks can be allocated to the second group of data, so that the utilization rate of the blocks can be improved.
In other embodiments, 1 block may be allocated to each group of data in the N groups of data, and monitoring the remaining storage space of the block is performed, and when the storage space of the 1 block allocated to a group of data is already fully occupied or is about to be fully occupied, 1 new block is allocated to the group of data for storing other data in the group of data.
It should be noted that the block dividing method is only some exemplary descriptions, in this embodiment of the present application, the method may be used alone, or multiple methods may be used in combination, and this embodiment of the present application is not limited herein. Of course, the block partitioning policy may also be periodically adjusted, or may be triggered to be adjusted after a large change in the life cycle of the IO model or data is detected.
S902, writing the first data into a block group corresponding to the interval where the lifetime carried by the IO command is located.
For example, the controller of the SSD may write the first data into the block group allocated to the NAND according to the interval where the lifetime carried by the IO command is located.
It is understood that after performing S803 and S804 shown in fig. 8, when the storage space of the NVM is fully occupied, the SSD may write the data with the maximum lifetime among all the data stored in the NVM into the NAND according to S901-S902 shown in fig. 9.
In the above description, the SSD includes two storage media, namely NAND and NVM, as an example. When three or more storage media with different writing rates are included in the SSD, the method shown in fig. 4, fig. 8, or fig. 9 may still be applied in the data storage process, and the specific implementation process is similar to the above example, and is not described here again.
In the above description, the IO command is used as an example of the write command. The data storage method provided by the embodiment of the application can also be used in a scenario in which the IO command is a read command. For example, before the host issues the read IO command, the deadline may be set in the read IO command, so that the SSD may determine how long the data to be read needs to be returned to the host according to the deadline carried in the read IO command, so that the SSD may perform efficient response when the host needs to read some data as soon as possible.
Thus, the SSD can determine which data needs to be written into the NVM having a higher write rate but limited capacity and which data needs to be written into the NAND having a larger capacity according to the lifetime and/or the deadline carried in the IO command. Therefore, the SSD can autonomously optimize the layout of the stored data, realize the hierarchical storage of the data, simplify the interaction process of host and the SSD, and prolong the service life of the SSD. Further, the SSD may efficiently arrange a storage order or a storage sequence of the data according to the deadline carried in the IO command, so as to ensure that the SSD can return the storage result of the data to the host within a specified time.
In addition, the SSD can write data with similar lifetime into the same block, and under the condition of not changing the existing hardware, when the SSD retrieves a blank block and finds a physical block storing invalid data, the SSD can directly erase the whole physical block without migrating the valid data on the physical block.
The scheme provided by the embodiment of the application is mainly introduced from the perspective of a method. In order to implement the above functions, it includes a hardware structure and/or a software module for performing each function. Those of skill in the art would readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the SSD may be divided into the functional modules according to the method example, for example, the SSD may be a storage device, the storage device may divide each functional module corresponding to each function, or may integrate two or more functions into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, in the embodiment of the present application, the division of the module is schematic, and is only one logic function division, and there may be another division manner in actual implementation.
Please refer to fig. 10, which is a schematic diagram illustrating a memory device according to an embodiment of the present disclosure. The storage device can be used for executing any data storage method provided by the embodiment of the application, such as the data storage method shown in fig. 4, fig. 8 or fig. 9.
As shown in fig. 10, the storage apparatus may include a receiving unit 1001, a writing unit 1002, a first storage medium, and a second storage medium, wherein a writing rate of the first storage medium is higher than a writing rate of the second storage medium.
The receiving unit 1001 is configured to receive an input/output (IO) command, where the IO command is used to request that first data be written into the memory device, and the IO command includes a lifetime (lifetime) of the first data, where the lifetime is used to indicate a duration of time when the first data is valid data. Illustratively, the receiving unit 1001 may be configured to perform S402 shown in fig. 4 or S801 shown in fig. 8.
The writing unit 1002 is configured to write the first data to the second storage medium when the life cycle of the first data is greater than a first threshold. For example, the writing unit 1002 may be configured to execute S402 shown in fig. 4 or S802 shown in fig. 8.
Optionally, the writing unit 1002 is further configured to write the first data into the first storage medium when a life cycle of the first data is smaller than a second threshold, where the second threshold is smaller than the first threshold. Illustratively, the writing unit 1002 may also be configured to execute S803 as shown in fig. 8.
Optionally, the IO command further includes an expiration time (deadline), and the expiration time is used to indicate a response delay of returning the IO command processing result.
The writing unit 1002 is further configured to write the first data into the second storage medium when the life cycle of the first data is greater than the first threshold and the expiration time is greater than a third threshold. Illustratively, the writing unit 1002 may also be configured to perform S802 as shown in fig. 8.
Optionally, the writing unit 1002 is further configured to write the first data into the first storage medium when a life cycle of the first data is greater than the second threshold and smaller than the first threshold, or an expiration time of the first data is smaller than a third threshold.
Optionally, the writing unit 1002 is further configured to write the second data stored in the first storage medium into the second storage medium after the first storage medium is completely occupied; wherein the second data is data having the longest life cycle among data stored in the first storage medium. Illustratively, the write unit 1002 may also be used to perform a data transfer process as indicated by the dashed line in fig. 9.
Optionally, the apparatus further comprises: a dividing unit 1003; the dividing unit 1003 is configured to divide a physical storage block (block) of the second storage medium into a plurality of physical storage block groups, where different physical storage block groups correspond to different lifecycle intervals. Illustratively, the dividing unit 1003 may also be used to execute S901 as shown in fig. 9.
The writing unit 1002 is further configured to write the first data into the first physical storage block group according to the life cycle of the first data, where a life cycle interval corresponding to the first physical storage block group includes the life cycle of the first data. Illustratively, the dividing unit 1003 may also be configured to perform S902 shown in fig. 9.
Optionally, the dividing unit 1003 is further configured to divide, according to a concurrent write bandwidth of the second storage medium, physical storage blocks, in the second storage medium, in a number corresponding to the concurrent write bandwidth into a plurality of physical storage block groups, where the concurrent write bandwidth is a maximum number of physical storage blocks that can perform data writing at the same time of the second storage medium.
For the explanation of the related contents and the description of the beneficial effects in any of the above-mentioned storage devices, reference may be made to the corresponding method embodiments, which are not described herein again. In one example, the receiving unit 1001, the writing unit 1002, and the dividing unit 1003 may be implemented by a certain pin of a chip on which the storage device is located or a certain block of circuit thereon.
Please refer to fig. 11, which is a schematic block diagram of another memory device according to an embodiment of the present application. The storage device can be used for executing any data storage method provided by the embodiment of the application, such as the data storage method shown in fig. 4, fig. 8 or fig. 9.
As shown in fig. 11, the storage apparatus may include a controller 1101, a first storage medium 1102, and a second storage medium 1103, wherein a write rate of the first storage medium is higher than a write rate of the second storage medium. Illustratively, the first storage medium may be an NVM and the second storage medium may be a NAND.
Among other things, the controller 1101 may be used to implement the receiving unit 1001, the writing unit 1002 and related control functions as shown in fig. 10.
Illustratively, the controller 1101 is configured to receive an input/output IO command, where the IO command is used to request to write first data into the memory device, and the IO command further carries a life cycle of the first data; the controller 1101 is further configured to write the first data to the second storage medium 1103 when the life cycle of the first data is greater than a first threshold.
Optionally, the controller 1101 is further configured to write the first data to the first storage medium 1102 when the life cycle of the first data is smaller than a second threshold, where the second threshold is smaller than the first threshold.
Optionally, the IO command further includes an expiration time; the controller 1101 is further configured to write the first data into the second storage medium 1103 when the life cycle of the first data is greater than the first threshold and the expiration time is greater than a third threshold.
Optionally, the controller 1101 is further configured to write the first data into the first storage medium 1102 when the life cycle of the first data is greater than the second threshold and smaller than the first threshold, or the expiration time of the first data is smaller than the third threshold.
Optionally, the controller 1101 is further configured to write the second data stored in the first storage medium 1102 into the second storage medium 1103 after the first storage medium 1102 is fully occupied; wherein the second data is the data with the longest life cycle among the data stored in the first storage medium 1102.
Optionally, the controller 1101 is further configured to divide a physical storage block of the second storage medium 1103 into a plurality of physical storage block groups, where different physical storage block groups correspond to different lifecycle intervals; the controller 1101 is further configured to determine a first physical storage block group according to a life cycle of the first data, where the life cycle of the first data falls within a life cycle interval corresponding to the first physical storage block group; the controller 1101 writes the first data to the first physical memory block group.
Optionally, the controller 1101 is further configured to divide, according to a concurrent write bandwidth of the second storage medium 1103, physical storage blocks, of the second storage medium 1103, the number of which is corresponding to the concurrent write bandwidth, into a plurality of physical storage block groups, where the concurrent write bandwidth is the maximum number of physical storage blocks, of the second storage medium 1103, that can perform data writing at the same time.
Embodiments of the present application also provide a controller, which may include a processing circuit and an interface. The processing circuit is used for calling and running a computer program stored in a computer-readable storage medium from the computer-readable storage medium storing instructions to execute the data storage method referred to in the above description. Illustratively, the controller may be the controller 1101 shown in fig. 11.
For the explanation of the related content and the description of the beneficial effects in any of the above-mentioned storage devices, reference may be made to the corresponding method embodiments, which are not repeated herein.
Embodiments of the present application further provide a data processing system, which may be a computer system, the system including any one of the storage devices described above, and the system further including storage devices for the first storage medium and the second storage medium. The writing rate of the first storage medium is higher than that of the second storage medium, for example, the first storage medium is NVM, and the second storage medium is NAND. The data processing system may process the data according to the data storage method as shown in fig. 4 or fig. 8 or fig. 9.
Those skilled in the art will appreciate that all or part of the steps for implementing the above embodiments may be implemented by a program instructing the associated hardware to perform the steps. The program may be stored in a computer-readable storage medium. The above-mentioned storage medium may be a read-only memory, a random access memory, or the like. The processing unit or processor may be a central processing unit, a general purpose processor, an Application Specific Integrated Circuit (ASIC), a microprocessor (DSP), a Field Programmable Gate Array (FPGA) or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof.
The embodiments of the present application also provide a computer program product containing instructions, which when executed on a computer, cause the computer to execute any one of the methods in the above embodiments. The computer program product includes one or more computer instructions. The procedures or functions described in accordance with the embodiments of the present application are all or partially generated upon loading and execution of computer program instructions on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. Computer-readable storage media can be any available media that can be accessed by a computer or can comprise one or more data storage devices, such as servers, data centers, and the like, that can be integrated with the media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It should be noted that the above devices for storing computer instructions or computer programs provided in the embodiments of the present application, such as, but not limited to, the above memories, computer readable storage media, communication chips, and the like, are all nonvolatile (non-volatile).
Other variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed application, from a review of the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other elements or steps, and the word "a" or "an" does not exclude a plurality. A single processor or other unit may fulfill the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.
Although the present application has been described in conjunction with specific features and embodiments thereof, various modifications and combinations can be made thereto without departing from the spirit and scope of the application. Accordingly, the specification and figures are merely exemplary of the present application as defined in the appended claims and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of the present application.

Claims (17)

  1. A data storage method is applied to a Solid State Disk (SSD) comprising a first storage medium and a second storage medium, wherein the writing rate of the first storage medium is higher than that of the second storage medium, and the method comprises the following steps:
    the solid state disk receives an input/output (IO) command, the IO command is used for requesting to write first data into the solid state disk, and the IO command also carries a life cycle life time of the first data;
    responding to the IO command, and when the life cycle of the first data is larger than a first threshold, writing the first data into the second storage medium by the solid state disk.
  2. The method of claim 1, further comprising:
    and when the life cycle of the first data is smaller than a second threshold value, the solid state disk writes the first data into the first storage medium, wherein the second threshold value is smaller than the first threshold value.
  3. The method according to claim 1 or 2, wherein the IO command further carries an deadline;
    when the life cycle of the first data is greater than a first threshold, the writing, by the solid state disk, the first data into the second storage medium includes:
    and when the life cycle of the first data is greater than the first threshold and the deadline is greater than a third threshold, the solid state disk writes the first data into the second storage medium.
  4. The method of claim 3, further comprising:
    and when the life cycle of the first data is greater than the second threshold and smaller than the first threshold, or the deadline of the first data is smaller than the third threshold, the solid state disk writes the first data into the first storage medium.
  5. The method of claim 4, further comprising:
    after the first storage medium is completely occupied, the solid state disk writes second data stored in the first storage medium into the second storage medium;
    wherein the second data is data having a longest life cycle among data stored in the first storage medium.
  6. The method according to any one of claims 1-5, further comprising:
    the solid state disk divides the physical storage block of the second storage medium into a plurality of physical storage block groups, and different physical storage block groups correspond to different life cycle intervals;
    the solid state disk writes the first data into the second storage medium, and the method includes:
    the solid state disk determines a first physical storage block group according to the life cycle of the first data, and the life cycle of the first data falls into a life cycle interval corresponding to the first physical storage block group;
    and the solid state disk writes the first data into a first physical storage block group.
  7. The method of claim 6, wherein the dividing, by the solid state disk, the physical storage blocks of the second storage medium into a plurality of physical storage block groups comprises:
    the solid state disk divides physical storage blocks, corresponding to the concurrent write bandwidth, in the second storage medium into a plurality of physical storage block groups according to the concurrent write bandwidth of the second storage medium, where the concurrent write bandwidth is the maximum number of physical storage blocks capable of performing data writing while the second storage medium is in the concurrent write bandwidth.
  8. A storage device, the device comprising: the device comprises a controller, a first storage medium and a second storage medium, wherein the writing rate of the first storage medium is higher than that of the second storage medium;
    the controller is configured to receive an input/output (IO) command, where the IO command is used to request to write first data into the storage device, and the IO command further carries a life cycle life of the first data;
    the controller is further configured to write the first data to the second storage medium when a life cycle of the first data is greater than a first threshold.
  9. The apparatus of claim 8,
    the controller is further configured to write the first data to the first storage medium when a life cycle of the first data is less than a second threshold, where the second threshold is less than the first threshold.
  10. The apparatus according to claim 8 or 9, wherein the IO command further carries an deadline;
    the controller is further configured to write the first data to the second storage medium when the life cycle of the first data is greater than the first threshold and the expiration time is greater than a third threshold.
  11. The apparatus of claim 10,
    the controller is further configured to write the first data to the first storage medium when a life cycle of the first data is greater than the second threshold and smaller than the first threshold, or an expiration time of the first data is smaller than the third threshold.
  12. The apparatus of claim 11,
    the controller is further configured to write second data stored in the first storage medium to the second storage medium after the first storage medium is completely occupied;
    wherein the second data is data having a longest life cycle among data stored in the first storage medium.
  13. Device according to any of claims 8-12, characterized in that it is a device according to any of claims 8-12, characterized in that
    The controller is further configured to divide a physical storage block of the second storage medium into a plurality of physical storage block groups, where different physical storage block groups correspond to different lifecycle intervals;
    the controller is further configured to determine a first physical storage block group according to a life cycle of the first data, where the life cycle of the first data falls within a life cycle interval corresponding to the first physical storage block group;
    the controller is further configured to write the first data into a first physical memory block group.
  14. The apparatus of claim 13,
    the controller is further configured to divide physical storage blocks, in the second storage medium, of a number corresponding to the concurrent write bandwidth into a plurality of physical storage block groups according to the concurrent write bandwidth of the second storage medium, where the concurrent write bandwidth is a maximum number of physical storage blocks capable of performing data writing at the same time of the second storage medium.
  15. A computer-readable storage medium containing instructions that, when executed on a computer, cause the computer to perform the method of any of claims 1-7.
  16. A controller, characterized in that the controller comprises processing circuitry and an interface; the processing circuit is configured to invoke and run a computer program stored in the computer-readable storage medium from the computer-readable storage medium according to claim 15 to perform the method according to any one of claims 1 to 7.
  17. A computer system, characterized in that the computer system comprises a host and a storage device according to any one of claims 8-14; the host is configured to send an input/output (IO) command to the storage device requesting to write first data to the storage device, and the storage device is configured to execute the method according to any one of claims 1 to 7 in response to the IO command.
CN201980102966.7A 2019-12-19 2019-12-19 Data storage method and storage device Pending CN114830077A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/126789 WO2021120137A1 (en) 2019-12-19 2019-12-19 Data storage method and storage apparatus

Publications (1)

Publication Number Publication Date
CN114830077A true CN114830077A (en) 2022-07-29

Family

ID=76478079

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201980102966.7A Pending CN114830077A (en) 2019-12-19 2019-12-19 Data storage method and storage device

Country Status (2)

Country Link
CN (1) CN114830077A (en)
WO (1) WO2021120137A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116774905A (en) * 2022-03-07 2023-09-19 华为技术有限公司 Storage device and related data partition management method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140181452A1 (en) * 2012-12-26 2014-06-26 Nvidia Corporation Hardware command training for memory using read commands
CN104881259B (en) * 2015-06-29 2018-07-24 北京联想核芯科技有限公司 A kind of data processing method and device and storage device
CN105204783B (en) * 2015-10-13 2018-12-07 华中科技大学 A kind of solid-state disk rubbish recovering method based on data lifetime
CN107967121B (en) * 2017-10-25 2020-04-14 华为技术有限公司 Data writing method and storage device
CN108710474A (en) * 2018-05-18 2018-10-26 郑州云海信息技术有限公司 A kind of date storage method, device and computer storage media
CN109164975A (en) * 2018-06-28 2019-01-08 华为技术有限公司 A kind of method and solid state hard disk writing data into solid state hard disk

Also Published As

Publication number Publication date
WO2021120137A1 (en) 2021-06-24

Similar Documents

Publication Publication Date Title
KR102569783B1 (en) Out-of-order zone namespaces
US11416161B2 (en) Zone formation for zoned namespaces
WO2021061190A1 (en) Zoned namespaces in solid-state drives
US9286212B2 (en) Semiconductor device and method of controlling non-volatile memory device
US20200409601A1 (en) Hold of Write Commands in Zoned Namespaces
US20150278104A1 (en) Hybrid memory device, memory system including same and data processing method
EP3462320B1 (en) Dynamic page allocation in memory
JP5847940B2 (en) Semiconductor device
US11513723B2 (en) Read handling in zoned namespace devices
JP2018206378A (en) Data storage device with rewritable in-place memory
CN114746834A (en) Partition append command scheduling based on partition status
CN114730290A (en) Moving change log tables to align with partitions
JP2021522567A (en) Equipment and method for counter update operation
CN114730250A (en) Weighting read commands according to partitions in a storage device
KR20230142795A (en) Different write prioritization in ZNS devices
US11537293B2 (en) Wear leveling methods for zoned namespace solid state drive
WO2021216124A1 (en) Keeping zones open with intermediate padding
CN114830077A (en) Data storage method and storage device
US11593032B1 (en) Memory sub-system data migration
US20150120991A1 (en) Data processing system and operating method thereof
JP2018206377A (en) Data storage device with rewritable in-place memory
US20240028230A1 (en) Storage Access Communications and Data Placement for Improved Performance and Reduced Write Amplification
US20240028231A1 (en) Random Storage Access and Data Erasure for Improved Performance and Reduced Write Amplification
CN114730605A (en) Weighted read command and open block timer for storage devices

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination