Method, device, equipment and medium for reducing flash memory read disturbance in solid state hard disk
By filtering hot data and managing read counts at the wordline level, cold data is moved to spare storage blocks, solving the problem of frequent data movement caused by read interference on solid-state drives, extending their service life and optimizing performance.
Patent Information
- Application Number
- CN202210963639.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-11
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2042-08-11
AI Technical Summary
The read disturb management algorithm of existing solid-state drives leads to frequent data movement, increased write amplification, shortened service life and reduced performance, especially in scenarios such as abnormal power outages, which may lead to data loss.
The storage blocks with hot read data are filtered out in units of storage blocks and placed in a read interference storage pool for management. The read count is further recorded in units of wordlines. When the read count exceeds the threshold, the cold read data is moved to the spare storage blocks, retaining the hot read data and reducing the impact of read interference.
It reduces frequent data movement, lowers write amplification, extends the service life of the solid-state drive, maintains overall performance optimization, and avoids data loss.
Smart Images

Figure CN115437562B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of solid-state hard disks, and in particular to a method, apparatus, device and medium for reducing read disturbance of flash memory in a solid-state hard disk. Background Art
[0002] A solid-state drive (SSD) consists of a main control unit and a solid-state storage unit, which contains multiple storage blocks (or data blocks). Because SSDs lack a rewrite mechanism, after a block is fully written, the data in the block must be erased before new data can be written. This erase operation is very time-consuming. For efficiency reasons, when a user writes to the same logical address, the SSD actually writes to a different physical address. This results in invalid data at the original storage address, necessitating garbage collection to improve space utilization.
[0003] The page read operation of a solid-state drive will interfere with other pages in the same block. With the improvement of Flash process, the number of pages in a physical block increases, and a single cell (storage unit) stores more information (such as TLC and QLC), this problem will become more prominent. In severe cases, it will cause errors in the read data and lead to data loss.
[0004] To solve the problem of read interference, the existing solution is to maintain a read count table for each block. Before the read count reaches the threshold, all data on the block is moved away. When the data is written to a new block, the read count table will be cleared to 0. This will cause the disk's WA (Write Amplification, which is the ratio of the amount of data written to the flash memory to the amount of data written by the user) to increase. In some specific usage scenarios, the obvious disadvantage of this solution is that the disk will constantly move data, accelerating the aging of the disk and causing a significant reduction in the disk's service life. When performing a read interference management algorithm, frequent data movement will occupy the disk's resources and the underlying flash bandwidth, resulting in a decrease in read and write performance. Jams may occur during use, and even data loss may occur in scenarios such as abnormal power outages. Summary of the Invention
[0005] The purpose of the present invention is to overcome the deficiencies of the above-mentioned background technology and provide a method for reducing read disturbance of flash memory in a solid state drive.
[0006] In a first aspect, a method for reducing read disturbance of flash memory in a solid-state drive is provided, comprising:
[0007] Step 1: Record the number of reads in units of storage blocks. Filter out storage blocks containing hot read data from the host's continuous data reading process, and place the storage blocks containing hot read data into a read interference storage pool for management.
[0008] Step 2: Record the number of reads of the memory blocks in the read interference memory pool in units of wordlines. When the number of reads of a wordline in a memory block exceeds a preset threshold, move the other wordlines in the memory block to another preset spare memory block.
[0009] Furthermore, the step 1 includes:
[0010] Taking the storage block of the solid-state drive as the unit, the first read count a of each storage block is stored and updated, and a first read count threshold A is given to each storage block; when the first read count a of a storage block exceeds its corresponding first read count threshold A, the storage block is placed in the read interference storage pool for management.
[0011] Furthermore, the step 2 includes:
[0012] The memory blocks in the read interference memory pool are stored and updated in units of wordlines, and each wordline is given a second read count threshold B. When the second read count b of a wordline in the memory block exceeds its corresponding second read count threshold B, the other wordlines in the memory block are moved to another preset spare memory block.
[0013] Furthermore, the first read count threshold A is formulated based on characteristics of the flash memory and experimental data.
[0014] In a second aspect, a device for reducing read disturbance of flash memory in a solid-state drive is provided, comprising:
[0015] The screening module is used to record the number of reads in units of storage blocks, and to screen out storage blocks containing hot read data from the host's continuous reading of data;
[0016] A read interference storage pool, configured to store storage blocks containing read hot data filtered by the screening module;
[0017] a determination module, configured to record the number of reads of a memory block in the read interference memory pool in units of wordlines, and compare the number of reads of each wordline in the memory block with a preset threshold to determine whether the number of reads of the wordline exceeds the preset threshold;
[0018] The data migration module is used to migrate other wordlines in a storage block to another preset spare storage block when the number of reads of a wordline in the storage block exceeds a preset threshold.
[0019] Furthermore, the screening module includes:
[0020] A first comparison unit is configured to store and update a first read count a of each storage block in units of storage blocks of the solid-state drive, and compare the first read count a with a given first read count threshold A;
[0021] The first screening unit is configured to screen out storage blocks whose first read count a exceeds the first read count threshold A, and put the storage blocks into a read interference storage pool for management as storage blocks containing read hot data.
[0022] Furthermore, the judgment module includes:
[0023] The second comparison unit is configured to store and update, in wordline units, a second read count b of each wordline of the storage block in the read interference storage pool, and compare the second read count b with a given second read count threshold B.
[0024] Furthermore, there are one or more spare storage blocks.
[0025] In a third aspect, the present invention provides a device for reducing read disturbance of flash memory in a solid-state drive, comprising:
[0026] memory for storing computer programs;
[0027] A processor is used to implement the steps of the method described in any of the above technical solutions when executing the computer program.
[0028] In a fourth aspect, the present invention proposes a readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method described in any of the above technical solutions are implemented.
[0029] Compared with the prior art, the advantages of the present invention are as follows:
[0030] By filtering out storage blocks containing hot data and placing them into a read interference storage pool, the number of wordline reads is recorded, and cold data is moved from these blocks while retaining the hot data. This reduces the read interference caused by frequent host reads of hot data on other wordlines (cold data) in the storage blocks. This new management strategy reduces frequent data movement throughout the drive's lifecycle, reduces write amplification, and extends the drive's lifespan. Overall, the SSD maintains the best available performance throughout its lifecycle, achieving optimal overall performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 This is a schematic diagram of the MLC threshold voltage distribution.
[0032] Figure 2 This is a schematic diagram of the flash internal data read voltage.
[0033] Figure 3 This is a schematic diagram of the change in NAND read interference threshold voltage.
[0034] Figure 4 It is a schematic diagram of the data migration process between storage blocks of the present invention.
[0035] Figure 5 It is a flow chart of the read disturbance algorithm of the present invention. DETAILED DESCRIPTION
[0036] Reference will now be made in detail to specific embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Although the present invention will be described in conjunction with specific embodiments, it will be understood that the present invention is not intended to be limited to those embodiments. On the contrary, it is intended to cover variations, modifications, and equivalents within the spirit and scope of the present invention as defined by the appended claims. It should be noted that the method steps described herein can be implemented by any functional block or functional arrangement, and any functional block or functional arrangement can be implemented as a physical entity or a logical entity, or a combination of the two.
[0037] In order to enable those skilled in the art to better understand the present invention, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0038] Note: The following example is only a specific example and is not intended to limit the embodiments of the present invention to the following specific steps, values, conditions, data, sequence, etc. Those skilled in the art can apply the concepts of the present invention to construct more embodiments not described in this specification by reading this specification.
[0039] First, the relevant abbreviations or term definitions are explained:
[0040] NAND: A non-volatile storage medium, also known as NAND flash memory chip (NAND Flash).
[0041] SSD: Solid State Drive, a data storage device composed of several NAND Flash arrays.
[0042] Page: Storage page, the basic unit for NAND Flash to perform read and write operations.
[0043] Block: A storage block, which is composed of multiple pages and is the basic unit for NAND Flash to perform erase operations.
[0044] FTL: Flash Translation Layer, NAND Flash management algorithm.
[0045] PEC: Program Erase Count, that is, the number of times the block is erased.
[0046] SLC: Single Level Cell, the smallest storage unit (cell) can only store 1 bit of NAND Flash.
[0047] MLC: Multiple Level Cell, the minimum storage unit (cell) can store 2 bits of NAND Flash.
[0048] TLC: Triple Level Cell, the smallest storage unit (cell) can store 3 bits of NAND Flash.
[0049] Ecc error: A BCH / LDPC decoding error occurred in the controller.
[0050] WA: Write Amplification, which is the ratio of the amount of data written to the flash memory to the amount of data written by the user.
[0051] The data storage on an SSD is implemented using Nand Flash. Nand Flash functions as non-volatile memory because of its charge retention capability. However, as Nand Flash ages and wears out, this charge retention capability gradually weakens, increasing the probability of ECC errors.
[0052] Take MLC as an example. Each memory cell in an MLC stores two bits of data, for a total of four states. These four states are distinguished by injecting different amounts of charge into the floating gate of the memory cell.
[0053] To turn on the transistor, we need to apply a control voltage greater than the transistor threshold voltage to the control electrode. For floating gate transistors, injecting different numbers of electrons into the floating gate will change the transistor threshold voltage. Since different states have different threshold voltages, we can determine the current storage cell data by applying different reference voltages to the control electrode. Figure 1For example, the low bit represents the lower page data, and the high bit represents the upper page data. To read the upper page data, to distinguish between 0 and 1, we need to apply a reference voltage V2 to the control gate: if the transistor is on, it indicates a 1, otherwise it is a 0. To read the lower page data, to distinguish between 0 and 1, we need to apply a reference voltage V1 to the control gate. If the transistor is on, the data is 1. If it is off, there is no way to distinguish between 0 and 1, because the threshold voltages of 10, 01, and 00 are all greater than V1. We need to change the control gate reference voltage to V2 and observe the transistor's on-state. If the transistor is on, the data is 0. If the transistor is off, we still cannot determine whether the data is 0 or 1, because the threshold voltages of both the 01 and 00 states are greater than V2. At this point, we need to change the control gate voltage again to V3. Now, if the transistor is on, the data is 1, and if it is off, the data is 0. From this we can see that reading the lower page requires multiple reference voltage attempts to obtain the final data, while reading the upper page only requires one attempt. Therefore, for MLC, the time required to read the lower page and the upper page is different.
[0054] like Figure 2 The figure shows the voltage diagram for reading data inside the flash.
[0055] If we want to read a certain page in a block, we need to add a Vpass voltage to the control electrodes of all other wordlines to ensure that all other transistors are turned on; for the page being read, we need to add a reference voltage Vread to the control electrode of the wordline where it is located. During the read operation, the voltage applied to the substrate is 0, and the voltage on the control electrode of the page being read is Vread, while for other pages, the voltage applied to the control electrode is Vpass. Since a Vpass is added to other pages, which is a relatively large voltage, a strong electric field will be formed between the floating gate and the substrate, which will attract some electrons into the floating gate, which will cause a slight program to the wordline of Vpass. As the page data on the block is read more and more times, the floating gate electrons in the wordline will also accumulate, causing the data state to change, which means that an ECC error occurs in the data. This is read interference. In short, reading a page on the same block will affect the data on other wordlines.
[0056] like Figure 3 As shown, read disturbance can cause electrons to enter the floating gate, causing the transistor threshold voltage to shift to the right.
[0057] Since the threshold voltage of the transistor has changed, if the internal logic of the flash memory still applies the previous reference voltage to the control electrode and then judges the data, misjudgment will definitely occur, that is, wrong data will be read.
[0058] The extent to which read disturb affects data depends mainly on two factors. The first is related to the number of times the data on the block is read. The more data is read, the more it is shifted to the right and the greater the impact. The second is related to the block PEC. The larger the PEC, the worse the insulation effect, the easier it is for electrons to enter the floating gate, and the greater the impact of read disturb.
[0059] To address the read disturb problem, existing solutions maintain a read count table for each block, recording how many times the block has been read. When the read count reaches a threshold, all data on the block is removed. When data is written to a new block, the read count table is cleared to 0.
[0060] In some specific use cases, this solution has the obvious disadvantage of constantly moving data around on the disk, increasing write amplification. Smaller WA means less wear on the flash memory, extending its lifespan and supporting more user data writes.
[0061] Therefore, the problems existing in the prior art are:
[0062] The existing SSD read disturbance management algorithm is that when the FTL detects that the number of reads in a block exceeds a set threshold, it will move all valid data on the block to a new block, which will cause the disk's WA to increase.
[0063] In some specific usage scenarios, the read interference algorithm will frequently move data, accelerating the aging of the disk and significantly reducing the service life of the disk.
[0064] When implementing a read interference management algorithm, frequent data movement will occupy disk resources and the underlying flash bandwidth, resulting in decreased read and write performance. Jams may occur during use, and data loss may even occur in scenarios such as abnormal power outages.
[0065] We know that when SSD users use it, there is a certain amount of hot data and cold data. Cold data is data that users do not frequently access or update, such as operating system data written to the SSD, read-only file data, and movies. In contrast, hot data is data that users frequently access or update.
[0066] As an example to solve the above technical problems, this embodiment proposes a method for reducing read disturbance of flash memory in a solid state drive. Figure 5 As shown, the method includes:
[0067] Step 1: Record the number of reads in units of storage blocks. When the host continuously reads data, filter out storage blocks containing hot read data and put the storage blocks containing hot read data into a read interference storage pool for management.
[0068] Step 2: Record the number of reads of the memory blocks in the read interference memory pool in units of wordlines. When the number of reads of a wordline in a memory block exceeds a preset threshold, move the other wordlines in the memory block to another preset spare memory block.
[0069] The step 1 comprises:
[0070] Taking the storage block of the solid-state drive as the unit, the first read count a of each storage block is stored and updated, and a first read count threshold A is given to each storage block; when the first read count a of a storage block exceeds its corresponding first read count threshold A, the storage block is placed in the read interference storage pool for management. The first read count threshold A is formulated based on the characteristics of the flash memory and experimental data. The first read count threshold A is Figure 5 The threshold value is 2.
[0071] The step 2 includes:
[0072] The memory blocks in the read interference memory pool are stored and updated with wordline as the unit, and each wordline is given a second read count threshold B; when the second read count b of a wordline in the memory block exceeds its corresponding second read count threshold B, the other wordlines in the memory block are moved to another preset spare memory block. The second read count threshold B is the attached Figure 5 The threshold value is 1.
[0073] Figure 5 This is the flow chart of the read disturbance algorithm of the present invention, from Figure 5 As can be seen, when read disturb detection begins, it first determines whether the storage block is in the read disturb storage pool. If not, the block read count table is updated to determine whether the read count is greater than a threshold of 2. If so, the block is placed in the read disturb storage pool. If not, the read disturb detection ends and the next read disturb detection can be performed. If the storage block is in the read disturb storage pool, the wordline read count table of the storage block is updated to determine whether the read count is greater than a threshold of 1. If so, the block's valid data is moved (reading cold data), and the read disturb detection ends. If not, the read disturb detection ends directly.
[0074] like Figure 4As shown, the read hot data in blockA in the read interference storage pool is retained, and all the read cold data in blockA is moved to blockB (ie, a spare storage block).
[0075] Since the corresponding cold data is moved to block B, after the move is completed, continuing to read the hot data in block A will affect other pages. However, since there is no valid data on the affected pages in block A, there is no need to further move the data. At the same time, there is no read interference on block B.
[0076] This invention addresses the shortcomings of existing designs and addresses the impact of increased SSD write amplification caused by frequent data transfer. Through design improvements, the following beneficial effects are achieved:
[0077] 1. Filter a certain number of blocks and place them in the read interference storage pool. Record the number of wordline reads in these blocks to move cold data and retain hot data, thereby reducing the impact of frequent host reads on other wordlines of the blocks and causing read interference.
[0078] 2. New management strategies are applied to reduce frequent data movement during the disk lifecycle, reduce write amplification, and extend the disk's service life;
[0079] 3. Overall, the SSD's performance is at its best throughout its lifecycle, achieving optimal overall performance.
[0080] Based on the same inventive concept, the present invention also proposes a device for reducing read disturbance of flash memory in a solid-state drive, comprising:
[0081] The screening module is used to record the number of reads in units of storage blocks, and to screen out storage blocks containing hot read data from the host's continuous reading of data;
[0082] A read interference storage pool, configured to store storage blocks containing read hot data filtered by the screening module;
[0083] a determination module, configured to record the number of reads of a memory block in the read interference memory pool in units of wordlines, and compare the number of reads of each wordline in the memory block with a preset threshold to determine whether the number of reads of the wordline exceeds the preset threshold;
[0084] The data migration module is used to migrate other wordlines in a storage block to another preset spare storage block when the number of reads of a wordline in the storage block exceeds a preset threshold.
[0085] Wherein, the screening module includes:
[0086] A first comparison unit is configured to store and update a first read count a of each storage block in units of storage blocks of the solid-state drive, and compare the first read count a with a given first read count threshold A;
[0087] The first screening unit is configured to screen out storage blocks whose first read count a exceeds the first read count threshold A, and put the storage blocks into a read interference storage pool for management as storage blocks containing read hot data.
[0088] The judgment module includes:
[0089] The second comparison unit is configured to store and update, in wordline units, a second read count b of each wordline of the storage block in the read interference storage pool, and compare the second read count b with a given second read count threshold B.
[0090] There are one or more spare storage blocks, and the spare storage blocks can be randomly assigned.
[0091] Based on the same inventive concept, the present invention also proposes a device for reducing read disturbance of flash memory in a solid-state drive, comprising:
[0092] memory for storing computer programs;
[0093] A processor is configured to implement the steps of the above method when executing the computer program.
[0094] Based on the same inventive concept, the present invention proposes a readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.
[0095] In the description of the present invention, it should be noted that the orientation or positional relationship indicated by the terms "upper" and "lower" is based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. Unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be internal communication between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances.
[0096] It should be noted that, in the present invention, relational terms such as "first" and "second" are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0097] The foregoing description is intended only to provide specific embodiments of the present invention, which will enable those skilled in the art to understand and implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown herein, but is to be construed in the widest possible manner consistent with the principles and novel features disclosed herein.
Claims
1. A method for reducing read disturbance of flash memory in a solid state drive, characterized in that: include: Step 1: Record the number of reads in units of storage blocks. Filter out storage blocks containing hot read data from the host's continuous data reading process, and place the storage blocks containing hot read data into a read interference storage pool for management. Step 2: Record the number of reads of a memory block in the read interference memory pool in units of wordlines. When the number of reads of a wordline in a memory block exceeds a preset threshold, move the other wordlines in the memory block to another preset spare memory block. The step 1 comprises: Taking the storage block of the solid-state drive as the unit, the first read count a of each storage block is stored and updated, and a first read count threshold A is given to each storage block; when the first read count a of a storage block exceeds its corresponding first read count threshold A, the storage block is placed in the read interference storage pool for management; The moving other wordlines in the storage block to another preset spare storage block includes: retaining the read hot data in the storage block and moving the read cold data to another preset spare storage block.
2. The method for reducing read disturbance of flash memory in a solid state drive according to claim 1, wherein: The step 2 includes: The memory blocks in the read interference memory pool are stored and updated in units of wordlines, and each wordline is given a second read count threshold B. When the second read count b of a wordline in the memory block exceeds its corresponding second read count threshold B, the other wordlines in the memory block are moved to another preset spare memory block.
3. The method for reducing read disturbance of flash memory in a solid state drive according to claim 2, wherein: The first read count threshold A is formulated based on the characteristics of the flash memory and experimental data.
4. A device for reducing read disturbance of flash memory in a solid state drive, characterized in that: include: The screening module is used to record the number of reads in units of storage blocks, and to screen out storage blocks containing hot read data from the host's continuous reading of data; A read interference storage pool, configured to store storage blocks containing read hot data filtered by the screening module; a determination module, configured to record the number of reads of a memory block in the read interference memory pool in units of wordlines, and compare the number of reads of each wordline in the memory block with a preset threshold to determine whether the number of reads of the wordline exceeds the preset threshold; A data migration module is used to migrate other wordlines in a storage block to another preset spare storage block when the number of reads of a wordline in the storage block exceeds a preset threshold; The screening module includes: A first comparison unit is configured to store and update a first read count a of each storage block in units of storage blocks of the solid-state drive, and compare the first read count a with a given first read count threshold A; a first screening unit, configured to screen out storage blocks whose first read count a exceeds the first read count threshold A, and place the storage blocks into a read interference storage pool for management as storage blocks containing read hot data; The moving other wordlines in the storage block to another preset spare storage block includes: retaining the read hot data in the storage block and moving the read cold data to another preset spare storage block.
5. The device for reducing read disturbance of flash memory in a solid state drive according to claim 4, wherein: The judgment module includes: The second comparison unit is configured to store and update, in wordline units, a second read count b of each wordline of the storage block in the read interference storage pool, and compare the second read count b with a given second read count threshold B.
6. The device for reducing read disturbance of flash memory in a solid state drive according to claim 5, wherein: There are one or more spare storage blocks.
7. A device for reducing read disturbance of flash memory in a solid state drive, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the method according to any one of claims 1 to 3 when executing the computer program.
8. A readable storage medium, characterized in that: The readable storage medium stores a computer program, which implements the steps of the method according to any one of claims 1 to 3 when executed by a processor.
Citation Information
Patent Citations
Detection of read disturbances on non-volatile memories through counting of read accesses within divisions of the memory
CN105874541A
Method and device for screening cold data, computer equipment and storage medium
CN108920107A