Super block writing method of solid state disk and solid state disk
By detecting the amount of word line error data in the superblock of the solid-state drive, dynamically adjusting the RAID mode and the location of the verification data storage, the problem of insufficient ECC error correction capability is solved, data protection capability is improved and space occupation is reduced.
Patent Information
- Application Number
- CN202510947313.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-09
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-07-09
AI Technical Summary
When existing solid-state drives encounter a large amount of physical page error data in the superblock, their ECC error correction capability is insufficient, resulting in the data failing to be corrected successfully.
By detecting the amount of erroneous data on each word line in the superblock, determining its status, selecting an appropriate RAID mode, encoding the data, generating verification data, and dynamically adjusting the storage location of the RAID verification data, a balance between data protection and space usage is achieved.
It improves data protection capabilities, reduces the extra space occupied by RAID verification data, and achieves more efficient data storage.
Smart Images

Figure CN120909502A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present disclosure relate to the technical field of memory, and more particularly, to a super block writing method of a solid state disk. BACKGROUND
[0002] A solid state disk (SSD) is a storage hard disk made of solid-state electronic storage chips, including a controller and a storage medium, which can be composed of one or more flash memory dies (DIEs), each of which is usually 32GB / 64GB / 128GB. In the same product, the number of planes divided by all flash memory dies in the column direction is the same, and the number of physical blocks divided by each plane in the row direction is also the same. Therefore, the controller usually manages the physical blocks of the same row of all planes of all flash memory dies as a basic unit, which is uniformly referred to as a super block.
[0003] When the controller writes data into the super block, in order to solve problems such as data errors and loss, the controller usually uses the Error Checking and Correcting (ECC) method to encode and decode the data. However, if some physical pages are poor, the amount of error data of the error is beyond the error correction capability of the ECC circuit, and the corresponding data cannot be successfully corrected. SUMMARY
[0004] Therefore, embodiments of the present disclosure provide a super block writing method of a solid state disk and a solid state disk to solve the existing problems.
[0005] According to a first aspect of embodiments of the present disclosure, a super block writing method of a solid state disk is provided, the solid state disk including a storage medium and a controller, the storage medium being composed of at least one flash memory die, the flash memory die including a plurality of planes, each plane including a plurality of physical blocks, each physical block including a plurality of word lines and a physical page connected to each word line, and the physical blocks of the same row of all planes forming a super block, each word line in the physical blocks of the same row of all planes extending in the row direction and being connected together, the super block writing method including:
[0006] reading data from the physical pages connected to each word line in the super block, and determining the state of each word line and the RAID mode in the super block according to the amount of error data corresponding to each word line;
[0007] when writing data to each word line in the super block, writing the to-be-written data and the RAID check data generated according to the to-be-written data to the physical pages connected to each word line according to the RAID mode.
[0008] In some embodiments, the determining the state of each word line and the RAID mode of the super block according to the amount of error data corresponding to the word line comprises:
[0009] determining whether the amount of error data corresponding to each word line is less than or equal to a first threshold value, and if so, recording the state of the word line as normal and no RAID is needed in the word line state table;
[0010] determining whether the amount of error data is less than or equal to a second threshold value, and if so, recording the state of the word line as poor and a first RAID is needed in the word line state table;
[0011] if the amount of error data is greater than the second threshold value, recording the state of the word line as very poor and a second RAID is needed in the word line state table, and the second RAID uses a larger space to store and backup the RAID check data than the first RAID.
[0012] In some embodiments, the second RAID uses a physical page of a specific plane of the word line to store and backup the RAID check data, and the first RAID uses one or more layers of basic storage units in a physical page of a plane of the word line to store and backup the RAID check data.
[0013] In some embodiments, the data to be written includes host data and ECC encoded data obtained from the host data by an ECC encoding circuit.
[0014] In some embodiments, the determining the state of each word line and the RAID mode of the super block according to the amount of error data corresponding to the word line further comprises:
[0015] determining whether the number of word lines with a poor or very poor state in the super block exceeds a set threshold value, and if so, applying a special RAID mode to the super block.
[0016] In some embodiments, among all the physical pages connected by a certain number of word lines, and / or among a certain number of physical pages of the same word line, the physical pages of the same plane located in different flash particles form a RAID.
[0017] In some embodiments, the word line state and RAID mode in the super block are recorded by a word line state table, and the word line state table is updated by pre-shipment reliability test and post-shipment regular inspection.
[0018] In some embodiments, in the super block, the storage locations of the RAID check data on each word line are offset according to a set value.
[0019] According to a second aspect of the embodiments of the present disclosure, a computer readable storage medium is provided for storing one or more computer instructions, which, when executed, implement the super block writing method described above.
[0020] According to a third aspect of the embodiments of the present disclosure, a computing device is provided, comprising a memory and a processor, the memory storing one or more computer instructions, the computer instructions being executed by the processor and implementing the super block writing method described above.
[0021] The super block writing method provided by the embodiments of the present disclosure selects a RAID mode according to the state of a word line, has strong data protection capability while not excessively increasing the occupied space of RAID check data, and achieves a trade-off between data protection capability and additional space occupation. BRIEF DESCRIPTION OF DRAWINGS
[0022] The above and other objects, features and advantages of the embodiments of the present disclosure will be more clearly understood from the following description taken in conjunction with the accompanying drawings, in which:
[0023] Figure 1 An example diagram of a host system is shown;
[0024] Figure 2 An example of a super block is given;
[0025] Figure 3 An example of a word line in a super block is given;
[0026] Figure 4 A flowchart of the super block writing method of the embodiments of the present disclosure is given;
[0027] Figure 5 A flowchart of a specific embodiment of step S401 in Figure 4 is given;
[0028] Figure 6 An example of a special RAID mode is given. DETAILED DESCRIPTION
[0029] The embodiments of the present disclosure are described below based on the embodiments, but the embodiments of the present disclosure are not limited to only these embodiments. In the following detailed description of the embodiments of the present disclosure, some specific details are described in detail. The embodiments of the present disclosure can also be completely understood without the description of these specific details. In order to avoid confusion of the essence of the embodiments of the present disclosure, the well-known methods, processes, and flows are not described in detail. In addition, the drawings are not necessarily drawn to scale.
[0030] The flowcharts and block diagrams in the drawings illustrate the possible architectural, functional and operational scenarios of systems, methods and apparatuses of the present disclosure. The blocks on the flowcharts and block diagrams can represent modules, segments, or only a code segment used to implement the specified logic function. It should also be noted that the executable instructions implementing the specified logic function can be recombined to generate new modules and segments. Therefore, the blocks of the drawings and the block sequence are only used to better illustrate the processes and steps of the embodiments, and should not be regarded as a limitation on the invention itself.
[0031] Figure 1 An example diagram of a host system 100 is shown. The host system 100 is, for example, a personal computer, a notebook computer, a server.
[0032] The host system 100 includes a host device 110 (a computer system including a host processor and a memory) and a storage device. The host device 110 can issue host commands to the storage device, so that the storage device manages host data stored in the storage device according to the commands. For example, the host device 110 can be communicatively connected to the storage device (e.g., through a host interface 121) and issue various commands (e.g., READ, WRITE, UNMAP, READ, TRIM, etc.) to the storage device. The storage device can store, update, read, and / or otherwise manage host data according to the address range prompted by the commands. Once the commands are executed, the storage device can transmit a response to the host device 110, indicating that the commands have been successfully completed.
[0033] The storage device is composed of a controller 120 and a storage medium 130. The controller 120 includes a host interface 121, a processor 123, a cache unit 124, and a storage medium interface 128. The host interface 121 of the controller 120 is connected to the host device 110, for caching and transmitting host commands and host data. The processor 123 is connected to the host interface 121, the cache unit 124, and the storage medium interface 128. The processor 123 parses the host commands and performs corresponding operations. The cache unit 124 is, for example, a static random access memory (SRAM) and / or a dynamic random access memory (DRAM), for storing mapping relationships between logical addresses and physical addresses and some configuration data. The storage medium interface 128 includes an interface circuit, for realizing data transmission between the controller 120 and the storage medium 130.
[0034] The storage device is, for example, a solid state disk using flash memory dies as storage media, the flash memory dies are divided into multiple planes in the column direction, and each plane is divided into physical blocks in the row direction. The cache unit 124 or the storage medium 130 also stores various software programs in a flash translation layer (FTL), which can be executed by the processor 123. The algorithm of the FTL usually manages and operates a super block composed of physical blocks with the same ID of all planes of all flash memory dies.
[0035] Figure 2 An example of a super block is given. As shown in the figure, the flash memory dies die0 and die1 each have planes plane0 and plane1, which are divided into multiple physical blocks, and each storage block is numbered (blockID) using 8N+X, where N and X are integers. Each super block is composed of super blocks with the same number, for example, the super block sBlk in the figure contains physical blocks numbered 8N+0. Figure 3 An example of a word line in a super block is given. In the super block sBlk, the word lines of the physical blocks in the same row have the same number (for example, 8Y+0) and extend and connect together in the row direction, and each word line connects multiple physical pages.
[0036] The basic storage unit of each physical page is, for example, a transistor of MLC / TLC (Multi-Level Cell / Triple-Level Cell) / SLC / QLC. The usual writing process of a super block is to write data into the physical pages connected by each word line one by one.
[0037] To enhance data protection for super blocks, the embodiments of the present disclosure apply RAID (Redundant Array of Independent Disks) to the super block writing process, and the flowchart is as shown in Figure 4
[0038] In step S401, data is read from the physical pages connected by each word line in the super block, and the state of the word line and the RAID mode in the super block are determined according to the amount of error data corresponding to the word line. The RAID mode indicates the composition of the RAID, and one RAID can be specified in the super block, or multiple RAIDs can be specified, and one RAID mode can be specified for one word line, or one RAID mode can be specified for multiple word lines.
[0039] In step S402, when writing data to each word line of the super block, the data to be written and the parity data generated according to the data to be written are written to the physical pages connected to each word line according to the corresponding RAID mode. The data to be written usually includes host data and encoded data obtained according to the host data and using an encoding mode such as LDPC (Low Density Parity Check Code), RS (Reed Solomon Code), BCH (Bose-Chaudhuri-Hocquenghem codes).
[0040] The embodiment determines the state of each word line in the super block by detecting the amount of error data of the word line, thereby determining the RAID mode in the super block according to the state of each word line in the super block, so that when writing data to each word line of the super block, the RAID check data is generated according to the RAID mode and written into each word line accordingly. Alternatively, the RAID mode can also specify the distribution of the RAID check data of the super block, and the RAID check data is generated and filled according to the distribution when writing data. Thus, the RAID check data is designed according to the state of the word line, which helps to achieve a trade-off between the RAID error correction capability and the additional resource occupation of the RAID, for example, the word line with more error data will leave more space to store and backup the RAID check data, while the word line without problem can not leave space to store and backup the RAID check data.
[0041] Figure 5 A flow chart of a specific embodiment of step S401 is given.
[0042] In step S501, data is read from each word line.
[0043] In step S502, it is determined whether the amount of error data is less than or equal to a first threshold value. If the amount of error data is less than or equal to the first threshold value, step S503 is performed, and if the amount of error data is not less than or equal to the first threshold value, step S504 is performed.
[0044] In step S503, the state of the word line is recorded in the word line state table as normal and no RAID is needed.
[0045] In step S504, it is determined whether the amount of error data is less than or equal to a second threshold value. If the amount of error data is less than or equal to the second threshold value, step S505 is performed, and if the amount of error data is not less than or equal to the second threshold value, step S506 is performed.
[0046] In step S505, the state of the word line is recorded in the word line state table as poor and a first RAID is needed.
[0047] In step S506, the state of the word line is recorded as very poor in the word line state, and the second RAID needs to be made.
[0048] The first threshold value and the second threshold value are defined in the embodiment, and the amount of error data of each word line is compared with the first threshold value and the second threshold value, and the state of the corresponding word line is divided into normal, poor and very poor according to the comparison result, and the poor and very poor respectively adopt the first RAID and the second RAID, the second RAID occupies more space to store and backup the RAID check data, so as to realize the trade-off between the RAID error correction capability and the RAID additional resource occupation.
[0049] Table 1 gives an exemplary word line state table. The state table describes the word line state and RAID case of a word line with two flash memory particles die 0 and die 1, each flash memory particle has two planes plane 0 and plane 1, and the basic storage unit is QLC (Quad-Level Cell).
[0050] Table 1
[0051] Table 2 gives the data writing case of the super block where block 0 is located according to Table 1. Among them, Data represents the storage of the data to be written (including host data and coded data), and RAID_PARITY represents the RAID check data.
[0052] Table 2
[0053] According to Tables 1 and 2, the firmware writes the super block of block 0 as follows:
[0054] On the word line wl0, since the state is normal, the NO RAID scheme is adopted, at this time the firmware will write the data in the order of die0 plane0 wl0 string0, die0 plane1 wl0 string0, die1 plane0 wl0 string0, …, die1 plane1 wl0 string3 and not RAID;
[0055] On wl1, since the state is poor, a block raid needs to be implemented to protect the stability of data, then the firmware writes data in the order of die0 plane0 wl1 string0, die0 plane1 wl1 string0, die1 plane0 wl1 string0 and generates RAID check data through XOR operation, and finally stores the RAID check data on die1 plane1 wl1 string0, and wl1 string1, string2 and string3 are processed in the same way;
[0056] On wl2, since the state is poor, a string raid is used to protect the stability of data, then the firmware writes data in the order of die0 plane0 wl2 string0, die0 plane1 wl2 string0, die1 plane0 wl2 string0, …, die1 plane0 wl2 string3 and generates RAID check data through XOR operation, and then stores the RAID check data on die1 plane1 wl2 string3.
[0057] Table 3 shows the relationship between the additional storage space occupied by the RAID check data according to Table 2 and the reliability.
[0058] Table 3 Scheme NO RAID STRING RAID BLOCK RAID MIX RAID Additional storage space taken None 1 / 16(wl2) 1 / 4(wl1) 5 / 48 (wlO, wl1 and wl2) Reliability Low Medium High High
[0059] It can be seen that the MIX RAID (dynamic RAID) adopted in the embodiment of the present disclosure occupies additional storage space for RAID check data between pure STRING RAID and BLOCK RAID, but the security is similar to BLOCK RAID.
[0060] Corresponding to Table 2, Table 4 shows another option of STRING RAID, i.e., RAID_PARITY is placed on die0 plane1 wl2 string3.
[0061] Table 4
[0062] It should be understood that the RAID check data on each word line is placed in different numbered flash particles, different numbered planes, different numbered storage pages, and different numbered basic storage unit layers, which is beneficial to improve the RAID error correction capability. As an example, in a super block, starting from the first word line, a new physical page is located every time a fixed number of physical pages are offset, the new physical page is used to store and backup RAID check data, and the cycle is repeated.
[0063] In addition, there is also a DIE RAID mode, which is used to store and backup RAID check data in all storage pages of a certain flash particle on the same word line. Table 5 gives a data example of the DIE RAID mode.
[0064] Table 5
[0065] On the basis of the above-mentioned embodiments, the embodiments of the present disclosure also propose some special RAID modes. The design concept of the special RAID mode is to improve the RAID error correction capability by the specific organization and distribution of RAID under the condition of avoiding excessive increase of additional space occupation. Accordingly, the application of the special RAID mode needs to meet certain conditions, for example, if the number of word lines in a super block in poor and very poor states exceeds a set threshold, a certain special RAID mode is applied to the super block, or if the word lines in a super block in poor and very poor states are concentrated in a certain area, the special RAID mode can also be applied only to the area. For another example, a special RAID is to form a RAID by physical pages located in different planes every interval of a certain number of word lines and / or every interval of a certain number of physical pages of the same word line, wherein the number of interval word lines and the number of interval physical pages can be configured and can be obtained through the following experiment: write and read data to each word line to test the interference range of read and write, and determine the two values based on the interference range, for example, if the read and write of word line 1 affects word lines 2 and 3, the interval word lines can be set to 2, if word line 1 connects page 0 to page 4, and the read and write of page 0 affects page 1, the interval physical page number is set to 1.
[0066] Figure 6is an example of this special RAID mode. In this example, the spaced word lines are one word line, and the spaced physical page number is also 1. As shown in the figure, there are four flash memory dies, die0-die3, each having four planes, plane0-plane3. The physical pages of the same color in the figure are a RAID, i.e., the data of page0 of die0 plane0, page0 of die1 plane0, page0 of die2 plane0, page0 of die3 plane0, page2 of die0 plane0, page2 of die1 plane0, page2 of die2 plane0, and page2 of die3 plane0 generate RAID check data through XOR operation, and the final XOR data is stored in page2 of die3 plane0. In the mode of a normal BLOCK RAID, if the data on die0 page0 has errors in all four planes, the data on page0 cannot be recovered through RAID, but in the current RAID mode, the data on die0 page0 can still be recovered through RAID after errors occur in all four planes. Thus, through this special RAID mode, the protection capability of the corresponding RAID level is achieved with less additional space.
[0067] In practice, before being shipped, flash memory die products will be subjected to reliability tests to screen out bad blocks that meet the shipping standards, so the word line state table can be recorded according to the reliability test results at the same time. After the products are shipped, the word line state table can also be updated according to the regular inspection of the flash memory die, and the latest word line state is ensured to determine the RAID mode.
[0068] Correspondingly, the embodiment of the disclosure also provides a computer readable storage medium, which stores one or more computer instructions, and the one or more computer instructions implement the following steps when executed: reading data from the physical pages connected to each word line in a super block, and determining the state of each word line and the RAID mode in the super block according to the amount of error data corresponding to each word line; when writing data to each word line of the super block, writing the to-be-written data and the RAID check data generated according to the to-be-written data to the physical pages connected to each word line according to the RAID mode.
[0069] Correspondingly, the disclosure also provides a computing device, comprising a processor and a memory, the memory stores one or more computer instructions capable of being executed by the processor, the one or more computer instructions are executed to implement the following steps: reading data from the physical page connected to each word line in the super block, and determining the state of each word line and the RAID mode in the super block according to the amount of error data corresponding to each word line; when writing data to each word line of the super block, according to the RAID mode, write the to-be-written data and the RAID check data generated according to the to-be-written data to the physical page connected to each word line.
[0070] The above description is only the preferred embodiments of the disclosure, and is not intended to limit the disclosure. For those skilled in the art, the disclosure can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the disclosure shall be included in the protection scope of the disclosure.
[0071] According to the above description of the embodiments of the disclosure, these embodiments do not describe all the details, and the invention is not limited to the specific embodiments described. Obviously, many modifications and changes can be made according to the above description. This specification selects and describes these embodiments in order to better explain the principles and practical applications of the disclosure, so that those skilled in the art can well utilize the disclosure and make modifications and use on the basis of the disclosure. The disclosure is limited by the claims and their entire scope and equivalents.
Claims
1. A method for writing a super block of a solid state disk, the solid state disk comprising a storage medium and a controller, the storage medium consisting of at least one flash memory chip, the flash memory chip comprising a plurality of planes, each plane comprising a plurality of physical blocks, each physical block comprising a plurality of word lines and a plurality of physical pages connected to each word line, and all physical blocks of a same row of all planes forming a super block, each word line in all physical blocks of a same row extending in a row direction and being connected together, the method comprising: reading data from each physical page connected to each word line in the super block, and determining a state of each word line and a RAID mode of the super block according to an amount of error data corresponding to each word line; and when writing data to each word line in the super block, writing to-be-written data and RAID check data generated according to the to-be-written data to each physical page connected to each word line according to the RAID mode. The determining of the state of each word line and the RAID mode of the super block according to the amount of error data corresponding to each word line comprises: determining whether the amount of error data corresponding to each word line is less than or equal to a first threshold value, and if so, recording in a word line state table that the state of each word line is normal and no RAID is needed; determining whether the amount of error data is less than or equal to a second threshold value, and if so, recording in the word line state table that the state of each word line is poor and a first RAID is needed; and if the amount of error data is greater than the second threshold value, recording in the word line state table that the state of each word line is very poor and a second RAID is needed, the second RAID being greater in space for storing and backing up RAID check data than the first RAID. The second RAID is to use one physical page of one storage block on a specific plane on the word line to store and back up RAID check data, and the first RAID is to use one or more layers of basic storage units in one physical page of one plane on the word line to store and back up RAID check data.
2. The super block write method of claim 1, wherein, The to-be-written data comprises host data and ECC encoding data obtained by an ECC encoding circuit according to the host data. The determining of the state of each word line and the RAID mode of the super block according to the amount of error data corresponding to each word line further comprises: determining whether a number of word lines whose states are poor or very poor in the super block exceeds a set threshold value, and if so, applying a special RAID mode to the super block. The special RAID mode is to form a RAID by using physical pages on a same plane of different flash memory chips in each interval of a certain number of physical pages connected to a same word line, and / or in each interval of a certain number of physical pages connected to all word lines. The states of the word lines and the RAID modes in the super block are recorded in a word line state table, and the word line state table is updated through pre-shipment reliability tests and regular inspections after shipment.
3. The super block write method of claim 2, wherein, In the super block, storage positions of RAID check data on each word line are offset according to a set value.
4. The super block write method of claim 1, wherein, 5. The super block write method of claim 2, wherein, 6. The super block write method of claim 5, wherein, 7. The super block write method of claim 1, wherein, 8. The superblock write method of claim 1, wherein, 9. A computer readable storage medium storing one or more computer instructions, which when executed, implement the superblock writing method according to any one of claims 1 to 8.
10. A computing device comprising a memory and a processor, the memory storing one or more computer instructions, which when executed by the processor, implement the superblock writing method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Reliability test method for flash memory particles, readable storage medium and computing equipment
CN120164511A
Storage device raid data write intermediate parity system
US20230325278A1
Flash memory controller, operating method of flash memory controller, and storage device capable of performing different dimension error correction to protect data
US20250077085A1
Data storage method, apparatus, storage device, and computer-readable storage medium
US20250165170A1
Systems, methods, and devices for multi-dimensional flash RAID data protection
US9003264B1