CN113778337A - Solid state disk based on flash memory and data management method thereof - Google Patents

Solid state disk based on flash memory and data management method thereof Download PDF

Info

Publication number
CN113778337A
CN113778337A CN202111064344.5A CN202111064344A CN113778337A CN 113778337 A CN113778337 A CN 113778337A CN 202111064344 A CN202111064344 A CN 202111064344A CN 113778337 A CN113778337 A CN 113778337A
Authority
CN
China
Prior art keywords
error correction
correction unit
data block
target
flash 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
CN202111064344.5A
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.)
Shenzhen Dapu Microelectronics Co Ltd
Original Assignee
Shenzhen Dapu Microelectronics 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 Shenzhen Dapu Microelectronics Co Ltd filed Critical Shenzhen Dapu Microelectronics Co Ltd
Priority to CN202111064344.5A priority Critical patent/CN113778337A/en
Publication of CN113778337A publication Critical patent/CN113778337A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1008Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices
    • G06F11/1068Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's in individual solid state devices in sector programmable memories, e.g. flash disk
    • 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
    • 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/0614Improving the reliability of storage systems
    • G06F3/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • 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/0674Disk device
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • G11C29/04Detection or location of defective memory elements, e.g. cell constructio details, timing of test signals
    • G11C29/08Functional testing, e.g. testing during refresh, power-on self testing [POST] or distributed testing
    • G11C29/12Built-in arrangements for testing, e.g. built-in self testing [BIST] or interconnection details
    • G11C29/38Response verification devices
    • G11C29/42Response verification devices using error correcting codes [ECC] or parity check

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)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention discloses a solid state disk based on a flash memory and a data management method thereof, and for an error correction unit, two conditions are provided: the first is that the expected value of RBER after the error correction unit writes in the target data block is smaller than a preset bit error rate threshold; the second is that the meta-information contained in the error correction unit of the source data block is time invariant information. When the error correction unit needs to be moved from the source data block to the target data block, if two conditions are met simultaneously, the error correction unit does not need to be coded and decoded, and can be moved directly; if the two conditions are not met simultaneously, the error correction unit needs to be decoded first, and when the meta information contained in the error correction unit is the time-invariant information, the decoding is not needed, and the decoded error correction unit is directly moved; when the meta-information contained in the error correction unit is time-varying information, the meta-information needs to be updated and re-encoded, and then the re-encoded error correction unit is moved. Therefore, the coding and decoding operations are reduced and the IO pressure of an internal bus is reduced through the data management of the error correction unit.

Description

Solid state disk based on flash memory and data management method thereof
Technical Field
The invention relates to the field of solid-state storage, in particular to a solid-state hard disk based on a flash memory and a data management method thereof.
Background
The basic structure of the flash memory is shown in fig. 1, a packaged flash memory Chip (Chip) is composed of a plurality of dies (Die), each Die is composed of a plurality of packets (Plane), each packet is composed of a plurality of data blocks (Block), each data Block is composed of a plurality of Word lines (Word Line), each Word Line is composed of 1 to N pages (Page), for example, one Word Line of a TLC (Triple-Level Cell, three-Level Cell) flash memory Chip is composed of three pages of LSB (least significant bit), CSB (central significant bit), MSB (most significant bit). It should be noted that some flash memories have no word line, and each data block is directly composed of multiple pages. A data block is the basic unit of flash erase. For a flash memory with a word line, the word line is a basic unit for reading and writing of the flash memory; for a flash memory without a wordline, a page is the basic unit of flash memory read and write. When a word line or page is written with data, a new write operation can be performed only after the erase operation is performed on the data block.
In a flash-based solid state disk (a solid state disk using a flash chip as a storage medium), when data is stored on a flash page, an error correction code must be protected based on reliability requirements. Currently, data on a flash page is stored according to error correction units, and one flash page can store a plurality of error correction units. As shown in fig. 2, the error correction unit is composed of valid data and check data, and the check data is used for error correction processing of the valid data; the effective data is divided into user data and management data, and the management data is also called meta information generally and is used for managing a firmware algorithm in the solid state disk. Specifically, the controller of the solid state disk includes an SBM (System Buffer Management), an ECC Engine, and an FLC (flash memory controller). From a logical perspective, user data is divided in logical mapping units. As shown in fig. 3 and 4, the data writing process of the flash memory is as follows: 1) decomposing the logic mapping unit and the meta information to be written into the flash memory into error correction units with certain sizes by using the SBM; 2) coding each error correction unit obtained by decomposition by using an ECC Engine to obtain each error correction unit after coding; 3) and combining the encoded error correction units into pages and writing the pages into the flash memory by using the FLC. The data reading process of the flash memory comprises the following steps: 1) reading each error correction unit to be read in the flash memory by using the FLC; 2) each of the read error correction units is decoded by the ECC Engine (decoding process, i.e., error correction process: the error bits are reduced to the correct bits); 3) and combining the logic blocks used for storing the user data in each decoded error correction unit into a logic mapping unit by using the SBM, and sending the combined logic mapping unit and the meta information in each decoded error correction unit to a dynamic random access memory of the solid state disk for being read by a host.
In solid state drives, garbage collection is a common operation. The principle of the garbage recycling operation is as follows: after the data of the host where the solid state disk is located is updated, the data originally in the flash memory becomes invalid data, so that some data blocks in the flash memory contain valid data and invalid data at the same time, and the still valid data in the data blocks need to be sorted and moved to new data blocks, so that the storage space occupied by the invalid data is released. As shown in fig. 5, both the data block a and the data block B contain valid data and invalid data, that is, the valid data occupies two data blocks in a scattered manner, and the two data blocks are collected into the same data block C after being sorted and moved, so that the storage spaces of the data block a and the data block B (the space of the invalid data is generally released) are released. The data blocks a and B are referred to as source data blocks, and the data block C is referred to as a destination data block, where a plurality of source data blocks generally correspond to a destination data block.
The error correction process in garbage collection is (as shown in fig. 6): step S1: reading an error correction unit from an effective page of a source data block by using the FLC and then placing the error correction unit in an internal cache; step S2: decoding the read error correction unit by using an ECC Engine; step S3: discarding the error correction check data of the decoded error correction unit and modifying the meta information in the error correction check data; step S4: coding the modified error correction unit by using an ECC Engine to obtain an error correction unit containing new error correction check data; step S5: and writing the encoded error correction unit into the target data block. It should be noted that, in the data transfer process, both the meta information and the error correction checking data change, and the reason for the change of the error correction checking data is that the meta information changes, and the only unchanged is the user data in the logical block.
Obviously, in the garbage collection process of the solid state disk, each error correction unit needs to perform decoding and encoding operations, but in the solid state disk, garbage collection is a very frequent operation, which results in too frequent encoding and decoding operations and too large IO pressure of an internal bus.
Therefore, how to provide a solution to the above technical problem is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The invention aims to provide a solid state disk based on a flash memory and a data management method thereof, which only need complete decoding and encoding operations when meta-information contained in an error correction unit is time-varying information, thereby reducing encoding and decoding operations and lightening IO (input/output) pressure of an internal bus.
In order to solve the above technical problem, the present invention provides a data management method, which is applied to a flash memory-based solid state disk, and comprises:
dividing meta information to be written into the flash memory into non-time-varying information and time-varying information, distributing the non-time-varying information and the time-varying information to different error correction units, and writing the different error correction units into the flash memory after encoding;
when a source data block of data to be moved appears in the flash memory, determining a target data block for storing each error correction unit in an effective page in the source data block from the flash memory;
acquiring an RBER expected value after a target error correction unit writes the target data block, and judging whether the RBER expected value is smaller than a preset bit error rate threshold value or not and whether meta-information contained in the target error correction unit is time-invariant information or not; wherein the target error correction unit is any error correction unit in the effective page;
if the judgment result is yes, directly writing the target error correction unit into the target data block;
if the judgment result shows that the meta-information is not time-varying information, decoding the target error correction unit, and directly writing the decoded target error correction unit into the target data block when the meta-information is the time-varying information; or when the meta-information is time-varying information, updating the meta-information contained in the decoded target error correction unit, re-encoding the target error correction unit of the updated meta-information, and writing the re-encoded target error correction unit into the target data block.
Preferably, the obtaining of the expected value of RBER after the target error correction unit writes the target data block includes:
obtaining an RBER reference value of an error correction unit in an effective page in the source data block, and obtaining an IRBER value of the target data block;
and adding the IRBER value to the RBER reference value to obtain an expected RBER evaluation value, and taking the expected RBER evaluation value as an expected RBER value after the target error correction unit writes the target data block.
Preferably, the obtaining the RBER reference value of the effective intra-page error correction unit in the source data block includes:
decoding each error correction unit in a target page according to the effective page address of the source data block to obtain the RBER value of each error correction unit in the target page; wherein the target page is any one of the valid pages;
and selecting the maximum RBER value from the RBER values of the error correction units in the target page, and using the maximum RBER value as the RBER reference value of each error correction unit in the effective page in the source data block.
Preferably, decoding each error correction unit in the target page according to the effective page address of the source data block includes:
and determining a first effective page of the source data block according to the effective page address of the source data block so as to decode each error correction unit in the first effective page.
Preferably, the data management method further includes:
presetting the corresponding relation between the addresses of different data blocks in the flash memory and the IRBER value;
acquiring an IRBER value of the target data block, including:
and inquiring the corresponding relation according to the address of the target data block so as to determine the IRBER value of the target data block.
Preferably, the presetting of the correspondence between the addresses of the different data blocks in the flash memory and the IRBER value includes:
and presetting an IRBER maintenance table for representing the corresponding relation between the addresses of different data blocks in the flash memory and the IRBER value.
Preferably, the writing the encoded different error correction units into the flash memory includes:
writing the error correction unit distributed with the non-time-varying information into a preset position of a flash memory page, and writing the error correction unit distributed with the time-varying information into the rest position of the flash memory page;
judging whether the meta information contained in the target error correction unit is time invariant information, including:
judging whether the target error correction unit is stored in a preset position of the flash memory page or not;
if yes, determining meta-information contained in the target error correction unit as time-invariant information;
if not, determining that the meta information contained in the target error correction unit is time-varying information.
In order to solve the technical problem, the invention also provides a solid state disk based on the flash memory, which comprises the flash memory; further comprising:
a solid state disk controller for implementing the steps of any of the above-described data management methods when executing a stored computer program.
Preferably, the solid state hard disk controller comprises:
SBM; the SBM comprises a data stream manager used for managing related data streams related to the solid state disk;
an error correction engine for encoding and decoding operations of the error correction unit;
RAM, is used for depositing the said coding and decoding data to correct the unit;
and the flash memory controller is used for writing the data cached in the RAM into the flash memory or reading the data of the flash memory into the RAM.
Preferably, the data stream manager comprises:
an information manager, configured to acquire, manage, and store the RBER reference value, the IRBER value of the destination data block, the RBER expected value, the preset bit error rate threshold, the address of the source data block, the address of the destination data block, the effective page address of the source data block, and preset location information of the error correction unit allocated with the non-time-varying information in the memory page;
a data processor for the distribution and update management of meta-information in the error correction unit and the management of error correction check data in the error correction unit;
the error correction control manager is used for controlling whether the error correction engine carries out the encoding and decoding operations of the error correction unit or not;
and the flash memory control manager is used for controlling the flash memory controller to carry out flash memory read-write operation.
The invention provides a data management method, which divides meta information to be written into a flash memory into non-time-varying information and time-varying information, distributes the non-time-varying information and the time-varying information to different error correction units, and writes the different error correction units into the flash memory after encoding. For the error correction unit, there are two conditions: the first is that the expected value of RBER after the error correction unit writes in the target data block is smaller than a preset bit error rate threshold; the second is that the meta-information contained in the error correction unit of the source data block is time invariant information. When the error correction unit needs to be moved from the source data block to the target data block, if two conditions are met simultaneously, the error correction unit does not need to be coded and decoded, and can be moved directly; if the two conditions are not met simultaneously, the error correction unit needs to be decoded first, and when the meta information contained in the error correction unit is the time-invariant information, the decoding is not needed, and the decoded error correction unit is directly moved; when the meta-information contained in the error correction unit is time-varying information, the meta-information needs to be updated and re-encoded, and then the re-encoded error correction unit is moved. Therefore, the method and the device need complete decoding and encoding operations only when the meta-information contained in the error correction unit is time-varying information, so that the encoding and decoding operations are reduced, and the IO pressure of an internal bus is relieved.
The invention also provides a solid state disk based on the flash memory, and the solid state disk has the same beneficial effects as the data management method.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed in the prior art and the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
FIG. 1 is a diagram illustrating a basic structure of a flash memory according to the prior art;
FIG. 2 is a schematic diagram of an error correction unit in the prior art;
FIG. 3 is a schematic diagram illustrating different viewing angles of a solid state disk according to the prior art;
fig. 4 is a schematic diagram illustrating a data read/write process of a flash memory in a solid state disk in the prior art;
FIG. 5 is a diagram illustrating garbage collection in a solid state drive according to the prior art;
FIG. 6 is a schematic diagram illustrating a process of error correction in garbage collection in the prior art;
FIG. 7 is a flowchart of a data management method according to an embodiment of the present invention;
fig. 8 is a schematic diagram of a meta information allocation provided in an embodiment of the present invention;
fig. 9 is a schematic diagram illustrating garbage collection in a first solid-state disk according to an embodiment of the present invention;
fig. 10 is a schematic diagram illustrating garbage collection in a second solid-state disk according to an embodiment of the present invention;
fig. 11 is a schematic diagram of an error correction processing flow in garbage collection according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of a solid state hard disk controller according to an embodiment of the present invention;
fig. 13 is a schematic structural diagram of a data stream manager according to an embodiment of the present invention;
fig. 14 is a schematic structural diagram of a solid state disk SSD according to an embodiment of the invention.
Detailed Description
The core of the invention is to provide a solid state disk based on a flash memory and a data management method thereof, and only when meta-information contained in an error correction unit is time-varying information, complete decoding and encoding operations are required, so that the encoding and decoding operations are reduced, and the IO pressure of an internal bus is reduced.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 7, fig. 7 is a flowchart illustrating a data management method according to an embodiment of the present invention.
The data management method is applied to the solid state disk based on the flash memory and comprises the following steps:
step S1: dividing meta information to be written into the flash memory into non-time-varying information and time-varying information, distributing the non-time-varying information and the time-varying information to different error correction units, and writing the different error correction units into the flash memory after encoding.
Specifically, the data writing process of the existing flash memory is as follows: 1) decomposing a logical mapping unit (user data) to be written into a flash memory and meta information into an error correction unit of a preset data size; 2) coding each error correction unit obtained by decomposition to obtain each coded error correction unit; 3) and combining the encoded error correction units into pages and writing the pages into the flash memory.
Generally, the meta information is dispersed into a plurality of error correction units, and most of the meta information is non-time-varying information (which is not changed all the time in the life cycle of the solid state disk), and only a small part of the meta information is time-varying information (which needs to update the content every time of garbage collection operation of the solid state disk), such as a timestamp, etc., so in the data writing process of the flash memory, the meta information to be written into the flash memory is firstly divided into the non-time-varying information and the time-varying information, and the non-time-varying information and the time-varying information are distributed to different error correction units (as shown in fig. 8), and then the different error correction units are written into the flash memory after being encoded, so as to provide a basis for subsequent processing of different error correction units.
Step S2: when a source data block of data to be moved appears in the flash memory, determining a target data block for storing each error correction unit in an effective page in the source data block from the flash memory.
Specifically, when a source data block (including an invalid page for storing invalid data and an valid page for storing valid data) of data to be moved occurs in the flash memory, a target data block (empty data block) needs to be determined from the flash memory, so as to store each error correction unit in the valid page in the source data block to the target data block, thereby completing garbage collection operation.
Step S3: acquiring an RBER expected value after a target data block is written into a target error correction unit, and judging whether the RBER expected value is smaller than a preset bit error rate threshold value and whether meta-information contained in the target error correction unit is non-time-varying information; if yes, go to step S4; if the determination result is negative, step S5 is executed. Step S4: and directly writing the target error correction unit into the target data block. Step S5: decoding the target error correction unit, and directly writing the decoded target error correction unit into the target data block when the meta information is the non-time-varying information; or when the meta-information is time-varying information, updating the meta-information contained in the decoded target error correction unit, re-encoding the target error correction unit in which the meta-information is updated, and writing the re-encoded target error correction unit into the target data block.
It should be noted that the target error correction unit in the present application is any error correction unit in the valid page in the source data block.
Specifically, the process of moving data to a destination data block in an existing source data block is as follows: 1) reading an error correction unit from a valid page of a source data block; 2) decoding the read error correction unit; 3) discarding the error correction check data of the decoded error correction unit, and modifying the meta information of the decoded error correction unit; 4) coding the modified error correction unit to obtain an error correction unit containing new error correction check data; 5) and writing the encoded error correction unit into the target data block.
It should be noted that the error correction unit is composed of valid data and error correction check data, and the valid data is divided into user data and meta information. The decoding process of the error correction unit, namely the error correction process, aims to restore the error bits in the effective data of the error correction unit into correct bits so as to meet the bit error rate requirement of the error correction unit; the encoding process of the error correction unit is to re-encode the meta information contained in the error correction unit to obtain new error correction check data according to the modified meta information after the meta information is modified.
That is, if an error correction unit in the source data block originally satisfies the requirement of the bit error rate, and the meta information included in the error correction unit is time-invariant information, the error correction unit does not need to perform decoding and encoding operations when moving from the source data block to the destination data block, and the data block is moved directly, as shown in fig. 9; if an error correction unit in the source data block originally does not satisfy the bit error rate requirement, but the meta information contained in the error correction unit is non-time-varying information, then the error correction unit only needs to perform decoding operation and does not need to perform encoding operation when moving from the source data block to the destination data block, as shown in fig. 10; if the meta information included in an error correction unit in the source data block is time-varying information, no matter whether the error correction unit satisfies the requirement of bit error rate, in order to update the meta information and retrieve new error correction check data according to the updated meta information, the error correction unit needs to perform both decoding operation and encoding operation when moving from the source data block to the destination data block, as shown in fig. 6.
Based on this, in the process of moving data in a source data block to a target data block, the method obtains an expected value of RBER (Raw Bit Error Rate) after any Error correction unit (called a target Error correction unit) in an effective page in the source data block is written into the target data block, and judges whether the expected value of RBER is smaller than a preset Bit Error Rate threshold value or not and whether meta-information contained in the target Error correction unit is time-invariant information or not; if the RBER expected value is smaller than a preset bit error rate threshold (the target error correction unit meets the bit error rate requirement) and the meta-information contained in the target error correction unit is time-invariant information, namely the judgment result is yes, directly writing the target error correction unit into the target data block; if the RBER expected value is not less than a preset bit error rate threshold (the target error correction unit does not meet the bit error rate requirement) and/or the meta-information contained in the target error correction unit is time-varying information, namely whether the meta-information exists in a judgment result or not, decoding the target error correction unit, and then, if the meta-information contained in the target error correction unit is non-time-varying information, directly writing the decoded target error correction unit into a target data block; and if the meta information contained in the target error correction unit is time-varying information, updating the meta information contained in the decoded target error correction unit, re-encoding the target error correction unit with the updated meta information, and writing the re-encoded target error correction unit into the target data block.
In summary, for any error correction unit in the active page in the source data block, there are two conditions: the first is that the expected value of RBER after the error correction unit writes the target data block is smaller than a preset bit error rate threshold; the second is that the meta-information contained in the error correction unit of the source data block is time invariant information. When the error correction unit needs to be moved from the source data block to the target data block, if two conditions are met simultaneously, the error correction unit does not need to be coded and decoded, and can be moved directly; if the two conditions are not met simultaneously, the error correction unit needs to be decoded first, and when the meta information contained in the error correction unit is the time-invariant information, the decoding is not needed, and the decoded error correction unit is directly moved; when the meta-information contained in the error correction unit is time-varying information, the meta-information needs to be updated and re-encoded, and then the re-encoded error correction unit is moved. Therefore, the method and the device need complete decoding and encoding operations only when the meta-information contained in the error correction unit is time-varying information, so that encoding and decoding operations are reduced, and IO (Input/Output) pressure of an internal bus is relieved.
On the basis of the above-described embodiment:
as an alternative embodiment, obtaining the expected RBER value after the target error correction unit writes the target data block includes:
obtaining an RBER reference value of an effective in-page error correction unit in a source data block, and obtaining an IRBER value of a target data block;
and adding the IRBER value to the RBER reference value to obtain an expected RBER evaluation value, and taking the expected RBER evaluation value as an expected RBER value after the target error correction unit writes the target data block.
Specifically, the process of acquiring the RBER expected value after the target error correction unit writes the target data block includes: 1) obtaining an RBER reference value of an Error correction unit in an effective page in a source data block, and obtaining an IRBER (Initial Raw Bit Error Rate) value of a target data block; it should be noted that all error correction units in the active page in the source data block correspond to the same RBER reference value; 2) adding the RBER reference value of the effective in-page error correction unit in the source data block to the IRBER value of the target data block to obtain an expected RBER evaluation value; 3) and taking the calculated RBER expected evaluation value as an RBER expected value after the target error correction unit is written into the target data block.
As can be seen, all error correction units in the effective page in the source data block correspond to the same RBER expected value, that is, the RBER expected evaluation values are calculated according to step 1) and step 2), so that the RBER expected values corresponding to all error correction units in the effective page in the source data block can be obtained.
As an alternative embodiment, obtaining the RBER reference value of the effective intra-page error correction unit in the source data block includes:
decoding each error correction unit in the target page according to the effective page address of the source data block to obtain the RBER value of each error correction unit in the target page; wherein, the target page is any effective page;
and selecting the maximum RBER value from the RBER values of the error correction units in the target page, and using the maximum RBER value as the RBER reference value of each error correction unit in the effective page in the source data block.
Specifically, the process of acquiring the RBER reference value of the effective intra-page error correction unit in the source data block includes: 1) decoding each error correction unit in any effective page (called a target page) of the source data block according to the effective page address of the source data block to obtain an RBER value of each error correction unit in the target page; 2) comparing the RBER values of the error correction units in the target page to select the maximum RBER value from the RBER values of the error correction units in the target page; 3) and taking the selected maximum RBER value as the RBER reference value of each error correction unit in the effective page in the source data block.
The reason why all error correction units in the effective page in the source data block correspond to the same RBER reference value is that the RBER conditions of the error correction units of different pages in the same data block have little difference, and the RBER conditions of different error correction units in the same page have little difference. The reason why the maximum RBER value of each error correction unit in the target page is used as the RBER reference value is that the maximum RBER value meets the bit error rate requirement, and the rest RBER values all meet the bit error rate requirement.
As an alternative embodiment, decoding each error correction unit in the target page according to the effective page address of the source data block includes:
and determining a first effective page of the source data block according to the effective page address of the source data block so as to decode each error correction unit in the first effective page.
Specifically, the process of acquiring the RBER reference value of the effective intra-page error correction unit of the source data block includes: 1) determining a first effective page of the source data block according to the effective page address of the source data block; 2) decoding each error correction unit in a first effective page of the source data block to obtain an RBER value of each error correction unit in the first effective page; 2) comparing the RBER values of the error correction units in the first effective page to select a maximum RBER value from the RBER values of the error correction units in the first effective page; 3) and using the selected maximum RBER value as the RBER reference value of each error correction unit in the effective page of the source data block.
The reason why the first valid page analysis of the source data block is selected is that the first valid page of the source data block can be read preferentially according to the valid page address of the source data block, which facilitates the analysis of the RBER reference value. As an optional embodiment, the data management method further includes:
presetting the corresponding relation between the addresses of different data blocks in the flash memory and the IRBER value;
acquiring an IRBER value of a target data block, comprising the following steps:
and inquiring the corresponding relation according to the address of the target data block to determine the IRBER value of the target data block.
Specifically, the corresponding relation between the addresses of different data blocks in the flash memory and the IRBER value is also set in advance, and the purpose is to query the corresponding relation according to the address of the target data block after the target data block is determined from the flash memory so as to determine the IRBER value of the target data block.
As an alternative embodiment, presetting the correspondence between the addresses of different data blocks in the flash memory and the IRBER value includes:
an IRBER maintenance table for representing the corresponding relation between the addresses of different data blocks in the flash memory and the IRBER value is preset.
Specifically, the correspondence between the addresses of different data blocks in the flash memory and the IRBER value, which is set in advance in the present application, is specifically set in a table form, which is called an IRBER maintenance table. After the target data block is determined from the flash memory, the IRBER maintenance table is queried according to the address of the target data block to determine the IRBER value of the target data block.
As an alternative embodiment, writing the encoded different error correction units into the flash memory includes:
writing the error correction unit distributed with the non-time-varying information into a preset position of the flash memory page, and writing the error correction unit distributed with the time-varying information into the rest position of the flash memory page;
judging whether the meta information contained in the target error correction unit is time invariant information, including:
judging whether the target error correction unit is stored in a preset position of a flash memory page or not;
if yes, determining that the meta information contained in the target error correction unit is non-time-varying information;
if not, the meta information contained in the target error correction unit is determined to be time-varying information.
Specifically, the application writes an error correction unit allocated with time-invariant information into a preset position of a flash memory page, and writes an error correction unit allocated with time-variant information into a remaining position of the flash memory page, and then judges whether meta-information contained in a target error correction unit is time-invariant information by judging whether the target error correction unit is stored in the preset position of the flash memory page, specifically, if the target error correction unit is stored in the preset position of the flash memory page, the meta-information contained in the target error correction unit is time-invariant information; if the target error correction unit is not stored in the preset position of the flash memory page, the meta information contained in the target error correction unit is time-varying information.
In summary, as shown in fig. 11, in the garbage collection process of the flash memory, the specific flow of the data management process is as follows: step S11: acquiring a target data block address, and inquiring to acquire an IRBER value of the target data block; wherein the IRBER value is used for judging a first condition; step S12: obtaining a source data block address, and reading an effective page; step S13: judging whether the read valid page is the first valid page, if so, going to step S14, otherwise, going to step S15; step S14: using the maximum RBER obtained by decoding each error correction unit in the first effective page as an RBER reference value; wherein, the RBER reference value is used for judging a first condition; step S15: whether the target error correction units of all the valid pages (including the first valid page) meet the first condition and the second condition, if yes, proceeding to step S19, otherwise, proceeding to step S16; step S16: after decoding the target error correction unit, the process proceeds to step S17; step S17: whether the decoded target error correction unit meets the second condition, if yes, proceeding to step S20, otherwise, proceeding to step S18; step S18: the decoded target error correction unit updates the meta-information, then recodes the meta-information and writes the meta-information into the flash memory; step S19: the target error correction unit does not decode and encode, and is directly written into the flash memory; step S20: the decoded target error correction unit does not update the meta information, and the original error correction check data is utilized, and the original error correction check data is directly written into the flash memory without encoding.
It should be noted that the data management method provided by the foregoing embodiment can be implemented by controller programming or hardware logic circuits in the flash-based solid state disk. Specifically, as shown in fig. 12, the solid state hard disk controller includes: 1) SBM (System Buffer Management); the SBM includes a data stream manager: management of related data streams involved in the solid state disk; 2) ECC Engine: encoding and decoding operations for the error correction unit; 3) RAM (Random Access Memory): the coding and decoding data used for storing the error correction unit; 4) FLC (flash controller): the flash memory is used for writing the data cached in the RAM into the flash memory or reading the data of the flash memory into the RAM. As shown in fig. 13, the data stream manager includes: 1) an information manager: the device comprises a data processing unit, a data processing unit and a data processing unit, wherein the data processing unit is used for acquiring, managing and storing an RBER reference value, an IRBER value of a target data block, an RBER expected value, a preset bit error rate threshold value, an address of a source data block, an address of the target data block, an effective page address of the source data block and preset position information of an error correction unit distributed with time-invariant information in a memory page; 2) a data processor: the management module is used for distributing and updating the meta information in the error correction unit and managing the error correction check data in the error correction unit; 3) an error correction control manager: the device is used for controlling whether the error correction engine carries out the encoding and decoding operation of the error correction unit or not; 4) the flash memory control manager: for controlling the flash memory controller to perform the flash memory read/write operation (the specific data management method is described in detail in the above embodiments, and is not described herein again, and thus, the reference may be made to the specific data management method).
In addition, the flash-based Solid State Disk is generally referred to as SSD (Solid State Disk), and as shown in fig. 14, the Solid State Disk SSD includes: 1) SSD Controller (solid state hard disk Controller): as a control operation unit, managing an SSD internal system; 2) NAND Flash Array (non-volatile Flash memory Array): as a storage unit, storing data (user data and system data), generally presenting a plurality of Flash channels (channels, abbreviated as CH), one Channel independently connected to a set of NAND Flash Array, as CH0/CH1 · · CHx in fig. 14; the NAND Flash (Flash memory) has the characteristics that erasing is required before writing, and the erasing times of each Flash memory are limited; 3) DDR (Double Data Rate, Double Data synchronous Dynamic Random Access Memory)/DRAM (Dynamic Random Access Memory): a storage unit used as a cache and an algorithm table; 4) connector: for connecting to a host, such as a PC (Personal Computer) or a server; 5) other Peripheral units, such as PMIC (Power Management IC), OSC (crystal Oscillator), JTAG (Joint Test Action Group) Interface, SPI (Serial Peripheral Interface) Interface, Sensor (Sensor), and UART (Universal Asynchronous Receiver/Transmitter) Interface.
The application also provides a solid state disk based on the flash memory, which comprises the flash memory; further comprising:
a solid state disk controller for implementing the steps of any of the above-described data management methods when executing a stored computer program.
As an alternative embodiment, the solid state hard disk controller comprises:
SBM; the SBM comprises a data stream manager used for managing related data streams related to the solid state disk;
an error correction engine for encoding and decoding operations of the error correction unit;
RAM, is used for depositing the coding and decoding data of the error correction unit;
and the flash memory controller is used for writing the data cached in the RAM into the flash memory or reading the data of the flash memory into the RAM.
As an alternative embodiment, the data stream manager comprises:
the information manager is used for acquiring, managing and storing the RBER reference value, the IRBER value of the target data block, the RBER expected value, the preset bit error rate threshold, the address of the source data block, the address of the target data block, the effective page address of the source data block and the fixed position information of the memory page in which the error correction unit distributed with the non-time-varying information is arranged;
a data processor for distributing and updating management of meta information in the error correction unit and management of error correction check data in the error correction unit;
the error correction control manager is used for controlling whether the error correction engine carries out the encoding and decoding operations of the error correction unit or not;
and the flash memory control manager is used for controlling the flash memory controller to carry out flash memory read-write operation.
For introduction of the flash memory-based solid state disk provided in the present application, reference is made to the above-mentioned embodiment of the data management method, which is not described herein again.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A data management method is applied to a solid state disk based on a flash memory, and comprises the following steps:
dividing meta information to be written into the flash memory into non-time-varying information and time-varying information, distributing the non-time-varying information and the time-varying information to different error correction units, and writing the different error correction units into the flash memory after encoding;
when a source data block of data to be moved appears in the flash memory, determining a target data block for storing each error correction unit in an effective page in the source data block from the flash memory;
acquiring an RBER expected value after a target error correction unit writes the target data block, and judging whether the RBER expected value is smaller than a preset bit error rate threshold value or not and whether meta-information contained in the target error correction unit is time-invariant information or not; wherein the target error correction unit is any error correction unit in the effective page;
if the judgment result is yes, directly writing the target error correction unit into the target data block;
if the judgment result shows that the meta-information is not time-varying information, decoding the target error correction unit, and directly writing the decoded target error correction unit into the target data block when the meta-information is the time-varying information; or when the meta-information is time-varying information, updating the meta-information contained in the decoded target error correction unit, re-encoding the target error correction unit of the updated meta-information, and writing the re-encoded target error correction unit into the target data block.
2. The data management method of claim 1, wherein obtaining the RBER expected value after the target error correction unit writes the destination data block comprises:
obtaining an RBER reference value of an error correction unit in an effective page in the source data block, and obtaining an IRBER value of the target data block;
and adding the IRBER value to the RBER reference value to obtain an expected RBER evaluation value, and taking the expected RBER evaluation value as an expected RBER value after the target error correction unit writes the target data block.
3. The data management method of claim 2, wherein obtaining the RBER reference value of the active intra page error correction unit in the source data block comprises:
decoding each error correction unit in a target page according to the effective page address of the source data block to obtain the RBER value of each error correction unit in the target page; wherein the target page is any one of the valid pages;
and selecting the maximum RBER value from the RBER values of the error correction units in the target page, and using the maximum RBER value as the RBER reference value of each error correction unit in the effective page in the source data block.
4. The data management method of claim 3, wherein decoding each error correction unit in the target page according to the effective page address of the source data block comprises:
and determining a first effective page of the source data block according to the effective page address of the source data block so as to decode each error correction unit in the first effective page.
5. The data management method of claim 2, wherein the data management method further comprises:
presetting the corresponding relation between the addresses of different data blocks in the flash memory and the IRBER value;
acquiring an IRBER value of the target data block, including:
and inquiring the corresponding relation according to the address of the target data block so as to determine the IRBER value of the target data block.
6. The data management method of claim 5, wherein presetting a correspondence between addresses of different data blocks in the flash memory and IRBER values comprises:
and presetting an IRBER maintenance table for representing the corresponding relation between the addresses of different data blocks in the flash memory and the IRBER value.
7. The data management method of any one of claims 1 to 6, wherein writing the different error correction units into the flash memory after encoding comprises:
writing the error correction unit distributed with the non-time-varying information into a preset position of a flash memory page, and writing the error correction unit distributed with the time-varying information into the rest position of the flash memory page;
judging whether the meta information contained in the target error correction unit is time invariant information, including:
judging whether the target error correction unit is stored in a preset position of the flash memory page or not;
if yes, determining meta-information contained in the target error correction unit as time-invariant information;
if not, determining that the meta information contained in the target error correction unit is time-varying information.
8. A solid state disk based on flash memory is characterized by comprising the flash memory; further comprising:
a solid state hard disk controller for implementing the steps of the data management method of any of claims 1-7 when executing a stored computer program.
9. The flash-based solid state disk of claim 8, wherein the solid state disk controller comprises:
SBM; the SBM comprises a data stream manager used for managing related data streams related to the solid state disk;
an error correction engine for encoding and decoding operations of the error correction unit;
RAM, is used for depositing the said coding and decoding data to correct the unit;
and the flash memory controller is used for writing the data cached in the RAM into the flash memory or reading the data of the flash memory into the RAM.
10. The flash-based solid state disk of claim 9, wherein the data stream manager comprises:
an information manager, configured to acquire, manage, and store the RBER reference value, the IRBER value of the destination data block, the RBER expected value, the preset bit error rate threshold, the address of the source data block, the address of the destination data block, the effective page address of the source data block, and preset location information of the error correction unit allocated with the non-time-varying information in the memory page;
a data processor for the distribution and update management of meta-information in the error correction unit and the management of error correction check data in the error correction unit;
the error correction control manager is used for controlling whether the error correction engine carries out the encoding and decoding operations of the error correction unit or not;
and the flash memory control manager is used for controlling the flash memory controller to carry out flash memory read-write operation.
CN202111064344.5A 2021-09-10 2021-09-10 Solid state disk based on flash memory and data management method thereof Pending CN113778337A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111064344.5A CN113778337A (en) 2021-09-10 2021-09-10 Solid state disk based on flash memory and data management method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111064344.5A CN113778337A (en) 2021-09-10 2021-09-10 Solid state disk based on flash memory and data management method thereof

Publications (1)

Publication Number Publication Date
CN113778337A true CN113778337A (en) 2021-12-10

Family

ID=78842730

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111064344.5A Pending CN113778337A (en) 2021-09-10 2021-09-10 Solid state disk based on flash memory and data management method thereof

Country Status (1)

Country Link
CN (1) CN113778337A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116343890A (en) * 2023-05-31 2023-06-27 深圳大普微电子科技有限公司 Error correction unit management method, memory control chip and flash memory device
CN116431382A (en) * 2023-06-12 2023-07-14 深圳大普微电子科技有限公司 Error correction unit management method, memory control chip and flash memory device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013062204A1 (en) * 2011-10-24 2013-05-02 한양대학교 산학협력단 Device and method for controlling a flash memory for storing an error correction code
US8788910B1 (en) * 2012-05-22 2014-07-22 Pmc-Sierra, Inc. Systems and methods for low latency, high reliability error correction in a flash drive
CN104575618A (en) * 2015-01-13 2015-04-29 重庆大学 Read-write modulation technique based on flash memory error checking
CN109872764A (en) * 2019-01-18 2019-06-11 南京大学 A kind of the ECC multi code Rate of Chinese character coding/decoding system and method for multi-level memory cell flash memory
CN109947589A (en) * 2019-03-05 2019-06-28 深圳市得一微电子有限责任公司 Approximate data storage method in a kind of flash memory

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013062204A1 (en) * 2011-10-24 2013-05-02 한양대학교 산학협력단 Device and method for controlling a flash memory for storing an error correction code
US8788910B1 (en) * 2012-05-22 2014-07-22 Pmc-Sierra, Inc. Systems and methods for low latency, high reliability error correction in a flash drive
CN104575618A (en) * 2015-01-13 2015-04-29 重庆大学 Read-write modulation technique based on flash memory error checking
CN109872764A (en) * 2019-01-18 2019-06-11 南京大学 A kind of the ECC multi code Rate of Chinese character coding/decoding system and method for multi-level memory cell flash memory
CN109947589A (en) * 2019-03-05 2019-06-28 深圳市得一微电子有限责任公司 Approximate data storage method in a kind of flash memory

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116343890A (en) * 2023-05-31 2023-06-27 深圳大普微电子科技有限公司 Error correction unit management method, memory control chip and flash memory device
CN116343890B (en) * 2023-05-31 2023-07-25 深圳大普微电子科技有限公司 Error correction unit management method, memory control chip and flash memory device
CN116431382A (en) * 2023-06-12 2023-07-14 深圳大普微电子科技有限公司 Error correction unit management method, memory control chip and flash memory device
CN116431382B (en) * 2023-06-12 2023-09-29 深圳大普微电子科技有限公司 Error correction unit management method, memory control chip and flash memory device

Similar Documents

Publication Publication Date Title
US11768632B2 (en) Memory system and method of controlling nonvolatile memory
US20200409559A1 (en) Non-volatile memory data write management
US9626287B2 (en) Solid state memory formatting
TWI399644B (en) Block management method for a non-volatile memory
US20080195833A1 (en) Systems, methods and computer program products for operating a data processing system in which a file system's unit of memory allocation is coordinated with a storage system's read/write operation unit
US11733895B2 (en) Control method of flash memory controller and associated flash memory controller and storage device
US10754555B2 (en) Low overhead mapping for highly sequential data
US10437520B2 (en) Method for performing writing management in a memory device, and associated memory device and controller thereof
US20150058531A1 (en) Data writing method, memory control circuit unit and memory storage apparatus
CN113778337A (en) Solid state disk based on flash memory and data management method thereof
TWI821151B (en) Control method of flash memory controller, flash memory controller, and storage device
TWI808384B (en) Storage device, flash memory control and control method thereo
US11397676B2 (en) Computer program product and method and apparatus for managing garbage collection process
US11748011B2 (en) Control method of flash memory controller and associated flash memory controller and storage device
US20210406169A1 (en) Self-adaptive wear leveling method and algorithm
CN117950590A (en) Method for optimizing ZenFS reset operation to prolong service life of ZNS-SSD

Legal Events

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