Data migration method, related device and medium

CN121635785BActive Publication Date: 2026-10-30MAXIO TECHNOLOGY (HANGZHOU) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411214745.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2026-10-30
Estimated Expiration
2044-08-30

AI Technical Summary

Technical Problem

然而直接从数据缓存区读数据的读操作不会产生读干扰,从存储阵列读数据的读操作才会产生读干扰

Benefits of technology

[0040]本公开提供的数据搬移方法,针对对目标存储器中目标存储块中存储数据的读操作,确定读操作从目标存储器的存储阵列读数据,还是直接从目标存储器的数据缓存区读数据,在读操作从目标存储器的存储阵列读数据的情况下,将目标存储器中目标存储块的读次数计数值加一,在至少一个存储器中一存储器的一存储块的读次数计数值大于第一预设读次数阈值时,将至少一个存储器中与该存储块具有相同块编号的存储块中的有效数据均搬移至其他存储块,这样,仅针对对存储器中存储阵列执行的读操作进行读次数计数,提高了存储器中存储块的读次数计数值的准确性,进而使得对应存储块中的有效数据不会被提前搬移,降低了存储器的PE损耗,提高了存储器的使用寿命。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121635785B_ABST
    Figure CN121635785B_ABST
Patent Text Reader

Abstract

The present disclosure provides a data migration method, related device and medium. The method comprises: for a read operation on data stored in a target storage block in a target memory, determining whether the read operation reads data from a storage array of the target memory or directly reads data from a data cache area of the target memory; in the case where the read operation reads data from the storage array of the target memory, adding one to a read count value of the target storage block in the target memory; and when the read count value of a storage block of a memory in at least one memory is greater than a first preset read count threshold, migrating valid data in a storage block having the same block number as the storage block to other storage blocks. This improves the accuracy of the read count value of the storage block in the memory, thereby preventing the valid data in the corresponding storage block from being migrated too early, reducing the PE loss of the memory, and improving the service life of the memory.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure belongs to the field of memory technology, and specifically relates to a data transfer method, related apparatus and medium. Background Technology

[0002] A solid-state drive (SSD) is a hard drive made with solid-state electronic storage chips, mainly composed of a controller and memory (e.g., NAND flash memory chips). The memory includes a storage array and a data cache. The host accesses the stored data in the memory by sending read commands. Currently, when the host reads data from a corresponding storage block in the memory, the read count of the corresponding storage block is incremented by one for each read operation. When the read count of a storage block exceeds a read count threshold, it is considered that it may cause read disturbance to data operations on other pages within the same storage block. In this case, the valid data in the storage block needs to be moved to another storage block to reduce read disturbance.

[0003] During the process of reading data from memory, a typical read operation involves first reading the data from the memory array into the data buffer, and then reading the data from the data buffer. When two consecutive reads are made of the same address in memory, the first read operation reads the data from the memory array into the data buffer, and then reads the data from the data buffer. The second read operation, however, reads the data directly from the data buffer. However, reads directly from the data buffer do not cause read interference; only reads from the memory array do. Clearly, the current method of counting reads in memory blocks includes the second read operation, which does not cause read interference, in the count. This causes valid data in the corresponding memory block to be moved prematurely, increasing the program / erase (PE) wear of the memory and reducing its lifespan. Summary of the Invention

[0004] In view of the above problems, this disclosure provides a data transfer method, related apparatus and medium, which aims to count the number of reads only for read operations performed on the storage array in the memory, so as to improve the accuracy of the read count value of the storage block in the memory, thereby preventing the valid data in the corresponding storage block from being moved prematurely, reducing the PE wear of the memory and improving the service life of the memory.

[0005] According to a first aspect of this disclosure, a data transfer method for a solid-state drive is provided, the solid-state drive including at least one memory, the memory including at least one storage block, the data transfer method comprising:

[0006] For a read operation on data stored in a target memory block, determine whether the read operation reads data from the storage array of the target memory or directly from the data buffer of the target memory;

[0007] When the read operation reads data from the storage array of the target memory, the read count value of the target storage block in the target memory is incremented by one;

[0008] When the read count value of a storage block in one of the at least one memory is greater than a first preset read count threshold, all valid data in the storage blocks with the same block number as the storage block in the at least one memory are moved to other storage blocks.

[0009] Optionally, before determining whether a read operation on data stored in a target memory block in the target memory reads data from the storage array of the target memory or directly from the data buffer of the target memory, the data relocation method further includes:

[0010] Obtain a read command for data stored in a target memory block in the target memory, the read command including a first read command and a second read command;

[0011] The first read command is used to read data from the storage array of the target memory into the data buffer of the target memory, and then read the data from the data buffer; the second read command is used to read data directly from the data buffer of the target memory.

[0012] Optionally, the solid-state drive further includes a read count cache, which comprises at least one read count cache unit. Each read count cache unit corresponds one-to-one with the at least one memory, and each read count cache unit stores read count values ​​for memory blocks with the same block number located in different memories.

[0013] In the case where the read operation reads data from the storage array of the target memory, incrementing the read count value of the target storage block in the target memory includes:

[0014] When the read operation reads data from the storage array of the target memory, the read count value of the target storage block stored in the target read count cache unit corresponding to the target memory is incremented by one.

[0015] Optionally, the memory includes at least one storage plane, and the solid-state drive further includes a read count cache, which includes at least one read count cache unit. The at least one read count cache unit corresponds one-to-one with all storage planes in the at least one memory, and stores the read count values ​​of storage blocks with the same block number located in different storage planes within different memories.

[0016] In the case where the read operation reads data from the storage array of the target memory, incrementing the read count value of the target storage block in the target memory includes:

[0017] For a read operation on data stored in a target storage block in a target storage plane of the target memory, when the read operation reads data from the storage array of the target memory, the read count value of the target storage block stored in the target read count cache unit corresponding to the target storage plane of the target memory is incremented by one.

[0018] Optionally, the solid-state drive further includes a read count storage area, which includes at least one read count storage cell. Each read count storage cell corresponds one-to-one with at least one storage block in the memory. The at least one read count storage cell stores the read count value of the corresponding storage block in the memory.

[0019] In the case where the read operation reads data from the storage array of the target memory, after incrementing the read count value of the target storage block in the target memory by one, the data transfer method further includes:

[0020] If the read count value of the target storage block stored in the target read count cache unit is greater than the second preset read count threshold, then the maximum read count value among the read count values ​​stored in at least one read count cache unit is stored in the target read count storage unit corresponding to the target storage block, and the at least one read count cache unit is cleared; or

[0021] If the next read operation of the read operation indicates that a read operation should be performed on a memory block other than the target memory block in a memory, then the maximum read count value among the read count values ​​stored in the at least one read count cache unit is stored in the target read count cache unit corresponding to the target memory block, and the at least one read count cache unit is cleared.

[0022] Optionally, the solid-state drive further includes a read count storage area, which includes at least one read count storage cell. Each read count storage cell corresponds one-to-one with at least one storage block in at least one storage plane of the memory. The at least one read count storage cell stores the read count value of the corresponding storage block located in the corresponding storage plane of the memory.

[0023] In the case where the read operation reads data from the storage array of the target memory, after incrementing the read count value of the target storage block in the target memory by one, the data transfer method further includes:

[0024] If the read count value of the target storage block in the target storage plane of the target memory stored in the target read count cache unit is greater than the second preset read count threshold, then the maximum read count value among the read count values ​​stored in at least one read count cache unit is stored in the target read count storage unit corresponding to the target storage block in the target storage plane, and the at least one read count cache unit is cleared; or

[0025] If the next read operation of the read operation indicates that a read operation should be performed on a memory block other than the target memory block in a memory storage plane, then the maximum read count value among the read count values ​​stored in the at least one read count cache unit is stored in the target read count cache unit corresponding to the target memory block in the target storage plane, and the at least one read count cache unit is cleared.

[0026] Optionally, when the read count value of a storage block in one of the at least one memory is greater than a first preset read count threshold, moving all valid data in storage blocks with the same block number as the storage block in the at least one memory to other storage blocks includes:

[0027] When the read count value of a storage block stored in at least one read count storage unit is greater than the first preset read count threshold, all valid data in the at least one memory storage block with the same storage plane number and the same block number as the storage block are moved to other storage blocks.

[0028] Optionally, when the read count value of a storage block in one of the at least one memory is greater than a first preset read count threshold, after all valid data in storage blocks with the same block number as the storage block in the at least one memory is moved to other storage blocks, the data moving method further includes:

[0029] When the read count value of a storage block stored in the at least one read count storage unit is greater than a third preset read count threshold, the number of read commands received by the solid-state drive per unit time is reduced, wherein the third preset read count threshold is greater than or equal to the first preset read count threshold.

[0030] Optionally, the larger the third preset read count threshold, the smaller the number of read commands received by the solid-state drive per unit time.

[0031] According to a second aspect of this disclosure, a data transfer apparatus for a solid-state drive is provided, the solid-state drive including at least one memory, the memory including at least one storage block, the data transfer apparatus comprising:

[0032] The read operation data source determination unit is used to determine, for a read operation on data stored in a target storage block in the target memory, whether the read operation reads data from the storage array of the target memory or directly reads data from the data buffer of the target memory;

[0033] A read count unit is used to increment the read count value of the target memory block in the target memory by one when the read operation reads data from the storage array of the target memory;

[0034] A data transfer unit is used to transfer all valid data in storage blocks with the same block number as the storage block in the at least one memory to other storage blocks when the read count value of a storage block in one of the at least one memory is greater than a first preset read count threshold.

[0035] According to a third aspect of this disclosure, a solid-state drive is provided, comprising:

[0036] At least one memory;

[0037] The controller includes the data transfer device described above, which is used to execute the method described above to transfer all valid data in the at least one memory that has the same block number as the storage block to other storage blocks when the read count value of a storage block in a memory is greater than a first preset read count threshold.

[0038] According to a fourth aspect of this disclosure, a storage medium is provided that stores a computer program or instructions, which, when executed by a processor, implement the steps of the method described above.

[0039] This disclosure brings the following beneficial effects:

[0040] The data migration method provided in this disclosure, for read operations on data stored in a target storage block in a target memory, determines whether the read operation reads data from the storage array of the target memory or directly from the data buffer of the target memory. If the read operation reads data from the storage array of the target memory, the read count value of the target storage block in the target memory is incremented by one. When the read count value of a storage block in at least one memory is greater than a first preset read count threshold, all valid data in storage blocks with the same block number as the storage block in at least one memory are migrated to other storage blocks. In this way, the read count is only performed on read operations performed on the storage array in the memory, which improves the accuracy of the read count value of the storage blocks in the memory, thereby preventing the valid data in the corresponding storage blocks from being migrated prematurely, reducing the PE wear of the memory, and improving the service life of the memory.

[0041] Other features and advantages of this disclosure will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the disclosure. The objects and other advantages of this disclosure are realized and obtained through the structures particularly pointed out in the description and the drawings.

[0042] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0043] The above and other objects, features and advantages of this disclosure will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:

[0044] Figure 1 This diagram illustrates the structure of a computer system according to an embodiment of the present disclosure;

[0045] Figure 2 A schematic flowchart of a data transfer method for a solid-state drive according to an embodiment of the present disclosure is shown.

[0046] Figure 3 This diagram illustrates the structure of a read count buffer and a read count storage area according to an embodiment of the present disclosure.

[0047] Figure 4 This diagram illustrates the structure of a read count cache and a read count storage area according to yet another embodiment of the present disclosure.

[0048] Figure 5 A schematic diagram of a data transfer apparatus for a solid-state drive according to an embodiment of the present disclosure is shown.

[0049] Figure 6A schematic diagram of the structure of an electronic device provided according to an embodiment of the present disclosure is shown. Detailed Implementation

[0050] Various embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. In the various drawings, the same elements are indicated by the same or similar reference numerals. For clarity, the various portions in the drawings are not drawn to scale.

[0051] The following terms are used in this document:

[0052] A solid-state drive (SSD) is a storage device that primarily consists of a controller and memory (such as NAND flash memory chips). The controller is responsible for managing and controlling the operation of the memory, including reading, programming, and erasing data.

[0053] NAND flash memory is a type of non-volatile memory. In NAND flash memory, the gate structure of a memory cell includes a tunneling dielectric layer, a floating gate, a gate dielectric layer, and a control gate stacked sequentially. Applying a read voltage to the control gate allows the amount of charge in the floating gate to be obtained using the threshold voltage of the memory cell, thus enabling reading. When the flash memory is powered off, the charge in the floating gate is maintained due to the insulating effect of the tunneling dielectric layer. This read operation on a memory cell in NAND flash memory can have a non-negligible impact on adjacent memory cells, known as read disturb. Read disturb includes charge migration, thermal effects, and cross-interference. Charge migration occurs when the read voltage applied to the control gate causes charge to move from adjacent memory cells, leading to data corruption. Thermal effects occur when read operations on a memory cell in NAND flash memory generate heat, which can propagate to adjacent memory cells, causing changes in their charge state. Cross-interference occurs when read operations on a memory cell in NAND flash memory cause signals to cross the boundaries between memory cells, affecting adjacent memory cells.

[0054] Figure 1 A schematic diagram of the structure of a computer system according to an embodiment of the present disclosure is shown. Figure 1As shown, the computer system 100 provided in this embodiment includes a computer device 110 and a solid-state drive 120, wherein the solid-state drive 120 can be understood as an external memory of the computer device 110. The computer device 110 includes a host 111. The solid-state drive 120 may include a controller 121 and at least one memory (e.g., NAND flash memory) 122. The controller 121 includes firmware (FW) 124. The memory 122 is provided with a storage array 125 and a data cache 123. It should be noted that the storage array 125 is the main part of the memory 122, containing a large number of storage cells, which are typically organized into a two-dimensional grid. The data cache 123 is a temporary storage area in the memory 122. The memory 122 may include at least one storage plane, the storage plane may include at least one storage block, and the storage block may include at least one storage page. The programming and reading unit of the solid-state drive 120 is a page, while the erasing unit is a block.

[0055] In some embodiments, an operating system may run on the computer device 110, which can be understood as the host 111 of the solid-state drive 120. The host 111 can send instructions (including read / write commands and Trim commands) to the firmware 124. When the host 111 sends a write command to the firmware 124, the firmware 124 can write data to the memory 122 according to the write command. When the host 111 sends a read command to the firmware 124, the firmware 124 can read data from the memory 122 according to the read command and return the read data to the host 111. During the process of reading data from the memory 122, a typical read operation involves first reading the stored data from the memory array 125 of the memory 122 into the data buffer 123, and then reading the stored data from the data buffer 123. In the case of reading data at the same address in the memory 122 twice consecutively, the first read operation involves first reading the stored data from the memory array 125 of the memory 122 into the data buffer 123, and then reading the stored data from the data buffer 123. The second read operation directly retrieves the stored data from data buffer 123. However, reading data directly from data buffer 123 does not cause read interference; only reading data from storage array 125 will cause read interference. It should be noted that, for ease of description, Figure 1 Taking the computer device 110 as an example, which does not include the solid-state drive 120, the solid-state drive 120 can also be included as part of the computer device 110.

[0056] In some embodiments, for a read operation on data stored in a target storage block in the target memory 122, the controller 121 determines whether the read operation reads data from the storage array 125 of the target memory 122 or directly from the data buffer 123 of the target memory 122. If the read operation reads data from the storage array 125 of the target memory 122, the read count value of the target storage block in the target memory 122 is incremented by one. When the read count value of a storage block in one memory in at least one memory 122 is greater than a first preset read count threshold, all valid data in the storage blocks with the same block number as the storage block in the at least one memory are moved to other storage blocks. In this way, the read count is only performed on the read operation performed on the storage array 125 in the memory 122, which improves the accuracy of the read count value of the storage blocks in the memory 122, thereby preventing the valid data in the corresponding storage blocks from being moved prematurely, reducing the PE wear of the memory 122, and improving the service life of the memory 122.

[0057] Since the process of moving data to a storage block using the data moving method of this disclosure will be described in detail below, it will not be repeated here.

[0058] Figure 2 This is a schematic flowchart of a data transfer method for a solid-state drive according to an embodiment of the present disclosure. The data transfer method of this embodiment can be provided by... Figure 1 The controller 121 executes. For example... Figure 2 As shown, the data transfer method of this disclosure embodiment may include:

[0059] In step S210, for a read operation on data stored in a target memory block in the target memory, it is determined whether the read operation reads data from the storage array of the target memory or directly from the data buffer of the target memory.

[0060] In some embodiments, prior to step S210, a read command from host 111 is obtained for data stored in a target memory block in target memory 122. This read command includes a first read command and a second read command. The first read command is used to read data from the memory array 125 of target memory 122 into a data buffer 123, and then read the data from the data buffer 123. For example, the command sequence of the first read command is 00-30-00-e0. The second read command is used to read data directly from the data buffer 123 of target memory 122. For example, the command sequence of the second read command is 00-e0. In some embodiments, when the read command is the first read command, it is determined that the read operation reads data from the memory array 125 of target memory 122. When the read command is the second read command, it is determined that the read operation reads data directly from the data buffer 123 of target memory 122.

[0061] In step S220, when the read operation reads data from the storage array of the target memory, the read count value of the target storage block in the target memory is incremented by one.

[0062] In some embodiments, the controller 121 is configured with a read count cache, which includes at least one read count cache unit, wherein each read count cache unit corresponds one-to-one with at least one memory 122 in the solid-state drive, and the at least one read count cache unit stores read count values ​​of memory blocks with the same block number located in different memory 122. In some embodiments, the controller 121 is provided with a read count storage area, which includes at least one read count storage unit, each read count storage unit corresponding one-to-one with at least one memory block in the memory 122, and the at least one read count storage unit stores read count values ​​of the corresponding memory block in the memory 122. Figure 3 A schematic diagram of the structure of a read count buffer and a read count storage area according to an embodiment of the present disclosure is shown. Figure 3 As shown, the solid-state drive includes two memories 122, namely memory Die1 and memory Die2. Memory Die1 and memory Die2 each have 16 memory blocks 330, namely memory blocks 1 to 16. The read count cache area 310 includes two read count cache units, namely read count cache unit 310-1 and read count cache unit 310-2. Read count cache unit 310-1 and read count cache unit 310-2 correspond one-to-one with memory Die1 and memory Die2, respectively. Read count cache unit 310-1 stores the read count value of the i-th memory block in memory Die1. Read count cache unit 310-2 stores the read count value of the i-th memory block in memory Die2. Here, i is a positive integer, and i is greater than 0 and less than or equal to the number of memory blocks in memory Die1 and memory Die2. The read count storage area 320 includes 16 read count storage cells, namely read count storage cells 320-1 to 320-16. Each of these cells corresponds one-to-one with one of the 16 storage blocks 330 in the memory 122. Read count storage cells 320-1 to 320-16 store the read count values ​​for storage blocks 1 to 16 located in the memory 122.

[0063] In some embodiments, when a read operation reads data from the storage array 125 of the target memory 122, the read count value of the target memory block stored in the target read count cache unit corresponding to the target memory 122 is incremented by one. (Continuing to refer to...) Figure 3In one example, a read operation is used to read data stored in the i-th storage block 330 of memory Die1. When the read operation reads data from the storage array of memory Die1, the read count value of the i-th storage block 330 in memory Die1, stored in the read count cache unit 310-1 corresponding to memory Die1, is incremented by one. In some embodiments, if the read count value of the target storage block stored in the target read count cache unit is greater than a second preset read count threshold, the maximum read count value among the read count values ​​stored in the at least one read count cache unit is stored in the target read count cache unit corresponding to the target storage block, and the at least one read count cache unit is cleared. (Continue to refer to...) Figure 3 In one example, if the read count value of the i-th storage block 330 in memory Die1 stored in read count cache unit 310-1 is greater than a second preset read count threshold, then the maximum read count value among the read count values ​​stored in read count cache units 310-1 and 310-2 will be stored in the read count storage unit 320-i corresponding to the i-th storage block, and read count cache units 310-1 and 310-2 will be cleared. In some embodiments, if the next read operation indicates that a read operation should be performed on a storage block other than the target storage block in a memory, then the maximum read count value among the read count values ​​stored in the at least one read count cache unit will be stored in the target read count storage unit corresponding to the target storage block, and the at least one read count cache unit will be cleared. (Continue to refer to...) Figure 3 In one example, if the next read operation indicates that a read operation should be performed on a memory block other than the i-th memory block in memory Die1 and memory Die2, then the maximum read count value among the read count values ​​stored in read count cache unit 310-1 and read count cache unit 310-2 is stored in the read count storage unit 320-i corresponding to the i-th memory block, and read count cache unit 310-1 and read count cache unit 310-2 are cleared.

[0064] In some embodiments, the controller 121 is configured with a read count cache, which includes at least one read count cache unit. Each read count cache unit corresponds one-to-one with all storage planes in at least one memory 122. The at least one read count cache unit stores read count values ​​for storage blocks with the same block number located in different storage planes within different memories 122. In some embodiments, the controller 121 is configured with a read count storage area, which includes at least one read count storage unit. Each read count storage unit corresponds one-to-one with at least one storage block in at least one storage plane within the memory 122. The at least one read count storage unit stores read count values ​​for corresponding storage blocks located in the corresponding storage plane within the memory 122. Figure 4 A schematic diagram of the structure of a read count buffer and a read count storage area according to yet another embodiment of the present disclosure is shown. Figure 4As shown, the solid-state drive includes two memories 122, namely memory Die1 and memory Die2. Memory Die1 and memory Die2 are each provided with four storage planes, namely storage planes 1 to 4, where each storage plane includes four storage blocks 430, namely storage blocks 1 to 4. The read count cache area 410 includes eight read count cache units, namely read count cache units 410-1-1 to 410-1-4 and read count cache units 410-2-1 to 410-2-4. Read count cache units 410-1-1 to 410-1-4 correspond one-to-one with storage planes 1 to 4 in memory Die1, and read count cache units 410-2-1 to 410-2-4 correspond one-to-one with storage planes 1 to 4 in memory Die2. Read count cache units 410-1-1 to 410-1-4 respectively store the read count values ​​of the j-th storage block in storage planes 1 to 4 of memory Die1, where j is a positive integer, greater than 0 and less than or equal to the number of storage blocks in each storage plane. Read count storage area 420 includes 16 read count storage units, namely read count storage units 420-1-1 to 420-1-4, read count storage units 420-2-1 to 420-2-4, ..., read count storage units 420-4-1 to 420-4-4. The read count storage units 420-1-1 to 420-1-4 correspond one-to-one with storage blocks 1 to 4 of storage plane 1 in memory 122, respectively; the read count storage units 420-2-1 to 420-2-4 correspond one-to-one with storage blocks 1 to 4 of storage plane 2 in memory 122, respectively; the read count storage units 420-3-1 to 420-3-4 correspond one-to-one with storage blocks 1 to 4 of storage plane 3 in memory 122, respectively; and the read count storage units 420-4-1 to 420-4-4 correspond one-to-one with storage blocks 1 to 4 of storage plane 4 in memory 122.Read count storage units 420-1-1 to 420-1-4 respectively store the read count values ​​of storage blocks 1 to 4 of storage plane 1 in memory 122; read count storage units 420-2-1 to 420-2-4 respectively store the read count values ​​of storage blocks 1 to 4 of storage plane 2 in memory 122; read count storage units 420-3-1 to 420-3-4 respectively store the read count values ​​of storage blocks 1 to 4 of storage plane 3 in memory 122; and read count storage units 420-4-1 to 420-4-4 respectively store the read count values ​​of storage blocks 1 to 4 of storage plane 4 in memory 122.

[0065] In some embodiments, for a read operation on data stored in a target memory block in a target memory plane of the target memory 122, when the read operation reads data from the memory array 125 of the target memory 122, the read count value of the target memory block stored in the target read count cache unit corresponding to the target memory plane in the target memory 122 is incremented by one. (Continue referring to...) Figure 4 In one example, a read operation is used to read data stored in the j-th storage block 430 of the k-th storage plane planek in memory Die1 (where k is a positive integer, and k is greater than 0 and less than or equal to the number of storage planes in memory 122). When the read operation reads data from the storage array of memory Die1, the read count value of the j-th storage block 430 in storage plane planek in memory Die1, stored in the read count cache unit 410-1-k corresponding to storage plane planek in memory Die1, is incremented by one. In some embodiments, if the read count value of the target storage block in the target storage plane of the target memory 122 stored in the target read count cache unit is greater than a second preset read count threshold, the maximum read count value among the read count values ​​stored in at least one read count cache unit is stored in the target read count cache unit corresponding to the target storage block in the target storage plane, and at least one read count cache unit is cleared. (Continue to refer to...) Figure 4In one example, if the read count value of the j-th storage block 430 in the storage plane k of memory Die1 stored in read count cache unit 410-1-k is greater than the second preset read count threshold, then the maximum read count value among the read count values ​​stored in read count cache units 410-1-1 to 410-1-4 and read count cache units 410-2-1 to 410-2-4 will be stored in the read count storage unit 420-kj corresponding to the j-th storage block 430 in the storage plane k of memory 122, and the read count cache units 410-1-1 to 410-1-4 and read count cache units 410-2-1 to 410-2-4 will be cleared. In some embodiments, if the next read operation indicates that a read operation should be performed on a memory block other than the target memory block in a memory plane, the maximum read count value among the read count values ​​stored in at least one read count cache unit is stored in the target read count cache unit corresponding to the target memory block in the target memory plane, and at least one read count cache unit is cleared. (Continue to refer to...) Figure 4 In one example, if the next read operation indicates that a read operation should be performed on a memory block other than the j-th memory block 430 in a memory plane of a memory 122, then the maximum read count value among the read count values ​​stored in read count cache units 410-1-1 to 410-1-4 and read count cache units 410-2-1 to 410-2-4 will be stored in the read count storage unit 420-kj corresponding to the j-th memory block 430 in the memory plane of the memory 122, and the read count cache units 410-1-1 to 410-1-4 and read count cache units 410-2-1 to 410-2-4 will be cleared.

[0066] It should be noted that, for the sake of convenience, Figure 3 and Figure 4 The number of memories, storage planes, and storage blocks shown are exemplary, and can be other values.

[0067] It is understood that in the read count cache area, at least one read count cache unit can correspond one-to-one with at least one memory in the solid-state drive, realizing the counting of read counts for memory blocks with the same block number located in different memories at the memory-level counting granularity. It is also understood that in the read count cache area, at least one read count cache unit can correspond one-to-one with all storage planes in at least one memory in the solid-state drive, realizing the counting of read counts for memory blocks with the same block number located in different storage planes in different memories at the storage plane-level counting granularity. In this embodiment of the present disclosure, by dynamically configuring the read count cache unit, the counting precision of read counts for memory blocks in the memory is improved without increasing the storage space in the read count cache area. The dynamic configurability of the read count cache unit facilitates the flexibility of firmware development and design for data migration schemes for memory blocks in memories of different capacities.

[0068] In step S230, when the read count value of a storage block in one of the at least one memory is greater than a first preset read count threshold, all valid data in the storage blocks with the same block number as the storage block in the at least one memory are moved to other storage blocks.

[0069] In some embodiments, when the read count value of a storage block stored in the at least one read count storage unit is greater than a first preset read count threshold, all valid data in the at least one memory 122 storage blocks with the same block number as the storage block are moved to other storage blocks. (Return to Reference) Figure 3 In one example, when the read count value of a storage block (e.g., the i-th storage block) stored in one of the read count storage units (e.g., read count storage unit 320-i) among read count storage units 320-1 to read count storage units 320-16 is greater than a first preset read count threshold, the valid data in the storage blocks (e.g., the i-th storage block) with the same block number as the storage block in memory Die1 and memory Die2 of the solid-state drive are moved to other storage blocks.

[0070] In some embodiments, when the read count value of a storage block stored in the at least one read count storage unit is greater than a first preset read count threshold, all valid data in the at least one memory 122 storage blocks having the same storage plane number and the same block number as the storage block are moved to other storage blocks. (Return to Reference) Figure 4In one example, when the read count value of a storage block (e.g., the j-th storage block in the k-th storage plane) stored in one of the read count storage units (e.g., read count storage unit 420-kj) from read count storage units 420-1-1 to 420-1-4, read count storage units 420-2-1 to 420-2-4, ..., read count storage units 420-4-1 to 420-4-4 is greater than a first preset read count threshold, the valid data in the storage blocks (e.g., the j-th storage block in the k-th storage plane) that have the same storage plane number and the same block number as the storage block in the solid-state drive's memory Die1 and memory Die2 are all moved to other storage blocks.

[0071] In some embodiments, when the read count value of a storage block stored in at least one read count storage unit in the read count storage area is greater than a third preset read count threshold, the number of read commands received by the controller 121 per unit time is reduced. The third preset read count threshold is greater than or equal to a first preset read count threshold. In some embodiments, the larger the third preset read count threshold, the smaller the number of read commands received by the controller 121 per unit time. In some embodiments, multiple preset read count thresholds can be set according to the host's rate limiting command. In some embodiments, multiple preset read count thresholds can be set by the controller 121 detecting the reliability of the memory read data during the memory read process. In one example, three preset read count thresholds can be set: a first preset read count threshold, a third preset read count threshold, and a fourth preset read count threshold. The first preset read count threshold can be set according to a conservative value given by the NAND spec or DSP test. When the read count value of the storage block is less than or equal to the first preset read count threshold, firmware intervention for LDPC hardware error correction is generally not required during memory read data. The third preset read count threshold can be set based on the DSP's test values. When the read count value of the memory block is greater than the first preset read count threshold but less than or equal to the third preset read count threshold, firmware intervention is usually required during memory data reading to perform LDPC hardware error correction and recover the read data errors. The fourth preset read count threshold can be set based on the DSP's test values. When the read count value of the memory block is greater than the fourth preset read count threshold, firmware intervention is usually required during memory data reading to perform LDPC software error correction and recover the read data errors.

[0072] In some embodiments, the read count value of the storage block stored in at least one read count storage unit in the read count storage area is detected. When the read count value is greater than a first preset read count threshold and less than or equal to a third preset read count threshold, valid data in storage blocks with the same block number as the storage block located in different memories 122 are moved to other storage blocks. When the read count value is greater than the third preset read count threshold and less than or equal to a fourth preset read count threshold, the number of read commands received by the controller 121 per unit time is reduced, thereby simply limiting the IOPS of read commands sent by the host and mitigating the aggravation of read interference. The fourth preset read count threshold is greater than or equal to the third preset read count threshold. When the read count value is greater than the fourth preset read count threshold, the number of read commands received by the controller 121 per unit time is further reduced, thereby strictly limiting the IOPS of read commands sent by the host and preventing memory data loss due to read interference during data migration. In one example, if it takes 5 minutes to move a block of storage data, and the controller 121 is only allowed to receive 50,000 read commands per unit time during which data is lost in the adjacent memory, then the IOPS of the read commands sent by the host can be limited to 50,000 * 4 kbit / 5 min.

[0073] It is understandable that during data migration of valid data in a memory block, frequent read operations from the host may lead to data loss in the memory. Therefore, in this embodiment, by setting different read count thresholds, both memory performance and the reliability of read data in the memory can be balanced. Data migration is performed while ensuring the reliability of read data in the memory, and data loss due to host read operations is avoided by limiting the IOPS of read commands sent by the host. Avoiding the use of overly conservative data migration conditions in the firmware can improve memory utilization.

[0074] Figure 5 A schematic diagram of a data transfer apparatus for a solid-state drive according to an embodiment of the present disclosure is shown. Figure 5 As shown, the solid-state drive includes at least one memory, and the memory includes at least one storage block. The data transfer device includes a read operation data source determination unit 510, a read count unit 520, and a data transfer unit 530.

[0075] The read operation data source determination unit 510 is used to determine, for a read operation on data stored in a target storage block in the target memory, whether the read operation reads data from the storage array of the target memory or directly from the data buffer of the target memory.

[0076] The read count unit 520 is used to increment the read count value of the target memory block in the target memory by one when the read operation reads data from the storage array of the target memory.

[0077] The data transfer unit 530 is used to transfer all valid data in the storage blocks with the same block number as the storage block in the at least one memory to other storage blocks when the read count value of a storage block in one of the at least one memory is greater than a first preset read count threshold.

[0078] Since the process of moving data to a storage block using the data moving method of this disclosure has been described in detail in the method embodiments above, it will not be repeated here.

[0079] This disclosure also provides an electronic device, such as... Figure 6 As shown, it includes a memory 620, a processor 610, and a program stored on the memory 620 and executable on the processor 610. When the program is executed by the processor 610, it can implement the various processes of the above-described data transfer methods and achieve the same technical effects. To avoid repetition, it will not be described again here.

[0080] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. Therefore, this disclosure also provides a storage medium storing a computer program or instructions, which, when executed by a processor, can implement the various processes of the embodiments of the above data transfer methods.

[0081] Since the instructions stored in the storage medium can execute the steps of the data transfer method provided in the embodiments of this disclosure, the beneficial effects of the data transfer method provided in the embodiments of this disclosure can be achieved, as detailed in the preceding embodiments, and will not be repeated here. The specific implementation of each of the above operations can be found in the preceding embodiments, and will not be repeated here.

[0082] In summary, the data relocation method provided in this disclosure, for read operations on data stored in a target storage block in a target memory, determines whether the read operation reads data from the storage array of the target memory or directly from the data cache of the target memory. If the read operation reads data from the storage array of the target memory, the read count value of the target storage block in the target memory is incremented by one. When the read count value of a storage block in at least one memory exceeds a first preset read count threshold, all valid data in storage blocks with the same block number as the target storage block in at least one memory are moved to other storage blocks. In this way, the read count is only performed on read operations executed on the storage array in the memory, improving the accuracy of the read count value of the storage blocks in the memory. This prevents valid data in the corresponding storage blocks from being moved prematurely, reducing memory PE wear and increasing the memory's lifespan.

[0083] Finally, it should be noted that the above embodiments are merely examples for clearly illustrating this disclosure and are not intended to limit the implementation. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of this disclosure.

Claims

1. A data transfer method for a solid-state drive, the solid-state drive including at least one memory, the memory including at least one storage block, the data transfer method comprising: For a read operation on data stored in a target memory block, it is determined whether the read operation reads data from the memory array of the target memory or directly from the data cache of the target memory. The memory further includes at least one memory plane, and the solid-state drive further includes a read count cache, which includes at least one read count cache unit. Each read count cache unit corresponds one-to-one with all memory planes in the at least one memory. Each read count cache unit stores read count values ​​for memory blocks with the same block number located in different memory planes. The solid-state drive also includes a read count storage area, which includes at least one read count storage unit. Each read count storage unit corresponds one-to-one with at least one memory block in the at least one memory plane in the memory. Each read count storage unit stores read count values ​​for the corresponding memory block located in the corresponding memory plane. When the read operation reads data from the storage array of the target memory, the read count value of the target storage block in the target memory is incremented by one. Specifically, for a read operation that reads data stored in the target storage block in the target storage plane of the target memory, when the read operation reads data from the storage array of the target memory, the read count value of the target storage block stored in the target read count cache unit corresponding to the target storage plane of the target memory is incremented by one. If the read count value of the target storage block in the target storage plane of the target memory stored in the target read count cache unit is greater than the second preset read count threshold, then the maximum read count value among the read count values ​​stored in the at least one read count cache unit is stored in the target read count storage unit corresponding to the target storage block in the target storage plane, and the at least one read count cache unit is cleared to zero. When the read count value of a storage block in one of the at least one memory is greater than a first preset read count threshold, all valid data in the storage blocks with the same block number as the storage block in the at least one memory are moved to other storage blocks.

2. The data transfer method according to claim 1, wherein, Before determining whether a read operation on data stored in a target memory block in the target memory will read data from the target memory's storage array or directly from the target memory's data buffer, the data relocation method further includes: Obtain a read command for data stored in a target memory block in the target memory, the read command including a first read command and a second read command; The first read command is used to read data from the storage array of the target memory into the data buffer of the target memory, and then read the data from the data buffer; the second read command is used to read data directly from the data buffer of the target memory.

3. The data transfer method according to claim 1, wherein, The solid-state drive further includes a read count cache, which comprises at least one read count cache unit. Each read count cache unit corresponds one-to-one with the at least one memory, and each read count cache unit stores the read count values ​​of memory blocks with the same block number located in different memories. In the case where the read operation reads data from the storage array of the target memory, incrementing the read count value of the target storage block in the target memory includes: When the read operation reads data from the storage array of the target memory, the read count value of the target storage block stored in the target read count cache unit corresponding to the target memory is incremented by one.

4. The data transfer method according to claim 3, wherein, The solid-state drive further includes a read count storage area, which includes at least one read count storage cell. Each read count storage cell corresponds one-to-one with at least one storage block in the memory. Each read count storage cell stores the read count value of the corresponding storage block in the memory. In the case where the read operation reads data from the storage array of the target memory, after incrementing the read count value of the target storage block in the target memory by one, the data transfer method further includes: If the read count value of the target storage block stored in the target read count cache unit is greater than the second preset read count threshold, then the maximum read count value among the read count values ​​stored in at least one read count cache unit is stored in the target read count storage unit corresponding to the target storage block, and the at least one read count cache unit is cleared; or If the next read operation of the read operation indicates that a read operation should be performed on a memory block other than the target memory block in a memory, then the maximum read count value among the read count values ​​stored in the at least one read count cache unit is stored in the target read count cache unit corresponding to the target memory block, and the at least one read count cache unit is cleared.

5. The data transfer method according to claim 1, wherein, In the case where the read operation reads data from the storage array of the target memory, after incrementing the read count value of the target storage block in the target memory by one, the data transfer method further includes: If the next read operation of the read operation indicates that a read operation should be performed on a memory block other than the target memory block in a memory storage plane, then the maximum read count value among the read count values ​​stored in the at least one read count cache unit is stored in the target read count cache unit corresponding to the target memory block in the target storage plane, and the at least one read count cache unit is cleared.

6. The data transfer method according to claim 5, wherein, When the read count value of a storage block in one of the at least one memory is greater than a first preset read count threshold, the valid data in the storage blocks with the same block number as the storage block in the at least one memory is moved to other storage blocks, which includes: When the read count value of a storage block stored in at least one read count storage unit is greater than the first preset read count threshold, all valid data in the at least one memory storage block with the same storage plane number and the same block number as the storage block are moved to other storage blocks.

7. The data transfer method according to claim 4 or 6, wherein, When the read count value of a storage block in one of the at least one memory is greater than a first preset read count threshold, after all valid data in storage blocks with the same block number as the storage block in the at least one memory are moved to other storage blocks, the data moving method further includes: When the read count value of a storage block stored in the at least one read count storage unit is greater than a third preset read count threshold, the number of read commands received by the solid-state drive per unit time is reduced, wherein the third preset read count threshold is greater than or equal to the first preset read count threshold.

8. The data transfer method according to claim 7, wherein, The larger the third preset read count threshold, the smaller the number of read commands received by the solid-state drive per unit time.

9. A data transfer device for a solid-state drive, the solid-state drive including at least one memory, the memory including at least one storage block, the data transfer device comprising: A read operation data source determination unit is used to determine, for a read operation on data stored in a target storage block in a target memory, whether the read operation reads data from the storage array of the target memory or directly from the data cache of the target memory. The memory further includes at least one storage plane, and the solid-state drive further includes a read count cache, which includes at least one read count cache unit. Each read count cache unit corresponds one-to-one with all storage planes in the at least one memory. Each read count cache unit stores read count values ​​for storage blocks with the same block number located in different storage planes in different memories. The solid-state drive also includes a read count storage area, which includes at least one read count storage unit. Each read count storage unit corresponds one-to-one with at least one storage block in the at least one storage plane in the memory. Each read count storage unit stores read count values ​​for the corresponding storage block located in the corresponding storage plane in the memory. A read count unit is used to increment the read count value of the target storage block in the target memory by one when the read operation reads data from the storage array of the target memory. Specifically, for a read operation that reads data stored in the target storage block in the target storage plane of the target memory, when the read operation reads data from the storage array of the target memory, the read count value of the target storage block stored in the target read count cache unit corresponding to the target storage plane of the target memory is incremented by one. If the read count value of the target storage block in the target storage plane of the target memory stored in the target read count cache unit is greater than the second preset read count threshold, then the maximum read count value among the read count values ​​stored in the at least one read count cache unit is stored in the target read count storage unit corresponding to the target storage block in the target storage plane, and the at least one read count cache unit is cleared to zero. A data transfer unit is used to transfer all valid data in storage blocks with the same block number as the storage block in the at least one memory to other storage blocks when the read count value of a storage block in one of the at least one memory is greater than a first preset read count threshold.

10. A solid-state drive, comprising: At least one memory; A controller, comprising the data transfer device of claim 9, wherein the data transfer device is configured to perform the method of any one of claims 1 to 8 to transfer all valid data in a storage block having the same block number as the storage block in the at least one memory to other storage blocks when the read count value of a storage block in a memory is greater than a first preset read count threshold.

11. A storage medium storing a computer program or instructions that, when executed by a processor, implement the steps of the method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Read interference optimization method and device

    CN107832016A

  • Method and device for compressing reading times of flash memory block of solid state disk, computer equipment and storage medium

    CN115061635A