CN117492637A - Data writing method and solid state disk - Google Patents

Data writing method and solid state disk Download PDF

Info

Publication number
CN117492637A
CN117492637A CN202210883284.8A CN202210883284A CN117492637A CN 117492637 A CN117492637 A CN 117492637A CN 202210883284 A CN202210883284 A CN 202210883284A CN 117492637 A CN117492637 A CN 117492637A
Authority
CN
China
Prior art keywords
data
page
solid state
state disk
nonvolatile memory
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
CN202210883284.8A
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.)
XFusion Digital Technologies Co Ltd
Original Assignee
XFusion Digital 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 XFusion Digital Technologies Co Ltd filed Critical XFusion Digital Technologies Co Ltd
Priority to CN202210883284.8A priority Critical patent/CN117492637A/en
Publication of CN117492637A publication Critical patent/CN117492637A/en
Pending legal-status Critical Current

Links

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
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • G06F3/0611Improving I/O performance in relation to response time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • G06F12/0871Allocation or management of cache space
    • 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
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • 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
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • 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
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • 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
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • 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
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1016Performance improvement
    • G06F2212/1024Latency reduction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1041Resource optimization
    • G06F2212/1044Space efficiency improvement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/20Employing a main memory using a specific memory technology
    • G06F2212/202Non-volatile memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/20Employing a main memory using a specific memory technology
    • G06F2212/202Non-volatile memory
    • G06F2212/2022Flash memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7201Logical to physical mapping or translation of blocks or pages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7202Allocation control and policies

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

The embodiment of the application discloses a data writing method and a solid state disk, wherein the method is applied to the solid state disk, the solid state disk comprises a nonvolatile memory, a flash memory and a processing unit, the processing unit is respectively coupled with the nonvolatile memory and the flash memory, and the method comprises the following steps: the method comprises the steps that a solid state disk receives a first writing request, the first writing request comprises first data, and when the solid state disk determines that the first data are high-heat data, the first data are written into a nonvolatile memory; and when the solid state disk determines that the first data is not the high-heat data, writing the first data into the flash memory. According to the embodiment of the application, the solid state disk can write the high-heat data into the nonvolatile memory, and write the non-high-heat data into the flash memory, and because the space of the nonvolatile memory can be covered, the generation of invalid pages can be avoided, and the space utilization rate of the solid state disk can be improved.

Description

Data writing method and solid state disk
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a data writing method and a solid state disk.
Background
With the continuous development of storage technology, the advantage of fast speed of borrowing and writing of the solid state disk has replaced the traditional mechanical hard disk in many scenes. The solid state disk mainly uses a flash memory as a storage medium, a minimum read-write unit of the flash memory is a physical page, and the size of the physical page can be 4 Kilobytes (KB), 8KB and the like. The minimum erase unit of flash memory is a physical block, which may include a plurality of consecutive physical pages (e.g., 4 or 8).
Because the solid state disk cannot be overwritten when writing data into the flash memory, free physical pages in the flash memory must be written. Therefore, in the case where the data written in the flash memory is data having high heat (i.e., data which is updated frequently), the data is updated frequently, which results in a large amount of invalid data (i.e., garbage data). These invalid data occupy more memory space, so that the overall space utilization of the flash memory is low.
Disclosure of Invention
The embodiment of the application discloses a data writing method and a solid state disk, which are used for improving the space utilization rate of a flash memory in the solid state disk.
The first aspect discloses a data writing method, which can be applied to a solid state disk, a module (e.g., a chip) in the solid state disk, and a logic module or software capable of implementing all or part of functions of the solid state disk, where the solid state disk includes a nonvolatile memory, a flash memory, and a processing unit, and the processing unit is respectively coupled to the nonvolatile memory and the flash memory, and is described below as being applied to the solid state disk. The data writing method may include: receiving a first write request, the first write request including first data; when the first data is determined to be high-heat data, writing the first data into the nonvolatile memory; and writing the first data into the flash memory when the first data is determined not to be high-heat data.
In this embodiment of the present application, after the solid state disk receives the first write request, it may be determined first whether the first data carried by the first write request is high heat data, if so, the first data may be written into the nonvolatile memory, and if not, the first data may be written into the flash memory. Since the nonvolatile memory can be overwritten, no invalid page is generated even if the first data is updated frequently. The non-high-heat data stored in the flash memory is not updated frequently, so that a large number of invalid pages can be prevented from being generated in the flash memory of the solid state disk, and the space utilization rate of the flash memory in the solid state disk can be improved. In addition, because the read-write speed of the nonvolatile memory is larger than that of the flash memory, the high-heat data is written into the nonvolatile memory, so that the read-write efficiency of the whole solid state disk can be improved.
As a possible implementation manner, the method may further include: when the first write request satisfies at least one first condition, determining that the first data is high heat data, the first condition comprising: the first write request is an update request, the data amount of the first data is less than a first threshold, and the first write request is a non-sequential write request.
As one possible implementation, the nonvolatile memory uses page mapping, and the writing the first data into the nonvolatile memory includes: when the first writing request is an updating request and the second data is stored in the nonvolatile memory, the first data is rewritten into a first physical page, and the first physical page is a physical page occupied by the second data in the nonvolatile memory; the second data is old data corresponding to the first data; and writing the first data into a first free physical page of the nonvolatile memory in the case that the first write request is an update request and the second data is stored in the flash memory, or in the case that the first write request is not an update request and the data amount of the first data is less than a first threshold or the first write request is a non-sequential write request.
In this embodiment of the present application, if old data (i.e., second data) corresponding to the first data is stored in the nonvolatile memory, the first data may directly cover the second data, so that space utilization may be improved, and at this time, the corresponding mapping relationship does not need to be updated, so that processing resources may be saved.
As a possible implementation manner, in a case where the second data is stored in the flash memory, the method may further include: and updating the number of valid pages and the writing weight of the partition where the second data is located.
As one possible implementation, the nonvolatile memory includes a near log area and a far log area; the writing the first data to the first free physical page of the nonvolatile memory specifically includes: writing the first data into a first free physical page of the nonvolatile memory, wherein the first free physical page is positioned in the near-journaling area.
As a possible implementation manner, the method may further include: and under the condition that the free space of the near log area is smaller than a second threshold value, migrating the valid page with the near log area reading weight smaller than a third threshold value to the far log area.
In the embodiment of the application, the solid state disk can write the high-heat data into the near-journal area in the nonvolatile memory, and then when the free space of the near-journal area is insufficient, the effective page with a lower reading weight in the near-journal area is migrated to the far-journal area. Thus, the reading weight of the effective page in the near log area is generally larger than that of the effective page in the far log area, and the data can be conveniently read later.
As a possible implementation manner, the method may further include: and if the free space of the far log area is smaller than a sixth threshold value, copying at least Q valid pages with continuous logical page addresses into the flash memory, wherein Q is a positive integer.
In this embodiment of the present invention, because the nonvolatile memory may be overwritten, when the free space of the nonvolatile memory is insufficient, the solid state disk may have a lower write weight (e.g., less than the seventh threshold) in the remote log area, and the valid pages with consecutive logical page addresses may be copied to the flash memory sequentially. Since the write weights of the effective pages are low, it can be ensured that the effective pages are not updated frequently, so that the generation of invalid pages can be reduced. In addition, the size of Q may be the number of physical pages included in one physical block or the number of physical pages included in a plurality of physical blocks (such as one partition), so that it is ensured that one or more physical blocks or partitions can be written, and the overall utilization of the flash memory can be improved.
As a possible implementation manner, the method may further include: updating the write weight of the first physical page when the first data is overwritten to the first physical page; when the first data is written into a first free physical page of the nonvolatile memory, the writing weight of the first free physical page is updated.
As one possible implementation, the flash memory employs block mapping, and the writing the first data into the flash memory includes: writing the first data into a second free physical page of the flash memory, the second free physical page being located in the first physical block; the method may further comprise: the write weights of the second free physical page are updated.
As a possible implementation manner, the method may further include: and recovering invalid data of the flash memory under the condition that the free space of the flash memory is smaller than a fourth threshold value.
As a possible implementation manner, the flash memory includes N partitions, where N is a positive integer, and the method may further include: dividing non-idle partitions in the N partitions into K heat levels according to the read-write weights of the N partitions, wherein the read-write weights corresponding to the K heat levels are different, and K is a positive integer smaller than or equal to L; the reclaiming invalid data of the flash memory comprises: copying the effective pages of a second partition to the remote log area, wherein the second partition is a partition with the number of invalid pages larger than a fifth threshold value in a first heat level, and the first heat level is the heat level with the maximum corresponding read-write weight value in the K heat levels; the second partition is erased.
In the embodiment of the application, when the free space of the flash memory is insufficient, the solid state disk can determine the partition with larger read-write weight and smaller effective page number in the flash memory as the victim partition, copy a small number of effective pages of the partition to the remote log area, and erase the partition. It can be seen that the garbage collection process described above does not involve a merge operation (e.g., a full merge operation), but only involves a small number of copies of valid pages, thereby reducing the overhead of flash garbage collection.
As a possible implementation manner, the solid state hard disk further includes a cache, the processing unit is further coupled to the cache, and the method may further include: and when the solid state disk is powered on again, loading the effective page with the reading weight larger than the ninth threshold value in the near-journaling area and the page mapping table of the nonvolatile memory into the cache.
In the embodiment of the application, after the solid state disk is abnormally powered down, when the solid state disk is powered up again, the solid state disk can load the effective page with the reading weight larger than the ninth threshold value in the near-journaling area and the nonvolatile page mapping table into the cache, so that the power down recovery flow can be accelerated, and the influence on the application running in the host can be reduced.
As a possible implementation manner, the cache is further configured to store a page mapping table of the nonvolatile memory and a block mapping table of the flash memory, the first write request further includes a first logical page address of the first data, and the method further includes: when the first data is determined to be high-heat data, adding the corresponding relation between the first logical page address and the physical page where the first data is located in the page mapping table; and when the first data is not high-heat data, adding the corresponding relation between the first logical block address of the first data and the physical block where the first data is located in the block mapping table.
As a possible implementation manner, the method may further include: receiving a first read request, the first read request including a second logical page address, the second logical page address including one or more logical page addresses; reading data from the nonvolatile memory according to the second logical page address and the page mapping table in the case that the second logical page address exists in the page mapping table; in the case where the second logical page address is present in the page mapping table, data is read from the flash memory according to the second logical page address and the block mapping table.
As one possible implementation, the page mapping table includes a first page mapping table and a second page mapping table, the first page mapping table is a page mapping table of the near log area, the second page mapping table is a page mapping table of the far log area, and the reading data from the nonvolatile memory according to the second logical page address and the page mapping table of the nonvolatile memory includes: reading data from the near log region according to the second logical page address and the first page mapping table in the case where the second logical page address exists in the first page mapping table; in the case where the second logical page address exists in the second page mapping table, data is read from the remote log area according to the second logical page address and the second page mapping table.
As a possible implementation manner, the solid state disk further includes a cache, where the cache stores physical pages in the near log area with a reading weight greater than a ninth threshold, and the method may further include: and under the condition that the data corresponding to the second logical page address is stored in the cache, reading the data from the cache according to the second logical page address.
In the embodiment of the present application, the flow of writing data and the migration flow of the effective page in the near log area may enable the read weight of the effective page in the near log area to be generally greater than the read weight of the effective page in the far log area, and the read weight of the effective page in the far log area is generally greater than the read weight of the effective page in the flash memory. The greater the reading weight of an effective page, the more likely the data of the effective page is read, so when the solid state disk receives a read request, the data can be read from the cache in the order from high to low according to the reading weight, if the data read by the read request is not stored in the cache, the data can be read from the near log area, if the data read by the read request is not stored in the near log area, the data can be read from the far log area, and if the data read by the read request is not stored in the far log area, the data can be read from the flash memory. By reading the data through the reading flow, the reading efficiency of the data can be improved.
As a possible implementation manner, the method may further include: updating the reading weight of the second physical page, wherein the second physical page is the physical page corresponding to the second logical page address.
The second aspect discloses a solid state disk, which comprises a nonvolatile memory, a flash memory and a processing unit; the processing unit is respectively coupled with the nonvolatile memory and the flash memory; the processing unit is configured to perform the data writing method disclosed in the first aspect or any implementation manner of the first aspect.
As a possible implementation manner, the processing unit includes a processor and a storage controller, where the processor is coupled to the storage controller, and where the processor sends an instruction to the storage controller, or where the storage controller generates the instruction, and where the storage controller performs the data writing method disclosed in the first aspect or any implementation manner of the first aspect, in response to the instruction.
As one possible implementation manner, the nonvolatile memory includes one or more nonvolatile memory chips, and the nonvolatile memory chips are any one of phase change memory and 3D magnetic memory.
As one possible implementation, the flash memory includes one or more flash memory chips, which are any one of nand flash memory chips and nor flash memory chips.
A third aspect discloses a computer-readable storage medium having stored thereon a computer program or computer instructions which, when run, implement the data writing method as disclosed in the above aspects.
A fourth aspect discloses a chip comprising a processor for executing a program stored in a memory, which when executed causes the chip to perform the data writing method disclosed in the above aspects.
As a possible implementation, the memory is located off-chip.
A fifth aspect discloses a computer program product comprising computer program code which, when run, causes the data writing method disclosed in the above aspects to be performed.
It will be appreciated that the solid state disk provided in the second aspect, the computer readable storage medium provided in the third aspect, the chip provided in the fourth aspect and the computer program product provided in the fifth aspect are all configured to perform the data writing method provided in the first aspect and any possible implementation manner of the first aspect of the present application. Therefore, the advantages achieved by the method can be referred to as the advantages of the corresponding method, and will not be described herein.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a system architecture disclosed in an embodiment of the present application;
FIG. 2 is a schematic diagram of a functional module disclosed in an embodiment of the present application;
FIG. 3 is a schematic flow chart of a data writing method disclosed in an embodiment of the present application;
FIG. 4 is a schematic flow chart of a data reading method disclosed in an embodiment of the present application;
FIG. 5 is a flow chart of another method for writing data according to an embodiment of the present disclosure;
FIG. 6 is a schematic flow chart of a data reading method disclosed in an embodiment of the present application;
fig. 7 is a schematic structural diagram of a solid state disk disclosed in an embodiment of the present application.
Detailed Description
The embodiment of the application discloses a data writing method and a solid state disk, which are used for improving the space utilization rate of a flash memory in the solid state disk. The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
For a better understanding of the embodiments of the present application, the system architecture used by the embodiments of the present application is described below.
Referring to fig. 1, fig. 1 is a schematic diagram of a system architecture according to an embodiment of the present disclosure. As shown in fig. 1, the system architecture may include a host 200 and a solid state disk 100. The host 200 and the solid state disk 100 may communicate (i.e. interact data), and the adopted communication mode may be at least one of universal serial bus (universal serial bus, USB), serial advanced technology attachment (serial advanced technology attachment, SATA), non-volatile memory standard (non-volatile memory express, NVMe), serial connection small computer system interface (serial attached small computer system interface, SAS), peripheral component interconnect (peripheral component interconnect, PCI), peripheral Component Interconnect Express (PCIE), and the like.
Host 200 may include a processor system and an Operating System (OS) or the like running on top of the processor system. The processor system may include a central processing unit (central processing unit, CPU) system. The operating system may include one or more of a Linux operating system, a Windows operating system, a Unix operating system, and the like.
Solid state disk 100 may include host-interface logic (HIL) 101, processor 102, memory controller 103, cache 104, flash memory 105, and nonvolatile memory 106.
The host interface logic 101 may provide connection support for different interfaces (such as USB, PCIE, etc.), and is mainly responsible for data interaction with the host 200, and encapsulating, parsing, etc. the data according to a communication manner (i.e., a protocol) adopted between the host 200 and the solid state disk 100.
The processor 102 may be a general purpose processor, a microprocessor, an application specific integrated circuit, a field programmable gate array, or any combination thereof, may control the overall operation of the memory controller 103, and may perform logical operations.
The memory controller 103 is mainly responsible for writing data sent by the host 200 into the flash memory 105 or the nonvolatile memory 106, and reading data from the flash memory 105 or the nonvolatile memory 106.
The cache 104 may be a volatile memory such as static random access memory (static random access memory, SRAM), dynamic random access memory (dynamic random access memory, DRAM), etc., and a power loss of the volatile memory may result in data loss. The cache 104 is mainly used for temporarily storing data, for example, a mapping relationship (i.e., a mapping table) from a logical address to a physical address may be temporarily stored.
Flash memory 105 and nonvolatile memory 106 are used primarily to store data, applications, and the like. It should be noted that, for convenience of description, in this application, the nonvolatile memory is not equal to the nonvolatile memory, and the nonvolatile memory is one of nonvolatile memories, specifically, the flash memory 105 and the nonvolatile memory 106 are one of nonvolatile memories, and the power-down data is not lost and can be stored permanently. Flash memory 105 may include one or more flash memory chips (pellets), and accordingly, one or more channels (channels) may be included between memory controller 103 and flash memory 105. One channel is an independent data path between the flash memory chip and the memory controller 103, and when a plurality of channels (e.g., 8 channels) exist between the memory controller 103 and the flash memory 105, the memory controller 103 can operate multiple flash memory chips in parallel through the channels at the same time, and read or write is performed on the multiple flash memory chips concurrently, so that the read/write speed can be greatly improved. The flash memory chip of the flash memory 105 may be a NAND (NAND) flash memory chip, a NOR (NOR) flash memory chip, or the like.
Nonvolatile memory 106 may include one or more nonvolatile memory chips and, accordingly, one or more channels may be included between memory controller 103 and nonvolatile memory 106, and memory controller 103 may concurrently read or write through one or more channels. The nonvolatile memory chip may be a nonvolatile memory such as a phase change memory (phase change memory, PCM), a 3D magnetic memory (three dimensional cross point,3D Xpoint), or the like.
Cache 104, flash memory 105, and nonvolatile memory 106 may all be used to store data, but differ in their storage characteristics. The cache 104 has a fast read-write speed and long service life, but the power failure can cause data loss. The flash memory 105 is powered down, which does not cause data loss, and can permanently store data, but the read-write speed is slower than that of the cache 104, and the service life of the flash memory 105 is shorter than that of the cache 104 due to the erase operation of the flash memory 105 in the use process. The nonvolatile memory 106 is not volatile, can permanently store data, and has a read-write speed between the cache 104 and the flash memory 105, and has a higher read-write speed. Meanwhile, the nonvolatile memory 106 can support byte-level addressing, can perform random reading and writing and overwriting, has no erasing operation, has longer service life, and is more expensive. Therefore, the nonvolatile memory 106 can be used as an acceleration space of the flash memory 105, so as to improve the overall read-write speed of the solid state disk 100. In one possible embodiment, the size of the storage space of the flash memory 105 may be set to tens of T, for example, the size of the storage space of the flash memory is 30T, 50T, or 80T; the size of the storage space of the nonvolatile memory 106 may be set to several tens of G, for example, the size of the storage space of the nonvolatile memory is 30G, 50G, or 80G.
It should be appreciated that host 200 may access solid state disk 100 to write or read data. Specifically, the host 200 may provide instructions (e.g., write request instructions), addresses (e.g., logical addresses), and data to the solid state disk 100 to write data to the flash memory 105 or the nonvolatile memory 106. Host 200 may also use instructions (e.g., read request instructions) and addresses to request data from solid state disk 100. Solid state disk 100 may access flash memory 105 or nonvolatile memory 106 to write or read data in response to a read or write request from host 200.
It should be noted that the processor 102 and the memory controller 103 may be collectively referred to as a processing unit.
The system architecture shown in fig. 1 may be applied to a server, a data center, a notebook computer, a mobile terminal (e.g., a smart phone, a tablet computer, etc.), a smart car, an ultra-mobile personal computer (UMPC), etc. The embodiment of the present application is not limited to a specific application scenario, for example, the host 200 and the solid state disk 100 may belong to the same server or notebook computer.
It should be appreciated that the processor 102 and the memory controller 103 may be separate or may be integrated (e.g., integrated on a single chip). It should be noted that, the solid state disk 100 illustrated in the embodiments of the present application is only an exemplary illustration, and does not constitute a specific limitation of the solid state disk 100. In other embodiments of the present application, solid state disk 100 may include more or fewer components than shown, or certain components may be combined, certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
For a better understanding of the embodiments of the present application, the related art of the embodiments of the present application will be described first.
With the development of storage technology, the advantage of fast speed of borrowing and writing of the solid state disk has replaced the traditional mechanical hard disk in many use scenarios. A conventional mechanical hard disk mainly includes a magnetic disk, a magnetic arm, and a magnetic head, the magnetic disk may be divided into a plurality of sectors, the magnetic head may be positioned to a target sector (i.e., a sector where data needs to be written or read) on the magnetic disk by the swing of the magnetic arm, and then the data may be read or written from the target sector by the magnetic head. When the mechanical hard disk is used for writing data, whether the sector to be written has data or not is not considered, and even if the sector to be written exists, the data written before the sector to be written exists can be directly overwritten.
Unlike a conventional mechanical hard disk, the minimum read-write unit of the flash memory in the solid state hard disk is a physical page, and the size of the physical page may be 4 Kilobytes (KB), 8KB, and the like. The minimum erase unit of flash memory is a physical block, which may include a plurality of consecutive physical pages (e.g., 4 or 8). Meanwhile, when writing data, the solid state disk cannot be overwritten and must be written into an idle physical page. If it is desired to write a physical page in which data already exists, the entire physical block to which the physical page belongs must be erased before the physical page can be rewritten. Therefore, in order not to burden the operating system, the solid state disk constructs a flash translation layer (flash translation layer, FTL) in a software manner, and the FTL exists between the file system and the flash memory, so that the operation of the flash memory can be virtualized into the operation of independent sectors of the disk. FTL needs to be responsible for important functions such as conversion between logical address and physical address (i.e. maintaining mapping table), garbage collection, wear balance, bad block management, power down recovery, etc. Physical blocks may also be referred to as flash blocks and physical pages may also be referred to as flash pages.
The data stored in the solid state disk has a logical address (e.g., a logical block address or a logical page address) and a physical address (e.g., a physical block address or a physical page address). Typically, the host knows only the logical address of the data. In order to facilitate the host to read the data again after writing the data, the solid state disk may maintain a mapping table (map table) from logical address to physical address. When the solid state disk receives a write request of the host each time and writes data into the flash memory, the mapping relation between the logical address and the physical address of the data is recorded, or the mapping relation between the logical address and the physical address of the data is updated. When the host computer wants to read the data, the host computer can provide the logical address of the data for the solid state disk, and the solid state disk can determine the physical address of the data through the mapping relation between the logical address and the physical address, and then read the data from the physical address.
The logical address to physical address mapping policy may be block mapping, page mapping, hybrid mapping, etc. The block mapping uses the block as the mapping granularity, one logical block can be mapped to any one physical block, but before and after mapping, the offset of each page in the block is unchanged (namely, the order of the logical pages in the logical block is consistent with the order of the physical pages in the corresponding physical block), and the mapping table only stores the mapping relation between the logical block and the physical block, so that the space required for storing the mapping table is small. Block mapping performs better when reading and writing large amounts of sequential data (i.e., data with consecutive logical page addresses), but performs worse when writing small data (e.g., one logical page data), because when updating one logical page, it may be necessary to write the logical page into a free block and copy the valid page in the physical block to which the logical page originally corresponds into the free block.
The page mapping takes pages as mapping granularity, one logical page can be mapped to any physical page, and the mapping mode can enable the solid state disk to have better performance in random reading and writing. But since a physical block may include multiple physical pages, page mapping requires more space to store the mapping table than block mapping.
The hybrid mapping adopts block mapping and page mapping simultaneously, and has high performance of page mapping and low memory space overhead of block mapping. One common hybrid mapping strategy is a log-based hybrid mapping strategy that divides a memory space (e.g., that of a flash memory) into a Data Block Area (DBA) and a Log Block Area (LBA). The physical blocks corresponding to LBAs are referred to as log blocks, the physical blocks corresponding to DBAs are referred to as data blocks, the log blocks may be used to store updated data, and the data blocks may be used to store original data. The log blocks are page mapped and the data blocks are block mapped.
Because of the physical property that flash memory cannot overwrite, when writing update data of a logical page, the update data is written into a free page of a log block, and meanwhile, original data of the logical page stored in the flash memory previously becomes invalid (i.e., garbage data), and a physical page storing the original data can be marked as an invalid page. In addition, when the user deletes the data on the host, the user deletes the data only from the file system, and the data is actually stored in the solid state disk, so that the user deletes the data on the host, and invalid data is newly added in the flash memory. Obviously, after the solid state disk is written for a period of time, a large amount of invalid data may exist in the log block and the data block. Therefore, the solid state disk needs to be garbage recovered to free space for subsequent writing. The log-based hybrid mapping policy may have operations such as full merge (full merge), partial merge (partial merge), and switch merge (switch merge) during garbage collection. The cost of the merging operation is large, the overall performance of the solid state disk can be influenced, and particularly, the full merging of a large number of read-write operations and two block erasing operations is involved.
In order to solve the above problem of merging overhead, in the embodiment of the present application, a nonvolatile memory is added to a solid state disk, and a flash memory space of the solid state disk (i.e., a storage space of the flash memory 105 shown in fig. 1) is used as a data block area, mainly for storing cold data (i.e., data that is not updated frequently, such as read-only file data, movie data, etc.), and a nonvolatile memory space (i.e., a storage space of the nonvolatile memory 106 shown in fig. 1) is used as a log block area, mainly for storing high-heat data (i.e., data that is updated frequently). The data block area adopts block mapping, and the log block area adopts page mapping. When writing data, writing high-heat data into nonvolatile memory space and writing low-heat data into flash memory space can reduce the generation of invalid pages in the flash memory space. When the garbage in the flash memory space is recovered, the partitions with large read-write weights and small number of effective pages in the flash memory space are preferentially recovered, and the effective pages of the partitions are copied into the nonvolatile memory space. Under the condition of insufficient nonvolatile memory space, valid pages with lower writing weight in the nonvolatile memory space can be sequentially copied into the flash memory space. The garbage recycling process only involves a small number of copies of the effective pages, so that merging operations such as full merging and the like are completely avoided, and the garbage recycling efficiency can be greatly improved.
In order to better understand the embodiments of the present application, the following describes related information of the flash memory space, the nonvolatile memory space and the cache space, and the flow of reading and writing data in the embodiments of the present application. Referring to fig. 2, fig. 2 is a schematic diagram of a functional module according to an embodiment of the present disclosure.
As shown in FIG. 2, the flash space may be divided into N partitions (zones), namely partition one, partition two, … …, partition N-1, partition N. Wherein a partition may comprise one or more contiguous physical blocks, N is an integer greater than 0. Flash memory space is mainly used to store low heat data (i.e., cold data).
The nonvolatile memory space may include M physical pages, primarily for storing high-heat data.
In some embodiments, the M physical pages may be divided into near log areas (NLR) and far log areas (FLR). Physical page one and physical page two illustrated in fig. 2 may belong to NLR, physical page M-1 and physical page M may belong to FLR, and M is an integer greater than 0. In the nonvolatile memory, the effective page in the NLR is high read weight, and the effective page in the FLR is low read weight. It should be noted that, NLR and FLR are only logically divided, and do not involve the division of actual physical blocks and physical pages, i.e., one physical page in the nonvolatile memory space may logically belong to NLR or FLR.
The sizes of the NLR and the FLR can be divided in advance or can be dynamically adjusted. For example, the NLR may be 1/5 of the size of the nonvolatile memory space, and the FLR may be 3/5 of the size of the nonvolatile memory space. The nonvolatile memory space can be reserved with a part for accelerating the flash memory space and can be used for temporarily storing part of data of the flash memory space, so that the integral read-write efficiency of the solid state disk can be improved.
It should be noted that each physical page in the flash memory space and the nonvolatile memory space has a read weight and a write weight. The higher the write weight of a physical page, the more frequently (i.e., the more likely it is to be updated) it is that the physical page is updated; the lower the write weight of a physical page, the less frequently that physical page is updated. The higher the read weight of a physical page, the higher the frequency (i.e., the more likely it is to be read) that represents that physical page is read; the lower the read weight of a physical page, the lower the frequency at which that physical page is read. It should be appreciated that the read weight of a physical block may be the sum of the read weights of all physical pages included in the physical block, and the write weight of a physical block may be the sum of the write weights of all physical pages included in the physical block. Similarly, the read weight of a partition may be the sum of the read weights of all physical blocks included in the partition, and the write weight of a partition may be the sum of the write weights of all physical blocks included in the partition. A reserved (spark) space may be included in the flash space and the nonvolatile memory space, and the reserved space may include one or more reserved blocks and reserved pages. In some embodiments, each physical page may include a reserved space (e.g., a 64 byte reserved space), and the reserved space of one physical page may be used to store information such as a read weight, a write weight, and the like of the physical page.
Further, since the flash memory space is mainly used for storing low-heat data, the nonvolatile memory space is mainly used for storing high-heat data. Therefore, as shown in fig. 2, after the solid state disk receives a write request, the processing unit may determine whether the data carried by the write request is high-heat data or low-heat data, and if it is determined that the data is high-heat data, the processing unit may redirect the data to the nonvolatile memory space (i.e. write the data into the nonvolatile memory space), and if it is determined that the data is low-heat data, the processing unit may redirect the data to the flash memory space (i.e. write the data into the flash memory space). Therefore, the characteristic that the nonvolatile memory space can be covered can be fully utilized, and the generation of invalid data is reduced.
As shown in fig. 2, the cache space may store a block mapping table of the flash memory space, a page mapping table of the nonvolatile memory space, and a high read weight page in the NLR (e.g., a valid page in the NLR with a read weight greater than a ninth threshold). The block mapping table of the flash memory space stores the mapping relationship between the effective block (i.e., the physical block including the effective data) and the corresponding logical block in the flash memory space, i.e., the mapping relationship between the physical address of the effective block and the logical address of the corresponding logical block. The page mapping table of the nonvolatile memory space stores the mapping relation between the effective page and the corresponding logical page in the nonvolatile memory space, namely the mapping relation between the physical address of the effective page and the logical address of the corresponding logical page. It should be appreciated that the page mapping tables of the nonvolatile memory space may include a first page mapping table that is a page mapping table of a near log region and a second page mapping table that is a page mapping table of a far log region.
In some embodiments, the block mapping table of the flash memory space may further store information such as the number of valid pages, a read weight, a write weight, and the like of each valid block in the flash memory space. The page mapping table of the nonvolatile memory space may also store information such as a read weight value and a write weight value of each valid page in the nonvolatile memory space. Accordingly, the first page mapping table may include information such as mapping relation, reading weight, writing weight, and the like of each valid page in the NLR. The second page mapping table may include information such as a mapping relationship, a read weight, a write weight, and the like of each valid page in the FLR. The block mapping table of the flash memory space may be stored in reserved blocks of the flash memory space and the page mapping table of the nonvolatile memory space may be stored in reserved blocks of the nonvolatile memory space.
The solid state disk can update the block mapping table of the flash memory space and/or the page mapping table of the nonvolatile memory space when writing data and reading data each time. For a detailed description of updating the block mapping relationship of the flash memory space, the page mapping relationship of the nonvolatile memory space, the number of effective pages of each physical block in the flash memory space, and the read weight and write weight of each effective page in the flash memory space and the nonvolatile memory space, reference may be made to the following related description in the data writing method and the data reading method.
In some embodiments, in order to accelerate the speed of data reading, after the solid state disk receives the read request, the solid state disk may determine whether the data read by the read request is stored in the cache space according to the logical page address carried by the read request, if the data is stored in the cache space, the solid state disk may directly read from the cache space, if the data is not stored in the cache space, the solid state disk may determine whether the data read by the read request is stored in the nonvolatile memory space according to the logical page address carried by the read request and the nonvolatile memory space heat table, if the data is stored in the nonvolatile memory space, the physical page address of the read data may be determined according to the nonvolatile memory space heat table, then the data may be read from the nonvolatile memory space according to the physical page address, and if the data is not stored in the nonvolatile memory space, the data may be read from the flash memory space according to the logical page address carried by the read request and the flash memory space heat table.
Based on the above system architecture, please refer to fig. 3, fig. 3 is a flow chart of a data writing method according to an embodiment of the present application. As shown in fig. 3, the data writing method may include, but is not limited to, the following steps:
301. The method comprises the steps that a solid state disk receives a first write request sent by a host, wherein the first write request comprises first data.
Under the condition that the host computer needs to write the first data into the solid state disk, the host computer can send a first write request to the solid state disk, and the first write request can comprise the first data. The first write request may be used to instruct the solid state disk to write the first data into its own storage medium (e.g., flash memory space, nonvolatile memory space, etc.). Accordingly, the solid state disk may receive a first write request from the host.
302. The solid state disk determines whether the first write request is an update request, and if it is determined that the first write request is an update request, step 303 is executed, and if it is determined that the first write request is not an update request, step 305 is executed.
After the solid state disk receives the first write request from the host, the solid state disk may determine whether the first write request is an update request. If it is determined that the first write request is an update request, it indicates that the first data is likely to be high heat data, and the solid state disk may execute step 303. In the case that the first write request is determined to be a non-update request, the solid state disk may execute step 305. It should be understood that if the data of one logical page is written into the solid state disk for the first time, the corresponding write request is a non-update request, and the corresponding data is non-update data. If the data of one logical page is not written into the solid state disk for the first time (namely, the old data of the logical page is stored in the solid state disk), the corresponding write request is an update request, and the corresponding data is update data.
The solid state disk may determine whether the first write request is an update request according to a logical page address of the first data (hereinafter referred to as a first logical page address). Specifically, the solid state disk may determine whether a mapping relationship corresponding to the first logical page address is stored in the block mapping table of the flash memory space or the page mapping table of the nonvolatile memory space, and indicate that data corresponding to the first logical page address is already stored in the flash memory space or the nonvolatile memory space when the mapping relationship corresponding to the first logical page address is stored in the block mapping table of the flash memory space or the page mapping table of the nonvolatile memory space, and may determine that the first write request is an update request. Conversely, in the case where the mapping relationship corresponding to the first logical page address is not stored in the block mapping table of the flash memory space or the page mapping table of the nonvolatile memory space, the first write request may be determined to be a non-update request.
It will be appreciated that the first data may comprise data of one or more logical pages and accordingly the first logical page address may comprise one or more logical page addresses.
303. The solid state disk determines whether the second data is stored in the nonvolatile memory space or the flash memory space, the second data is old data corresponding to the first data, step 310 is executed if it is determined that the second data is stored in the nonvolatile memory space, and step 304 is executed if it is determined that the second data is stored in the flash memory space.
And under the condition that the first write request is an update request, indicating that old data (namely second data) corresponding to the first data is stored in the solid state disk. Then, the solid state disk can judge whether the second data is stored in the flash memory space or the nonvolatile memory space. It should be understood that the second data is the data written in the first logical page last time, i.e., the old data corresponding to the first data. The first logical page is a logical page corresponding to the first data.
The solid state disk can judge whether the second data is stored in the flash memory space or the nonvolatile memory space according to the logical page address of the first data. Specifically, the solid state disk may determine whether a mapping relationship corresponding to the first logical page address is stored in the block mapping table of the flash memory space or the page mapping table of the nonvolatile memory space, and indicate that the second data is stored in the nonvolatile memory space when the mapping relationship corresponding to the first logical page address (i.e., the first logical page address is stored in the page mapping table of the nonvolatile memory space). In this case, the solid state disk may directly overwrite the first data into the storage space corresponding to the second data (i.e. replace the stored second data with the first data), and step 310 may be directly executed. In the case that the mapping relationship corresponding to the first logical page address is stored in the block mapping table of the flash memory space (i.e. the logical address of the first logical block is stored, where the first logical block includes the first logical page), and the physical page corresponding to the first logical page address is a valid page, it indicates that the second data is stored in the flash memory space, and the solid state hard disk may execute step 304. Also, in this case, the solid state disk needs to write the first data into the free space of the near-journaling area, and therefore, the solid state disk may perform step 306 before writing the first data. In some embodiments, the solid state disk may determine that the second data is stored in the flash memory space when it is determined that the mapping relationship corresponding to the first logical page address is not stored in the page mapping table of the nonvolatile memory space.
In some embodiments, the solid state disk may execute step 302 and step 303 simultaneously, that is, the solid state disk may determine whether old data corresponding to the first data is stored in the nonvolatile memory space while determining whether the first write request is an update request.
304. And updating the number of effective pages and the writing weight of the partition where the second data are located by the solid state disk.
In the case where the second data is stored in the flash memory space, the solid state disk may update the number of valid pages and the write weight of the partition (hereinafter referred to as the first partition) in which the second data is located before writing the first data into the nonvolatile memory space. Specifically, the solid state disk may mark the updated physical pages in the first partition as invalid pages, and meanwhile, the write weights of the physical pages may be added with the first value to obtain updated write weights. Accordingly, the number of valid pages of the physical block in which the physical pages are located (i.e., the number of physical pages updated by the physical block is subtracted from the current number of valid pages of the physical block) and the write weights are updated, and the number of valid pages and the write weights of the first partition are updated. The first value may be a fixed value such as 1, 2, 5, etc.
The first value may also be varied. Specifically, the host may have various applications (e.g., application a, application B, application C, etc.) running therein, and the different applications may have different read-write characteristics. Some applications may require frequent writing of data (e.g., updating of data) to the solid state disk, with greater demands on writing data and relatively less demands on reading data. Other applications may require frequent reading of data from a solid state disk, with greater demands on the read data and less demands on the write data. Still other applications may require both frequent writing of data to and frequent reading of data from the solid state disk. Still other applications may not require frequent writing of data to or reading of data from the solid state disk. For different applications, a different first value may be added when updating the write weights. For applications requiring frequent writing of data, the first value may be larger, e.g. 8, 10, etc. For applications where frequent writing of data is not required, the first value may be small, e.g. 1, 2, etc. In some embodiments, the first write request may include an application identification (identity document, ID). The application ID may uniquely identify the application in one host. The solid state disk can distinguish the data written by different applications according to the application identification.
305. The solid state disk determines whether the first write request is a sequential write request and whether the data amount of the first data is greater than or equal to a first threshold, if it is determined that the first write request is not a sequential write request or that the data amount of the first data is less than the first threshold, step 306 is executed, and if it is determined that the first write request is a sequential write request and that the data amount of the first data is greater than or equal to the first threshold, step 311 is executed.
When the first write request satisfies at least one first condition, the first data may be determined to be high heat data. The first condition may include the following conditions: the first write request is an update request, the data amount of the first data is less than a first threshold, and the first write request is a non-sequential write request.
Therefore, in the case that the first write request is a non-update request, the solid state disk may continue to determine whether the first write request is a sequential write request and whether the data amount of the first data is greater than or equal to the first threshold. If it is determined that the first write request is a non-sequential write request or the data amount of the first data is smaller than the first threshold, it may be determined that the first data is high heat data, and the solid state disk may write the first data into the nonvolatile memory space, and step 306 may be executed. If it is determined that the first write request is a sequential write request and the data amount of the first data is greater than or equal to the first threshold, it may be determined that the first data is low heat data (i.e., cold data), and the solid state disk may write the first data into the flash memory space, and step 311 may be executed. In other embodiments, the solid state disk may also determine the first data as high heat data if it is determined that the first write request is a non-sequential write request or the data amount of the first data is less than or equal to the first threshold, and step 306 may be performed. In the case where it is determined that the first write request is a sequential write request and the data amount of the first data is greater than the first threshold, the first data is determined to be low heat data, step 311 may be performed.
The first threshold may be 32KB, or may be the maximum data size that can be stored in a partition, or may be determined by the solid state disk according to a period of actual use condition. For example, during a read-write process for a period of time (e.g., 48 hours), the solid state disk may count the size of each write request during the period of time, and the number of updates of the data written by each write request, and the solid state disk may analyze the data to determine an optimal threshold. Specifically, the solid state disk may divide data with update times greater than or equal to a certain fixed value (e.g. 2) in the period of time into high heat data, and divide data with update times less than the fixed value into cold data. Then, the solid state disk may determine a threshold value, which may substantially distinguish the cold data from the high heat data, such that write data of a write request having a data amount less than the threshold value is typically high heat data, and such that data having a data amount greater than or equal to the threshold value is typically cold data.
The solid state disk may determine whether the first write request is a sequential write request according to a logical page address of the first data (i.e., the first logical page address). In the case where it is determined that one or more logical page addresses included in the first logical page address are consecutive logical page addresses, the first write request is indicated as a sequential write request. In the event that the one or more logical page addresses included in the first logical page address are determined to be non-consecutive logical page addresses, the first write request is indicated as a non-sequential write request.
In general, write requests with smaller amounts of data have high temporal locality and low ordering, and write requests with larger amounts of data have low temporal locality and high ordering. High temporal limitations may be understood as the written data may be updated frequently, and low temporal limitations may be understood as the written data may not be updated substantially. High sequency may be understood as the logical page address of the written data being consecutive and low sequency may be understood as the logical page address of the written data being non-consecutive. Therefore, in some embodiments, the solid state hard disk may not determine whether the first data is high-heat data according to whether the first write request is an update request, and may determine whether the first data is high-heat data according to only whether the data amount of the first data is less than the first threshold. If it is determined that the data amount of the first data is smaller than the first threshold, the solid state disk may determine that the first data is high heat data, and then may continue to determine whether the first write request is an update request, if so, step 303 may be executed, and if not, step 306 may be executed. Under the condition that the data amount of the first data is larger than or equal to the first threshold value, the solid state disk can determine that the first data is low-heat data, then, whether the first write request is an update request can be continuously determined, if the first write request is the update request, the solid state disk can mark a physical page storing the second data as an invalid page, then, the step 311 can be executed, and if the first write request is not the update request, the solid state disk can directly execute the step 311.
In still other embodiments, the solid state disk may also determine whether the first data is high heat data according to whether the first write request is an update request, and whether the first data is high heat data according to whether the first write request is a non-sequential write request only, and whether the data size of the first data is less than a first threshold. In this case, the solid state disk may execute step 305 first, and then execute step 302. If it is determined that the first write request is a non-sequential write request, or if the data amount of the first data is less than the first threshold, the solid state disk may determine that the first data is high heat data, and then may continue to determine whether the first write request is an update request, if so, step 303 may be executed, and if not, step 306 may be executed. When it is determined that the first write request is a sequential write request and the data amount of the first data is greater than or equal to the first threshold, the solid state disk may determine that the first data is low heat data, then may continue to determine whether the first write request is an update request, if so, the solid state disk may mark a physical page storing the second data as an invalid page, then may execute step 311, and if not, the solid state disk may directly execute step 311.
306. The solid state disk determines whether the available space (i.e., free space) in the near-journaling area is sufficient, and if it is determined that the available space in the near-journaling area is sufficient, step 310 is executed, and if it is determined that the available space in the near-journaling area is insufficient, step 307 is executed.
Before the solid state disk writes the first data into the nonvolatile memory space, it can be judged whether the available space of the NLR region is sufficient. In case it is determined that the available space in the near-journaling area is sufficient, the first data may be directly written into the NLR, i.e. step 310 may be directly performed. In case it is determined that the available space of the near log area is insufficient, step 307 may be performed first.
In some embodiments, the solid state disk may determine whether the available space of the NLR is less than the second threshold, and if it is determined that the available space of the NLR is less than the second threshold, the solid state disk may determine that the available space of the NLR is insufficient, and may execute step 307. If it is determined that the available space of the NLR is greater than or equal to the second threshold, the solid state disk may determine that the available space of the NLR is sufficient, and step 310 may be performed. The size of the second threshold may be determined according to the size of the NLR, the larger the second threshold may be. In other embodiments, the solid state disk may determine whether the available space of the NLR is smaller than the data amount of the first data, and if it is determined that the available space of the NLR is smaller than the data amount of the first data, the solid state disk may determine that the available space of the NLR is insufficient, and may execute step 307. In the case that the available space of the NLR is determined to be greater than or equal to the data amount of the first data, the solid state disk may determine that the available space of the NLR is sufficient, and step 310 may be executed.
In some embodiments, the solid state disk may execute step 304 and step 306 simultaneously, that is, the solid state disk may update the number of valid pages and the write weight of the partition where the second data is located while determining whether the available space in the near log area is sufficient.
307. The solid state disk determines whether the available space of the remote log area is sufficient, and if it is determined that the available space of the remote log area is sufficient, step 309 is executed, and if it is determined that the available space of the remote log area is insufficient, step 308 is executed.
After the solid state disk determines that the available space of the NLR is insufficient, it may continue to determine whether the available space of the FLR is sufficient, and if it is determined that the available space of the FLR is sufficient, it may directly migrate the valid page with a lower reading weight in the NLR to the FLR, that is, step 309 may be executed. If it is determined that the available space of the FLR is insufficient, the solid state disk may execute step 308 first, and then execute step 309, that is, the solid state disk may copy the valid pages with lower writing weights in the FLR to the flash memory space sequentially, then recover the valid pages as new free pages, and then migrate the valid pages with lower reading weights in the NLR to the FLR.
In some embodiments, the solid state disk may determine whether the available space of the FLR is less than a sixth threshold, and if it is determined that the available space of the FLR is less than the sixth threshold, it may determine that the available space of the FLR is insufficient, and step 308 may be performed. If it is determined that the available space of the FLR is greater than or equal to the sixth threshold, the solid state disk may determine that the available space of the FLR is sufficient, and step 309 may be performed. The magnitude of the sixth threshold may be determined according to the magnitude of the FLR, and the larger the FLR, the larger the sixth threshold may be.
308. And the solid state disk sequentially copies the valid pages with lower writing weights in the remote log area to the flash memory space.
Under the condition that the available space of the FLR is insufficient, the solid state disk can copy the effective page with lower writing weight in the FLR into the FLR. In some embodiments, the solid state disk may copy the valid pages in the FLR with a write weight less than the seventh threshold to the flash memory space, or may directly copy the S valid pages with the smallest write weight to the flash memory space. S is a positive integer.
It should be appreciated that, because the nonvolatile memory space may be overwritten, in one possible implementation, the solid state disk may have a lower write weight (e.g., less than a seventh threshold) in the FLR, and at least Q valid pages with consecutive logical page addresses are copied to the flash memory space sequentially, where Q is a positive integer. The size of Q may be the number of physical pages included in one physical block, or the number of physical pages included in a plurality of physical blocks (such as one partition), so that the copied effective page may occupy at least one whole physical block, and the space utilization of the flash memory may be improved. It can be understood that the solid state disk can also copy with one or more physical blocks as granularity, so that the copied valid page can occupy the complete one or more physical blocks.
The solid state disk copies the effective page with lower writing weight in the FLR to the flash memory space, so that the writing weight of the effective page in the flash memory space is ensured to be lower, and the integral updating frequency of the effective page in the flash memory space can be reduced, thereby reducing the generation of invalid pages and further improving the utilization rate of the flash memory space. Based on this, in some embodiments, the solid state disk may write the valid pages with lower write weights into the physical blocks with the Erase Count (EC) greater than the eighth threshold, so that the service lives of the physical blocks may be prolonged. The eighth threshold may be determined according to the total number of erasures of the physical block, and the more the total number of erasures, the larger the eighth threshold may be. For example, in the case where the total number of erasures of the physical block is 1 ten thousand times, the eighth threshold may be 8000.
It should be appreciated that in the case where a portion of the valid pages in the FLR are copied into flash space, the solid state disk may update the block mapping table of the flash space and the page mapping table of the nonvolatile memory space. Specifically, the solid state disk may delete the page mapping relationship of the copied effective pages in the nonvolatile memory space, and may newly add the block mapping relationship of the copied effective pages in the flash memory space.
In one possible implementation, the solid state disk may also periodically perform valid page copies in the FLR described above, so that the writing speed may be increased.
309. And the solid state disk transfers the valid page with lower reading weight in the near log area to the far log area.
Under the condition that the available space of the NLR is insufficient, the solid state disk can transfer the effective page with lower reading weight in the NLR into the FLR, so that the reading weight of the effective page in the NLR can be guaranteed to be generally higher than that of the effective page in the FLR.
In some embodiments, the solid state disk may migrate valid pages in the NLR with a read weight less than the third threshold to the FLR, or may migrate Q valid pages with a minimum read weight to the FLR. Q is a positive integer.
It is understood that migrating an active page of an NLR to an FLR by a solid state disk may not require reading and writing data, but only logically dividing the active page to the FLR.
In one possible implementation manner, the solid state disk may also periodically perform the active page migration in the NLR (e.g. perform active page migration once in 2 days), so that the writing speed may be improved.
310. And the solid state disk writes the first data into the near-journaling area.
In the case where the available space of the NLR is sufficient, the solid state disk may write the first data into the near-journaling area.
Specifically, in the case where the first write request is an update request and the second data is stored in the nonvolatile memory space, the solid state disk may overwrite the first data on the physical page where the second data is located (i.e., the first physical page), and may update the write weight of the physical page (i.e., add the first value based on the current write weight of the physical page). Under the condition that the physical page where the second data is located belongs to the FLR, the solid state disk can divide the physical page into the NLR. In the case where the first write request is an update request and the second data is stored in the flash space, the solid state disk may write the first data into a first free page (i.e., a first free physical page) in the NLR, and may update a write weight of the first free page (i.e., add the first value based on a write weight of the physical page in which the second data is located). Meanwhile, the solid state disk also needs to update the page mapping table of the nonvolatile memory space, that is, the corresponding relationship between the first idle page and the first logical page (i.e. the logical page where the first data is located) is added in the page mapping table. In the case where the first write request is a non-update request and the first write request is a non-sequential write request or the data amount of the first data is less than the first threshold, the solid state disk may also write the first data to the first free page in the NLR and may update the write weight of the first free page (i.e., update the write weight of the first free page to the first value). At this time, the solid state disk also needs to update the page mapping table of the nonvolatile memory space.
It should be understood that, because the solid state disk can read data from the cache space faster, in some embodiments, the solid state disk may store the valid page with a higher reading weight in the NLR in the cache space, so as to improve the reading and writing efficiency. Specifically, in one possible implementation manner, the solid state disk may store the valid page with the reading weight greater than the ninth threshold in the NLR in the cache space. The size of the ninth threshold may be determined according to the distribution of the read weights of all valid pages in the NLR (e.g., the ninth threshold is the valid page 10% of the read weight rank). In another possible implementation, the solid state disk may divide the valid pages in the NLR into multiple hotlevels according to the read weights, with higher hotlevels having greater read weights. Then, the solid state disk may store the valid page of the highest heat level in the NLR into the cache space, or may store the valid pages of the highest plurality of heat levels in the NLR into the cache space.
The heat level of the solid state disk can be divided according to the reading weight of the effective page in the NLR in a plurality of modes, one mode is as follows: the solid state disk may divide all valid pages in the NLR equally into a plurality of hotness levels, and the number of valid pages in each hotness level may be equal. Another way is: the solid state disk may determine a maximum read weight and a minimum read weight of the read weights of all the valid pages in the NLR, and then may divide a plurality of intervals according to the maximum read weight and the minimum read weight, where each interval corresponds to a heat level. For example, in the case where the maximum read weight is 9, the minimum read weight is 2, and 3 heat levels are divided, the solid state disk may be divided into 3 sections, i.e., [2,4], [5,7], [8, 10], in average with 3 steps, and the number of valid pages included in each section may be different.
311. The solid state disk determines whether the available space of the flash memory space is sufficient, and if it is determined that the available space of the flash memory space is sufficient, step 313 is executed, and if it is determined that the available space of the flash memory space is insufficient, step 312 is executed.
Before the first data is written into the flash memory space, the solid state disk can firstly judge whether the available space of the flash memory space is sufficient. In case it is determined that the available space of the flash memory space is sufficient, the first data may be directly written into the flash memory space, i.e. step 313 may be directly performed. In the case that the available space of the flash memory space is not enough, the garbage data of the flash memory space may be recovered first, and then the first data may be written into the flash memory space, that is, step 312 may be executed first, and then step 313 may be executed.
In some embodiments, the solid state disk may determine whether the available space (i.e., the free space) of the flash memory space is smaller than the fourth threshold, and if it is determined that the available space of the flash memory space is smaller than the fourth threshold, the solid state disk may determine that the available space of the flash memory space is insufficient, and may perform garbage collection, i.e., execute step 312. If it is determined that the available space of the flash memory space is greater than or equal to the fourth threshold, the solid state disk may determine that the available space of the flash memory space is sufficient, and step 313 may be performed. The size of the fourth threshold may be determined according to the size of the flash memory space, and the larger the flash memory space, the larger the fourth threshold may be. For example, the size of the flash space is 1 Terabyte (TB), and the fourth threshold may be 150 Gigabytes (GB). For another example, the flash memory space may be 200GB in size and the fourth threshold may be 30GB.
In other embodiments, the solid state disk may determine whether the available space of the flash memory space is smaller than the data amount of the first data, and in the case that it is determined that the available space of the flash memory space is smaller than the data amount of the first data, the solid state disk may determine that the available space of the flash memory space is insufficient, and may execute step 312. In the case that it is determined that the available space of the flash memory space is greater than or equal to the data amount of the first data, the solid state disk may determine that the available space of the flash memory space is sufficient, and step 313 may be performed.
312. And the solid state disk performs garbage collection of the flash memory space.
The solid state disk can recycle the garbage of the flash memory space by taking the partition as granularity. The garbage collection of the flash memory space by the solid state disk may include three steps, step one, of determining a victim partition (i.e., a second partition described below). And step two, if the victim partition comprises an effective page, copying the effective page of the victim partition to the FLR. And step three, erasing the victim partition.
Specifically, the solid state disk may divide L partitions (i.e., non-idle partitions) with a read-write weight (i.e., a sum of a read weight and a write weight) greater than 0 among the N partitions into K heat levels. The higher the heat level, the larger the read-write weight, L is a positive integer less than or equal to N, and K is a positive integer less than or equal to L. In some embodiments, the solid state disk may divide the L partitions into K heat levels according to the read-write weights, where the number of partitions in each heat level may be equal. In other embodiments, the solid state disk may determine the largest read-write weight and the smallest read-write weight of the L read-write weights (i.e., the read-write weights of the L partitions), and then divide K intervals according to the largest read-write weight and the smallest read-write weight, where each interval corresponds to one heat level. For example, in the case where the maximum read-write weight is 30, the minimum read-write weight is 6, and K is 5, the solid-state disk may be divided into 5 sections, i.e., [6, 10], [11, 15], [16, 20], [21, 25], [26, 30], on average in steps of 5, that is, 5 sections, and the number of partitions included in each section may be different. It should be appreciated that the number of heat levels K may be determined based on the actual situation, e.g., where L is smaller, K may be smaller, and where L is larger, K may be larger, so that the division of L partitions into different heat levels may be more refined.
Then, the solid state disk may determine the partition with the number of invalid pages greater than the fifth threshold in the first heat level as the second partition, or may determine M partitions with the maximum number of invalid pages in the first heat level as the second partition. The second partition may include one or more partitions, the first heat level being a highest heat level of the K heat levels. In some embodiments, the solid state disk may further determine a partition in the highest plurality of hotlevels having a number of invalid pages greater than a fifth threshold as the second partition. The size of the fifth threshold may be determined according to the number of physical blocks included in one partition and the number of physical pages included in one physical block. The greater the number of physical blocks that one partition includes, and the greater the number of physical pages that one physical block includes, the greater the fifth threshold may be set. For example, in the case where one partition includes 2 physical blocks, and one physical block includes 4 physical pages, the fifth threshold may be 6. For another example, in the case where one partition includes 4 physical blocks, and one physical block includes 4 physical pages, the fifth threshold may be 12. For another example, in the case where one partition includes 4 physical blocks and one physical block includes 8 physical pages, the fifth threshold may be 24.
After the solid state disk determines the second partition, whether the second partition includes an effective page may be determined first, and in the case that the second partition includes an effective page, the effective page in the second partition may be copied into the nonvolatile memory space (i.e., the effective page in the second partition is read out and written into an idle page in the nonvolatile memory space), and then the second partition may be erased, so that the second partition becomes the idle partition. In the case where the valid page is not included in the second partition, the second partition may be directly erased.
In one possible implementation, since the second partition is a high-heat partition, the read-write weight is larger, but the valid pages in the second partition have not been updated so far, which indicates that the write weight of the valid pages may be lower, so the solid state disk may copy the valid pages of the second partition into the FLR.
It can be appreciated that, in the case where the solid state disk copies the valid page of the second partition into the nonvolatile memory space, the solid state disk may update the block mapping table of the flash memory space and the page mapping table of the nonvolatile memory space. Specifically, the solid state disk may delete the block mapping relationship of the physical block included in the second partition in the flash memory space, and may newly add the page mapping relationship of the valid page of the second partition stored in the nonvolatile memory space.
Therefore, the flash memory space does not involve merging operation (such as full merging operation) when garbage collection is performed, only a small number of copies of valid pages are involved, and the overhead of garbage collection of the flash memory space can be reduced, so that the garbage collection efficiency can be improved.
It should be understood that the solid state disk may also periodically perform garbage collection in the flash memory space, so that the writing speed may be improved.
313. And the solid state disk writes the first data into the flash memory space.
Under the condition that the available space of the flash memory space is sufficient, the solid state disk can write the first data into the flash memory space.
Specifically, in the case where the first write request is a non-update request, and the first write request is a sequential write request, and the data amount of the first data is greater than or equal to the first threshold, the solid state disk may write the first data to a second free page (i.e., a second free physical page) in the flash memory space, and may update the write weight of the second free page (i.e., update the write weight of the second free page to the first value). The second free physical page may be located in the first physical block. At this time, if the block mapping table of the flash memory space does not store the mapping relationship between the first physical block and the logical block where the first data is located, the solid state disk needs to update the block mapping table of the flash memory space, and the corresponding relationship between the first logical block address and the first physical block address may be added in the block mapping table. The first logical block address is the address of the logical block where the first data is located, and the first physical block address is the address of the physical block where the first data is located. In some embodiments, the solid state disk may write data with minimal granularity of physical blocks or partitions.
In the embodiment of the application, the flow of writing data and the flow of NLR page migration can enable the reading weight of the effective page in the NLR to be generally larger than the reading weight of the effective page in the FLR, and the reading weight of the effective page in the FLR is generally larger than the reading weight of the effective page in the flash memory space. The greater the reading weight of an effective page, the more likely the data of the effective page is read, so when the solid state disk receives a reading request, the data can be read from the NLR according to the order from high to low, if the data read by the reading request is not stored in the NLR, the data can be read from the FLR, and if the data read by the reading request is not stored in the FLR, the data can be read from the flash memory space. By reading the data through the reading flow, the reading efficiency of the data can be improved.
Based on the above system architecture, please refer to fig. 4, fig. 4 is a flow chart of a data reading method disclosed in an embodiment of the present application. As shown in fig. 4, the data reading method may include, but is not limited to, the following steps:
401. the solid state disk receives a first reading request sent by the host, wherein the first reading request comprises a second logical page address.
Under the condition that the host needs to read data from the solid state disk, the host can send a first read request to the solid state disk, wherein the first read request can comprise a second logical page address (namely, a logical page address of target data to be read). The second logical page address may include one or more logical page addresses. The first read request may be used to instruct the solid state disk to read data from its own storage medium (e.g., flash memory space, nonvolatile memory space, etc.). Accordingly, the solid state disk may receive a first read request from the host.
402. The solid state disk determines whether the data read by the first read request is stored in the cache space, and if the page with higher read weight in the near log area is stored in the cache space, step 403 is executed, and if the data read by the first read request is not stored in the cache space, step 404 is executed.
The solid state disk may determine whether the data read by the first read request is stored in the buffer space, and in the case where the data read by the first read request is stored in the buffer space, the solid state disk may directly read the data from the buffer space (i.e. execute step 403). In the case where the data read by the first read request is not stored in the cache space, the solid state disk may determine whether the data read by the first read request is stored in another area in the NLR (i.e., step 404 is performed).
The solid state disk can judge whether the data read by the first reading request is stored in the cache space according to the second logical page address. Specifically, when the solid state disk determines that the data corresponding to the second logical page address is stored in the cache, it indicates that the data read by the first read request is stored in the cache space, otherwise, it indicates that the data read by the first read request is not stored in the cache space.
403. The solid state disk reads the data read by the first reading request from the cache space.
Under the condition that the data read by the first reading request is stored in the cache space, the solid state disk can directly read the data read by the first reading request from the cache space and can return the data to the host.
After the solid state disk reads data from the cache space, the read weight of the corresponding physical page (i.e., the second physical page, i.e., the physical page storing the data read by the first read request) in the NLR may be updated. And adding a second numerical value on the basis of the reading weight of the physical page to obtain an updated reading weight. The second value may be a fixed value such as 1, 2, 5, etc. The second value may also be variable and the read requests of different applications may have different second values. The second value may be larger for applications requiring frequent reading of data. The second value may be smaller for applications that do not require frequent reading of data.
404. The solid state disk determines whether the data read by the first read request is stored in the near-journal region, and if the data read by the first read request is stored in the near-journal region, step 405 is executed, and if the data read by the first read request is not stored in the near-journal region, step 406 is executed.
Under the condition that the data read by the first read request is not stored in the cache space, the solid state disk may continue to determine whether the data read by the first read request is stored in the NLR, and under the condition that the data read by the first read request is stored in the NLR, the solid state disk may read the data read by the first read request from the NLR according to the page mapping table of the NLR (i.e. execute step 405). In the case where the data read by the first read request is not stored in the NLR, the solid state disk may determine whether the data read by the first read request is stored in the FLR (i.e., step 406 is performed). It should be appreciated that the page mapping table of the nonvolatile memory space includes two parts, namely, the page mapping table of the NLR and the page mapping table of the FLR.
The solid state disk can judge whether the data read by the first reading request is stored in the NLR according to the second logical page address. Specifically, the solid state hard disk may determine whether the data read by the first read request is stored in the NLR according to the second logical page address and the page mapping table (i.e., the first page mapping table) of the NLR, where the corresponding relationship between the second logical page address and the page mapping table of the NLR is stored (i.e., the second logical page address is stored), which indicates that the data read by the first read request is stored in the NLR, and otherwise, which indicates that the data read by the first read request is not stored in the NLR.
405. The solid state disk reads the data read by the first reading request from the near log area.
Under the condition that the data read by the first reading request is stored in the NLR, the solid state disk can determine a second physical page address corresponding to the second logical page address according to the page mapping table of the NLR, then the data read by the first reading request can be read from the NLR according to the second physical page address, and the data can be returned to the host. After the solid state disk reads the data from the NLR, the read weight of the corresponding physical page (i.e., the second physical page, i.e., the physical page storing the data read by the first read request) in the NLR may be updated. And adding a second numerical value on the basis of the reading weight of the physical page to obtain an updated reading weight. The second physical page address is an address of the second physical page, and may include addresses of one or more physical pages.
406. The solid state disk determines whether the data read by the first read request is stored in the remote log area, and if the data read by the first read request is stored in the remote log area, step 407 is executed, and if the data read by the first read request is not stored in the remote log area, step 408 is executed.
In the case that the data read by the first read request is not stored in the NLR, the solid state disk may continue to determine whether the data read by the first read request is stored in the FLR, and in the case that the data read by the first read request is stored in the FLR, the solid state disk may read the data read by the first read request from the FLR according to the page mapping table of the FLR (i.e. execute step 407). In the case where the data read by the first read request is not stored in the FLR, the solid state disk may read the data read by the first read request from the flash space according to the block mapping table of the flash space (i.e., step 408 is performed).
The solid state disk can judge whether the data read by the first reading request is stored in the FLR according to the second logical page address. Specifically, the solid state disk may determine, according to the second logical page address and the page mapping table of the FLR (i.e., the second page mapping table), whether the data read by the first read request is stored in the FLR, where the corresponding relationship between the second logical page address and the page mapping table of the FLR (i.e., the second logical page address is stored) indicates that the data read by the first read request is stored in the FLR, and otherwise, indicates that the data read by the first read request is not stored in the FLR.
407. And the solid state disk reads the data read by the first reading request from the remote log area.
Under the condition that the data read by the first read request is stored in the FLR, the solid state disk can determine a second physical page address corresponding to the second logical page address according to the page mapping table of the FLR, then the data read by the first read request can be read from the FLR according to the second physical page address, and the data can be returned to the host. After the solid state disk reads data from the FLR, the read weight of the corresponding physical page (namely, the second physical page) in the FLR can be updated, and a second numerical value is added on the basis of the read weight of the physical page to obtain the updated read weight.
408. And the solid state disk reads the data read by the first reading request from the flash memory space.
In the case where the data read by the first read request is not stored in the FLR, it is indicated that it is stored in the flash space. The solid state disk may determine a second physical page address corresponding to the second logical page address according to the block mapping table of the flash memory space, and then may read the data read by the first read request from the flash memory space according to the second physical page address, and may return the data to the host. After the solid state disk reads data from the flash memory space, the read weight of the corresponding physical page (namely, the second physical page) in the flash memory space can be updated, and a second numerical value is added on the basis of the read weight of the physical page to obtain the updated read weight. Accordingly, the solid state disk can update the read weights of the partitions where the physical pages are located. The second physical page address is an address of the second physical page.
It should be appreciated that the page mapping tables of NLR and FLR may be stored in a cache space (e.g., in DRAM or SRAM), and the block mapping tables of flash space may also be stored in the cache space, so that the reading efficiency may be improved.
It can be appreciated that during the running process of the solid state disk, there may be a power failure (such as abnormal power failure). In the embodiment of the present invention, since the nonvolatile memory space stores high-heat data, when the solid state disk is powered up again after the solid state disk is abnormally powered down, the solid state disk may store the valid page with the read weight value greater than the ninth threshold value in the NLR into the cache space, and store the page mapping table of the NLR and the FLR into the cache space, and the rebuilding of the block mapping information of the flash memory space with relatively low heat may be deferred to the background, so that the state before the power down may be restored as soon as possible, thereby reducing the influence on the application running in the host.
In some embodiments, the nonvolatile memory space may store a block mapping table of the flash memory space, and when the solid state disk is powered up again after the solid state disk is abnormally powered down, the solid state disk may load the block mapping table stored in the nonvolatile memory space into the cache space, so as to accelerate the power-down recovery process.
It should be noted that the embodiment of the method for writing data corresponding to fig. 3 and the embodiment of the method for reading data corresponding to fig. 4 may belong to the same embodiment. In addition, the data read by the first read request in fig. 4 may be the data written into the solid state disk by the first write request before the solid state disk receives the first read request.
In this embodiment of the present application, the nonvolatile memory space of the solid state disk may not be divided into NLR and FLR. After the solid state disk receives the first write request, the solid state disk can firstly judge whether first data carried by the first write request is high-heat data, if the first data is the high-heat data, the first data is written into the nonvolatile memory space, and if the first data is not the high-heat data, the first data is written into the flash memory space. When the free space of the nonvolatile memory space is insufficient, the solid state disk can copy the effective pages with the continuous logical page addresses into the flash memory space in sequence, wherein the writing weight of the solid state disk in the nonvolatile memory space is lower. When the free space of the flash memory space is insufficient, the solid state disk can preferentially recycle the partitions with large read-write weights and small number of effective pages in the flash memory space, and the effective pages of the partitions are copied into the nonvolatile memory space. Therefore, merging operations such as full merging and the like can be completely avoided, and the overall performance of the solid state disk can be greatly improved.
Based on the above system architecture, please refer to fig. 5, fig. 5 is a flowchart illustrating another data writing method according to an embodiment of the present application. As shown in fig. 5, the data writing method may include, but is not limited to, the following steps:
501. the method comprises the steps that a solid state disk receives a first write request sent by a host, wherein the first write request comprises first data.
Step 501 is identical to step 301 and reference is made to the relevant description in step 301 above.
502. The solid state disk determines whether the first write request is an update request, and if it is determined that the first write request is an update request, step 503 is executed, and if it is determined that the first write request is not an update request, step 505 is executed.
The solid state disk may determine whether the first write request is an update request according to the logical page address of the first data. Step 502 is identical to step 302 and the detailed description can be made with reference to the relevant description in step 302 above.
503. The solid state disk determines whether the second data is stored in the nonvolatile memory space or the flash memory space, the second data is old data corresponding to the first data, step 508 is executed if it is determined that the second data is stored in the nonvolatile memory space, and step 504 is executed if it is determined that the second data is stored in the flash memory space.
Step 503 is the same as step 303 and reference is made to the relevant description in step 303.
In some embodiments, step 502 and step 503 may be performed simultaneously by the solid state disk, that is, the solid state disk may determine whether old data corresponding to the first data is stored in the nonvolatile memory space while determining whether the first write request is an update request.
504. And updating the number of effective pages and the writing weight of the partition where the second data are located by the solid state disk.
Step 504 is identical to step 304 and the detailed description can be referred to the relevant description in step 304 above.
505. The solid state disk determines whether the first write request is a sequential write request and whether the data amount of the first data is greater than or equal to a first threshold, if it is determined that the first write request is not a sequential write request or that the data amount of the first data is less than the first threshold, step 506 is executed, and if it is determined that the first write request is a sequential write request and that the data amount of the first data is greater than or equal to the first threshold, step 509 is executed.
Step 505 is the same as step 305 and reference is made to the relevant description in step 305 above for a detailed description.
506. The solid state disk determines whether the available space (i.e., the free space) of the nonvolatile memory space is sufficient, and if it is determined that the available space of the nonvolatile memory space is sufficient, step 508 is executed, and if it is determined that the available space of the nonvolatile memory space is insufficient, step 507 is executed.
Before the first data is written into the nonvolatile memory space, the solid state disk can firstly judge whether the available space of the nonvolatile memory space is sufficient. If it is determined that the available space of the nonvolatile memory space is sufficient, the first data may be directly written into the nonvolatile memory space, i.e. step 508 may be directly performed. Under the condition that the available space of the nonvolatile memory space is insufficient, the effective pages with lower writing weight in the nonvolatile memory space can be copied to the flash memory space in sequence, and then the effective pages can be recovered to be used as new idle pages. Then, the solid state disk may write the first data into the free pages, that is, step 507 may be executed first, and then step 508 may be executed.
In some embodiments, the solid state disk may determine whether the available space of the nonvolatile memory space is less than a tenth threshold, and if it is determined that the available space of the nonvolatile memory space is less than the tenth threshold, the solid state disk may determine that the available space of the nonvolatile memory space is insufficient, and may execute step 507. If it is determined that the available space of the nonvolatile memory space is greater than or equal to the tenth threshold, the solid state disk may determine that the available space of the nonvolatile memory space is sufficient, and step 508 may be executed. The size of the tenth threshold may be determined according to the size of the nonvolatile memory space, and the larger the nonvolatile memory space, the larger the tenth threshold may be. In other embodiments, the solid state disk may determine whether the available space of the nonvolatile memory space is smaller than the data amount of the first data, and if it is determined that the available space of the nonvolatile memory space is smaller than the data amount of the first data, the solid state disk may determine that the available space of the nonvolatile memory space is insufficient, and step 507 may be executed. If it is determined that the available space of the nonvolatile memory space is greater than or equal to the data amount of the first data, the solid state disk may determine that the available space of the nonvolatile memory space is sufficient, and step 508 may be executed.
In some embodiments, the solid state disk may execute step 504 and step 506 simultaneously, that is, the solid state disk may update the number of valid pages and the write weight of the partition where the second data is located while determining whether the available space of the nonvolatile memory space is sufficient.
507. And copying the effective page with lower writing weight in the nonvolatile memory space into the flash memory space by the solid state disk.
Under the condition that the available space of the nonvolatile memory space is insufficient, the solid state disk can copy the effective page with lower writing weight in the nonvolatile memory space into the flash memory space, so that the writing weight of the effective page in the flash memory space can be ensured to be lower.
In some embodiments, the solid state disk may copy the valid pages with the writing weight smaller than the seventh threshold value in the nonvolatile memory space to the flash memory space, or may directly copy S valid pages with the minimum writing weight to the flash memory space. It should be understood that, because the nonvolatile memory space can be overwritten, the solid state disk can copy the valid pages with lower write weights in the nonvolatile memory space and with consecutive logical page addresses to the flash memory space sequentially.
In one possible implementation manner, the solid state disk may also periodically copy the valid page with a lower writing weight in the nonvolatile memory space into the flash memory space (for example, copy the valid page once in 2 days), so as to improve the writing speed. Further, in order to reduce the influence on the reading and writing of the solid state disk, the above-mentioned copy operation may be performed when idle (i.e., when data reading and writing is not performed).
508. And the solid state disk writes the first data into the nonvolatile memory space.
Specifically, in the case where the first write request is an update request and the second data is stored in the nonvolatile memory space, the solid state disk may overwrite the first data on the physical page where the second data is located (i.e., the first physical page), and may update the write weight of the physical page (i.e., add the first value based on the current write weight of the physical page). In the case where the first write request is an update request and the second data is stored in the flash memory space, the solid state disk may write the first data into a first free page (i.e., a first free physical page) in the nonvolatile memory space, and may update a write weight of the first free page (i.e., add the first value based on a write weight of a physical page in which the second data is located). Meanwhile, the solid state disk also needs to update the page mapping table of the nonvolatile memory space, that is, the corresponding relationship between the first idle page and the first logical page (i.e. the logical page where the first data is located) is added in the page mapping table. In the case where the first write request is a non-update request and the first write request is a non-sequential write request or the data amount of the first data is smaller than the first threshold, the solid state disk may also write the first data into a first free page (i.e., a first free physical page) in the nonvolatile memory space, and may update the write weight of the first free page (i.e., update the write weight of the first free page to the first value). At this time, the solid state disk also needs to update the page mapping table of the nonvolatile memory space.
It should be understood that, because the solid state disk can read data from the cache space faster, in some embodiments, the solid state disk may store the valid page with a higher reading weight in the nonvolatile memory space in the cache space, so as to improve the reading and writing efficiency. Specifically, in one possible implementation manner, the solid state disk may store the valid page in the buffer space with the read weight greater than the eleventh threshold in the nonvolatile memory space. The size of the eleventh threshold may be determined according to the distribution of the read weights of all valid pages in the nonvolatile memory space (e.g., the eleventh threshold is the valid page with the read weight of 10% of the first row in the nonvolatile memory space). In another possible implementation manner, the solid state disk may divide the valid pages in the nonvolatile memory space into a plurality of heat levels according to the read weight, where the higher the heat level is, the greater the read weight is. Then, the solid state disk may store the valid page of the highest heat level in the nonvolatile memory space into the cache space, or may store the valid pages of the highest plurality of heat levels in the nonvolatile memory space into the cache space. For the partitioning of the heat level, reference may be made to the relevant description in step 310.
509. The solid state disk determines whether the available space of the flash memory space is sufficient, and if it is determined that the available space of the flash memory space is sufficient, step 511 is executed, and if it is determined that the available space of the flash memory space is insufficient, step 510 is executed.
510. And the solid state disk performs garbage collection of the flash memory space.
511. And the solid state disk writes the first data into the flash memory space.
Steps 509-511 are identical to steps 311-313 and reference is made to the relevant description in steps 311-313 above.
The above-mentioned flow of writing data and flow of page migration in the nonvolatile memory space can make the reading weight of effective page in the nonvolatile memory space be generally greater than the reading weight of effective page in the flash memory space. The larger the reading weight of an effective page is, the more likely the data of the effective page is read, so when the solid state disk receives a read request, the data can be read from the nonvolatile memory space first, and if the data read by the read request is not stored in the nonvolatile memory space, the data can be read from the flash memory space. By reading the data through the reading flow, the reading efficiency of the data can be improved.
Based on the above system architecture, please refer to fig. 6, fig. 6 is a flow chart of a data reading method disclosed in an embodiment of the present application. As shown in fig. 6, the data reading method may include, but is not limited to, the following steps:
601. The solid state disk receives a first reading request sent by the host, wherein the first reading request comprises a second logical page address.
602. The solid state disk determines whether the data read by the first read request is stored in the cache space, where a page with a higher read weight value in the nonvolatile memory space is stored, step 603 is executed if the data read by the first read request is stored in the cache space, and step 604 is executed if the data read by the first read request is not stored in the cache space.
603. The solid state disk reads the data read by the first reading request from the cache space.
Steps 601-603 are identical to steps 401-403 and reference is made to the relevant description in steps 401-403 above.
604. The solid state disk determines whether the data read by the first read request is stored in the nonvolatile memory space, and if the data read by the first read request is stored in the nonvolatile memory space, step 605 is executed, and if the data read by the first read request is not stored in the nonvolatile memory space, step 606 is executed.
Under the condition that the data read by the first read request is not stored in the cache space, the solid state disk may continuously determine whether the data read by the first read request is stored in the nonvolatile memory space, and under the condition that the data read by the first read request is stored in the nonvolatile memory space, the solid state disk may read the data read by the first read request from the nonvolatile memory space according to the page mapping table of the nonvolatile memory space (i.e. execute step 605). In the case where the data read by the first read request is not stored in the nonvolatile memory space, the solid state disk may read the data read by the first read request from the flash memory space according to the block mapping table of the flash memory space (i.e. execute step 606).
The solid state disk can judge whether the data read by the first reading request is stored in the nonvolatile memory space according to the second logical page address. Reference may be made specifically to the relevant description in step 404.
605. The solid state disk reads the data read by the first reading request from the nonvolatile memory space.
Under the condition that the data read by the first reading request is stored in the nonvolatile memory space, the solid state disk can determine a second physical page address corresponding to the second logical page address according to the page mapping table of the nonvolatile memory space, then the data read by the first reading request can be read from the nonvolatile memory space according to the second physical page address, and the data can be returned to the host. And after the solid state disk reads data from the nonvolatile memory space, the reading weight of the corresponding physical page in the nonvolatile memory space can be updated. And adding a second numerical value on the basis of the reading weight of the physical page to obtain an updated reading weight.
606. And the solid state disk reads the data read by the first reading request from the flash memory space.
In the case where the data read by the first read request is not stored in the nonvolatile memory space, it is indicated that it is stored in the flash memory space. The solid state disk can read the data read by the first reading request from the flash memory space. Step 606 is identical to step 406 and reference is made to the relevant description in step 406 above.
It should be noted that the embodiment of the method for writing data corresponding to fig. 5 and the embodiment of the method for reading data corresponding to fig. 6 may belong to the same embodiment. In addition, the data read by the first read request in fig. 5 may be the data written into the solid state disk by the first write request before the solid state disk receives the first read request. It should also be noted that, the related information (i.e., the same information or similar information) and the related description in the above different embodiments may refer to each other.
It should be understood that the above-mentioned data writing method and the data reading method are illustrated in fig. 3, fig. 4, fig. 5, and fig. 6 by taking the solid state disk as an example of the execution body of the interaction schematic, but the application is not limited to the execution body of the interaction schematic. For example, the solid state disk in fig. 3, fig. 4, fig. 5 and fig. 6 may also be a chip, a chip system or a processor supporting the solid state disk to implement the method, and may also be a logic module or software capable of implementing all or part of the functions of the solid state disk.
Based on the above system architecture, please refer to fig. 7, fig. 7 is a schematic structural diagram of a solid state disk disclosed in an embodiment of the present application. The solid state disk 700 may include: a processing unit 701, a flash memory 702, and a nonvolatile memory 703. The processing unit 701 is coupled to a flash memory 702 and a nonvolatile memory 703, respectively. Solid state disk 700 may also include a cache 704, and processing unit 701 may also be coupled to cache 704.
In some embodiments, the processing unit 701 may include a processor and a storage controller, where the processor is coupled to the storage controller, the processor may send instructions to the storage controller, or the storage controller may generate instructions, in response to which the storage controller may perform the operations performed by the solid state disk in the method embodiments shown in fig. 3, 4, 5, and 6 described above.
By way of example, the nonvolatile memory 703 may include one or more nonvolatile memory chips, which may be any one of PCM memory chips, 3D Xpoint memory chips.
By way of example, the flash memory 702 may include one or more flash memory chips, which may be any of a NAND flash memory chip, a NOR flash memory chip.
By way of example, the cache 704 may be a volatile memory such as SRAM, DRAM, or the like.
In an embodiment, the operations performed by the solid state disk 700 in the method embodiments shown in fig. 3, fig. 4, fig. 5, and fig. 6 may be referred to the above related descriptions, which are not described in detail herein.
It should be noted that the solid state disk shown in fig. 7 is only one implementation manner of the embodiment of the present application, and in practical application, the solid state disk 700 may further include more or fewer components, which is not limited herein.
The present application also discloses a computer-readable storage medium having stored thereon instructions that, when executed, perform the method of the above-described method embodiments. The present application also discloses a computer program product comprising instructions which, when executed, perform the method of the above-described method embodiments.
It will be apparent that the embodiments described above are only some, but not all, of the embodiments of the present application. Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application for the embodiment. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly understand that the embodiments described herein may be combined with other embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure. The terms "first," second, "" third and the like in the description and in the claims and drawings are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the terms "comprising," "including," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion. For example, a series of steps or elements may be included, or alternatively, steps or elements not listed or, alternatively, other steps or elements inherent to such process, method, article, or apparatus may be included.
It is to be understood that only some, but not all, of the details relating to the present application are shown in the accompanying drawings. It should be appreciated that some example embodiments are described as processes or methods depicted as flowcharts. Although a flowchart depicts operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently, or at the same time. Furthermore, the order of the operations may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figures. The processes may correspond to methods, functions, procedures, subroutines, and the like.
As used in this specification, the terms "component," "module," "system," "unit," and the like are intended to refer to a computer-related entity, either hardware, firmware, a combination of hardware and software, or software in execution. For example, a unit may be, but is not limited to being, a process running on a processor, an object, an executable, a thread of execution, a program, and/or being distributed between two or more computers. Furthermore, these units may be implemented from a variety of computer-readable media having various data structures stored thereon. The units may communicate by way of local and/or remote processes such as in accordance with a signal having one or more data packets (e.g., second unit data from another unit interacting with a local system, distributed system, and/or across a network).
The foregoing embodiments have been provided for the purpose of illustrating the technical solution and advantageous effects of the present application in further detail, and it should be understood that the foregoing embodiments are merely illustrative of the present application and are not intended to limit the scope of the present application, and any modifications, equivalents, improvements, etc. made on the basis of the technical solution of the present application should be included in the scope of the present application.

Claims (19)

1. The data writing method is characterized by being applied to a solid state disk, wherein the solid state disk comprises a nonvolatile memory, a flash memory and a processing unit, and the processing unit is respectively coupled with the nonvolatile memory and the flash memory, and the method comprises the following steps:
receiving a first write request, the first write request including first data;
when the first data is determined to be high-heat data, writing the first data into the nonvolatile memory;
and writing the first data into the flash memory when the first data is determined not to be high-heat data.
2. The method according to claim 1, wherein the method further comprises:
when the first write request satisfies at least one first condition, determining that the first data is high heat data, the first condition comprising:
The first write request is an update request, the data amount of the first data is less than a first threshold, and the first write request is a non-sequential write request.
3. The method of claim 2, wherein the nonvolatile memory employs page mapping, and wherein the writing the first data to the nonvolatile memory comprises:
when the first writing request is an updating request and second data is stored in the nonvolatile memory, the first data is rewritten into a first physical page, wherein the first physical page is a physical page occupied by the second data in the nonvolatile memory; the second data is old data corresponding to the first data;
and writing the first data into a first free physical page of the nonvolatile memory under the condition that the first write request is an update request and the second data is stored in the flash memory or under the condition that the first write request is not an update request and the data volume of the first data is smaller than a first threshold or the first write request is a non-sequential write request.
4. The method of claim 3, wherein in the event that the second data is stored in the flash memory, the method further comprises:
And updating the number of the effective pages and the writing weight of the partition where the second data is located.
5. The method of claim 3 or 4, wherein the nonvolatile memory includes a near log area and a far log area; the writing the first data into the first free physical page of the nonvolatile memory specifically includes:
and writing the first data into a first idle physical page of the nonvolatile memory, wherein the first idle physical page is positioned in the near-journaling area.
6. The method of claim 5, wherein the method further comprises:
and under the condition that the free space of the near log area is smaller than a second threshold value, migrating the valid page with the near log area reading weight smaller than a third threshold value to the far log area.
7. The method according to claim 5 or 6, characterized in that the method further comprises:
and if the free space of the far log area is smaller than a sixth threshold value, copying at least Q valid pages with continuous logical page addresses into the flash memory, wherein Q is a positive integer, and the write weight in the far log area is smaller than a seventh threshold value.
8. The method according to any one of claims 3-7, further comprising:
Updating a write weight of the first physical page when the first data is overwritten to the first physical page;
and when the first data is written into a first idle physical page of the nonvolatile memory, updating the writing weight of the first idle physical page.
9. The method of any of claims 1-8, wherein the flash memory employs block mapping, and wherein writing the first data to the flash memory comprises:
writing the first data into a second free physical page of the flash memory, wherein the second free physical page is positioned in a first physical block;
the method further comprises the steps of:
and updating the write weight of the second idle physical page.
10. The method of any of claims 5-9, wherein the solid state disk further comprises a cache, the processing unit being coupled to the cache, the method further comprising:
and when the solid state disk is powered on again, loading the effective page with the reading weight larger than a ninth threshold value in the near log area and the page mapping table of the nonvolatile memory into the cache.
11. The method of claim 10, wherein the cache is further configured to store a page mapping table of the nonvolatile memory and a block mapping table of the flash memory, the first write request further comprising a first logical page address of the first data, the method further comprising:
When the first data are determined to be high-heat data, adding the corresponding relation between the first logical page address and the physical page where the first data are located in the page mapping table;
and when the first data is not the high-heat data, adding the corresponding relation between the first logical block address of the first data and the physical block where the first data is located in the block mapping table.
12. The method of claim 11, wherein the method further comprises:
receiving a first read request, the first read request including a second logical page address, the second logical page address including one or more logical page addresses;
reading data from the nonvolatile memory according to the second logical page address and the page mapping table, in the case where the second logical page address exists in the page mapping table;
and reading data from the flash memory according to the second logical page address and the block mapping table in the case that the second logical page address does not exist in the page mapping table.
13. The method of claim 12, wherein the page mapping table comprises a first page mapping table and a second page mapping table, the first page mapping table being a page mapping table of the near log region and the second page mapping table being a page mapping table of the far log region, the reading data from the nonvolatile memory according to the second logical page address and the page mapping table of the nonvolatile memory comprising:
Reading data from the near log region according to the second logical page address and the first page mapping table, in the case where the second logical page address is present in the first page mapping table;
and reading data from the remote log area according to the second logical page address and the second page mapping table in the case that the second logical page address exists in the second page mapping table.
14. The method of claim 13, wherein the cache further stores physical pages in the near log region having read weights greater than a ninth threshold, the method further comprising:
and under the condition that the data corresponding to the second logical page address is stored in the cache, reading the data from the cache according to the second logical page address.
15. The method according to any one of claims 12-14, further comprising:
and updating the reading weight of the second physical page, wherein the second physical page is the physical page corresponding to the second logical page address.
16. The solid state disk is characterized by comprising a nonvolatile memory, a flash memory and a processing unit, wherein the processing unit is respectively coupled with the nonvolatile memory and the flash memory; the processing unit being adapted to perform the method of any of claims 1-15.
17. The solid state disk of claim 16, wherein the processing unit comprises a processor and a storage controller, the processor coupled to the storage controller, the processor sending instructions to the storage controller or the storage controller generating the instructions, the storage controller performing the method of any of claims 1-15 in response to the instructions.
18. The solid state disk of claim 16 or 17, wherein the nonvolatile memory comprises one or more nonvolatile memory chips, the nonvolatile memory chips being any one of phase change memory PCM, three-dimensional magnetic memory 3D Xpoint.
19. The solid state disk of any of claims 16-18, wherein the flash memory comprises one or more flash memory chips, the flash memory chips being any of NAND flash memory chips, NOR flash memory chips.
CN202210883284.8A 2022-07-26 2022-07-26 Data writing method and solid state disk Pending CN117492637A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210883284.8A CN117492637A (en) 2022-07-26 2022-07-26 Data writing method and solid state disk

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210883284.8A CN117492637A (en) 2022-07-26 2022-07-26 Data writing method and solid state disk

Publications (1)

Publication Number Publication Date
CN117492637A true CN117492637A (en) 2024-02-02

Family

ID=89678761

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210883284.8A Pending CN117492637A (en) 2022-07-26 2022-07-26 Data writing method and solid state disk

Country Status (1)

Country Link
CN (1) CN117492637A (en)

Similar Documents

Publication Publication Date Title
US11977481B2 (en) Controller for controlling non-volatile semiconductor memory and method of controlling non-volatile semiconductor memory
US11669444B2 (en) Computing system and method for controlling storage device
US11467955B2 (en) Memory system and method for controlling nonvolatile memory
CN109144888B (en) Memory system
US10732898B2 (en) Method and apparatus for accessing flash memory device
JP2021128582A (en) Memory system and control method
WO2017000658A1 (en) Storage system, storage management device, storage device, hybrid storage device, and storage management method
US20110264884A1 (en) Data storage device and method of operating the same
US20180374546A1 (en) Method and apparatus for refreshing flash memory device
US20120311237A1 (en) Storage device, storage system and method of virtualizing a storage device
WO2014074449A2 (en) Wear leveling in flash memory devices with trim commands
JP2013544414A (en) Transaction log restore
US10754785B2 (en) Checkpointing for DRAM-less SSD
CN110309077B (en) Method and device for constructing flash translation layer of cooperative work of host and equipment
CN113900582A (en) Data processing method and corresponding data storage device
US20200241750A1 (en) Memory system and method for controlling nonvolatile memory
KR20210012085A (en) Storage device for improving journal replay, operating method thereof, and electronic device comprising storage device
US20110264848A1 (en) Data recording device
CN117492637A (en) Data writing method and solid state disk
CN109002265B (en) Data processing method and related device
CN117215968A (en) Method and system for reducing on time of solid state device
CN111813325A (en) Memory control method, memory storage device and memory control circuit unit

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication