Data management method and device based on zero-reserved-space solid state disk and readable medium
By using the thermal management list and pseudo-programming-reprogramming strategy of SLC-type flash blocks in solid-state drives, separating hot and cold data and dynamically adjusting reserved space, the impact of the reserved space ratio of the solid-state drive on user space is solved, and the stability is achieved High-speed read and write performance and greater reserved space.
Patent Information
- Application Number
- CN202411305942.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-09-19
AI Technical Summary
During the manufacturing process, existing solid-state drives need to reserve some space for internal operations such as garbage collection, which leads to a decrease in user available space or an increase in purchasing costs. The proportion of reserved space will lead to unstable reading and writing performance.
Adopt the thermal management linked list and pseudo-programming-reprogramming strategy based on SLC type flash blocks, separate hot and cold data through the thermal management linked list, select the appropriate flash block for programming and reprogramming according to the historical number of data accesses, and dynamically adjust the reserved space. To ensure the reliability and response speed of the flash unit while generating additional reserved space.
Without reducing storage space, it provides stable and high-speed read and write performance, and generates more reserved space through pseudo-programming-reprogramming strategy, avoiding the direct impact of the reserved space ratio on user space.
Smart Images

Figure CN119271569A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data storage, and in particular to a data management method, device and readable medium based on a zero-over-provisioning solid-state hard disk. Background Art
[0002] Due to the off-site update feature of NAND flash memory, the modified data is written to other programmable flash pages, and the flash pages that originally stored the data are marked as invalid. This causes manufacturers to reserve some hard disk space that is transparent to users when manufacturing solid-state drives, that is, reserved space, to perform internal operations such as garbage collection. Currently, mainstream solid-state drives on the market have a reserved space ratio of 7% to 50%. The larger the reserved space of the solid-state drive, the more stable the read and write performance and the longer the service life. However, the reserved space comes at the cost of user space. A larger reserved space ratio will reduce the user's available space or increase the purchase cost of the solid-state drive, while a smaller reserved space ratio will cause frequent triggering of internal operations of the hard drive and fail to provide stable and high-speed read and write performance. Summary of the invention
[0003] The purpose of this application is to propose a data management method, device and readable medium based on a zero-over-provisioning solid-state drive to address the above-mentioned technical problems.
[0004] In a first aspect, the present invention provides a data management method based on a zero-over-provisioning solid-state drive, comprising the following steps:
[0005] Construct a thermal management linked list based on SLC type flash memory blocks, the thermal management linked list includes a valid flash memory block linked list, a partially valid flash memory block linked list and an invalid flash memory block linked list, the SLC type flash memory blocks recorded in the valid flash memory block linked list are valid flash memory blocks, all flash memory pages in the valid flash memory blocks are valid flash memory pages, the SLC type flash memory blocks recorded in the partially valid flash memory block linked list are partially valid flash memory blocks, the flash memory pages in the partially valid flash memory blocks include valid flash memory blocks and invalid flash memory pages, the SLC type flash memory blocks recorded in the invalid flash memory block linked list are invalid flash memory blocks, and all flash memory pages in the invalid flash memory blocks are invalid flash pages;
[0006] Obtain the data to be written, the amount of garbage collected data, and the remaining TLC type free space capacity of the current cycle, obtain the predicted heat of the data to be written according to the historical access times of the data to be written, select the SLC type flash memory block of the corresponding heat type according to the predicted heat, and program the data to be written to the SLC type flash memory block of the corresponding heat type in a pseudo-programming manner, and update the heat management linked list to obtain an updated heat management linked list;
[0007] The amount of data migrated by the SLC is calculated based on the data of all valid flash memory pages in the SLC type flash memory unit. In response to determining that the amount of data migrated by the SLC, the amount of data collected by garbage collection, and the remaining TLC type free space capacity meet the threshold judgment condition, the best SLC flash memory block is selected as the reprogramming target in the updated thermal management linked list, and the data in the reprogramming target is programmed into the TLC type flash memory unit in a reprogramming manner, and the SLC type flash memory unit obtained by reprogramming the reprogramming target as additional space is used as the reserved space; in response to determining that the amount of data migrated by the SLC, the amount of data collected by garbage collection, and the remaining TLC type free space capacity do not meet the threshold judgment condition, the TLC type flash memory unit is used as the reserved space; the reserved space is used to receive the data generated by garbage collection and the data of all valid flash memory pages in the SLC type flash memory or the data of valid flash memory pages in the remaining SLC type flash memory units except the reprogramming target.
[0008] Preferably, the threshold judgment condition is:
[0009] The amount of data migrated by SLC + the amount of data collected by garbage collection ≥ the remaining free space capacity of TLC type.
[0010] Preferably, obtaining the predicted heat of the data to be written according to the historical access times of the data to be written, and selecting the SLC type flash memory block of the corresponding heat type according to the predicted heat, specifically includes:
[0011] In response to determining that the number of historical accesses of the data to be written in two busy cycles before the current cycle is not 0, the predicted temperature of the data to be written is hot data, programming the data to be written to the SLC type flash memory block whose temperature type is hot data in a pseudo-programming manner;
[0012] In response to determining that the historical access times of the data to be written in the two busy cycles before the current cycle are 0, the predicted temperature of the data to be written is cold data, and the data to be written is programmed to an SLC type flash memory block with a temperature type of cold data in a pseudo-programming manner.
[0013] Preferably, the data stored in the valid flash memory page is the data that has not been updated after being written to the SLC type flash memory block; the data stored in the invalid flash memory page is the data that has been updated after being written to the SLC type flash memory block, and the invalid flash memory block can be erased to become an idle flash memory block.
[0014] Preferably, the SLC type flash memory cell divides the voltage range into two different voltage windows for representing 1 bit of data; the TLC type flash memory cell divides the voltage range into eight different voltage windows for representing 3 bits of data; the first two voltage windows of the eight different voltage windows in the TLC type flash memory cell are the same as the two voltage windows in the SLC type flash memory cell, and the reprogramming method is to increase the voltage to the range of the eight voltage windows so that the data programmed into the SLC type flash memory cell is reprogrammed into the TLC type flash memory cell.
[0015] Preferably, the selection process of the reprogramming target is as follows:
[0016] In response to determining that there is a valid flash memory block in the updated thermal management linked list, taking the valid flash memory block as a reprogramming target;
[0017] In response to determining that there are no valid flash memory blocks and there are some valid flash memory blocks in the updated thermal management linked list, taking the some valid flash memory blocks containing the most valid flash memory pages as a reprogramming target;
[0018] In response to determining that the valid flash memory block and the partially valid flash memory block do not exist in the updated thermal management linked list, the invalid flash memory block is taken as a reprogramming target.
[0019] Preferably, the garbage collection process is to select a flash memory block and migrate the data of valid flash memory pages in the flash memory block, and then erase the data in the flash memory block; multiple flash memory units constitute a flash memory page, and multiple flash memory pages constitute a flash memory block. Data read and write operations are performed at the granularity of flash memory pages, and erase operations are performed at the granularity of flash memory blocks.
[0020] In a second aspect, the present invention provides a data management device based on a zero-over-provisioning solid-state hard disk, comprising:
[0021] A linked list construction module is configured to construct a thermal management linked list based on SLC type flash memory blocks, wherein the thermal management linked list includes a valid flash memory block linked list, a partially valid flash memory block linked list, and an invalid flash memory block linked list. The SLC type flash memory blocks recorded in the valid flash memory block linked list are valid flash memory blocks, and all flash memory pages in the valid flash memory blocks are valid flash memory pages. The SLC type flash memory blocks recorded in the partially valid flash memory block linked list are partially valid flash memory blocks, and the flash memory pages in the partially valid flash memory blocks include valid flash memory blocks and invalid flash memory pages. The SLC type flash memory blocks recorded in the invalid flash memory block linked list are invalid flash memory blocks, and all flash memory pages in the invalid flash blocks are invalid flash pages.
[0022] a pseudo programming module configured to obtain data to be written, amount of garbage collected data and remaining free space capacity of TLC type in the current cycle, obtain predicted heat of the data to be written according to the number of historical accesses to the data to be written, select a flash memory block of SLC type corresponding to the heat type according to the predicted heat, and program the data to be written into the flash memory block of SLC type corresponding to the heat type in a pseudo programming manner, and update the heat management linked list to obtain an updated heat management linked list;
[0023] A selection module is configured to calculate the amount of data migrated by the SLC based on the data of all valid flash memory pages in the SLC type flash memory unit; in response to determining that the amount of data migrated by the SLC, the amount of data collected by garbage collection, and the remaining TLC type free space capacity meet the threshold judgment condition, the best SLC flash memory block is selected in the updated thermal management linked list as the reprogramming target, the data in the reprogramming target is programmed into the TLC type flash memory unit in a reprogramming manner, and the SLC type flash memory unit obtained by reprogramming the reprogramming target as the additional space is used as the reserved space; in response to determining that the amount of data migrated by the SLC, the amount of data collected by garbage collection, and the remaining TLC type free space capacity do not meet the threshold judgment condition, the TLC type flash memory unit is used as the reserved space; the reserved space is used to receive the data generated by garbage collection and the data of all valid flash memory pages in the SLC type flash memory or the data of valid flash memory pages in the remaining SLC type flash memory units except the reprogramming target.
[0024] In a third aspect, the present invention provides an electronic device comprising one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect.
[0025] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.
[0026] In a fifth aspect, the present invention provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method described in any implementation manner in the first aspect.
[0027] Compared with the prior art, the present invention has the following beneficial effects:
[0028] (1) The data management method based on a zero-reserved space solid-state drive proposed in the present invention adopts a pseudo-programming-reprogramming strategy for all flash memory cells of an SLC-type flash memory block, thereby ensuring the reliability of the flash memory cells and the response speed of the host request, and reprogramming the data of the SLC-type flash memory cells into the TLC-type flash memory cells, thereby generating more additional space as reserved space.
[0029] (2) The data management method based on the zero over-provisioning solid-state drive proposed in the present invention realizes the cold and hot data separation operation of the SLC type flash memory unit through the thermal management linked list, so that in the subsequent selection process of the reprogramming target, the data of the SLC type flash memory unit containing the most valid flash memory pages can be selected as the reprogramming target, while the data of the remaining SLC type flash memory units are subjected to garbage collection operation.
[0030] (3) The data management method based on the zero reserved space solid state drive proposed in the present invention can select, according to the threshold judgment condition, to perform a reprogramming operation when the sum of the amount of data migrated by the SLC and the amount of data collected by the garbage collector is greater than or equal to the remaining TLC type free space capacity. Due to the lack of sufficient free TLC type space, the data of some SLC type flash memory cells are reprogrammed to generate additional space as the reserved space, which can retain a large reserved space without reducing the storage space, thereby providing stable and high-speed read and write performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0032] Figure 1 A schematic diagram of a flow chart of a data management method based on a zero-over-provisioning solid-state drive according to an embodiment of the present application;
[0033] Figure 2 A schematic diagram of a system architecture of a data management method based on a zero-over-provisioning solid-state drive according to an embodiment of the present application;
[0034] Figure 3 A schematic diagram of reprogramming target selection in a data management method based on a zero-over-provisioning solid-state drive according to an embodiment of the present application;
[0035] Figure 4 A threshold voltage distribution diagram of a pseudo programming-reprogramming strategy of a data management method based on a zero over-provisioning solid state drive according to an embodiment of the present application;
[0036] Figure 5 A schematic diagram of reserved space selection in a data management method based on a zero-reserved space solid state drive according to an embodiment of the present application;
[0037] Figure 6 A schematic diagram of an entity relationship identification device according to an embodiment of the present application;
[0038] Figure 7 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0040] Figure 1 A data management method based on a zero-over-provisioned solid-state drive provided in an embodiment of the present application is shown, comprising the following steps:
[0041] S1, construct a thermal management linked list based on SLC type flash memory blocks, the thermal management linked list includes a valid flash memory block linked list, a partially valid flash memory block linked list and an invalid flash memory block linked list, the SLC type flash memory blocks recorded in the valid flash memory block linked list are valid flash memory blocks, all flash memory pages in the valid flash memory blocks are valid flash memory pages, the SLC type flash memory blocks recorded in the partially valid flash memory block linked list are partially valid flash memory blocks, the flash memory pages in the partially valid flash memory blocks include valid flash memory blocks and invalid flash memory pages, the SLC type flash memory blocks recorded in the invalid flash memory block linked list are invalid flash memory blocks, and all flash memory pages in the invalid flash blocks are invalid flash pages.
[0042] In a specific embodiment, the data stored in the valid flash memory page is the data that has not been updated after being written to the SLC type flash memory block; the data stored in the invalid flash memory page is the data that has been updated after being written to the SLC type flash memory block, and the invalid flash memory block can be erased to become an idle flash memory block.
[0043] Specifically, the SLC / TLC hybrid flash memory architecture is composed of SLC-type flash memory cells and TLC-type flash memory cells. Among them, each flash memory cell of the SLC-type flash memory block can store one bit of data, with high read and write performance, but low storage density; while each flash memory cell of the TLC-type flash memory block can store three bits of data, with high storage density, but poor read and write performance. Therefore, the data requested by the host is preferentially written to the SLC-type flash memory cell to improve the response speed of the host request. In the idle state without host requests, the solid-state drive will perform internal operations: migrate the data in the SLC-type flash memory cell to the TLC-type flash memory cell and erase the data in the SLC-type flash memory cell, and perform garbage collection on the TLC-type flash memory cell.
[0044] SLC type flash memory cells and TLC type flash memory cells are the same physical media, but they are caused by different programming methods. That is to say, a flash memory cell in an idle state after being erased is an SLC type flash memory cell when the SLC programming method is used, and the SLC type flash memory cell can store 1 bit of data; while a TLC type flash memory cell is a TLC type flash memory cell when the TLC programming method is used, and the TLC type flash memory cell can store 3 bits of data.
[0045] refer to Figure 2The zero reserved space solid-state hard disk of the embodiment of the present application adds three functional modules in the flash memory controller: a programming / reprogramming module, a reserved space selection module, and a reprogramming target selection module. In addition, there are also basic address mapping modules and garbage collection modules in the flash memory controller, and these modules perform the same functions as conventional solid-state hard disks. The flash memory storage chip in the solid-state hard disk is composed of SLC type flash memory cells and TLC type flash memory cells. Among them, the SLC type flash memory cell can store 1 bit of data, and the TLC type flash memory cell can store 3 bits of data. The flash memory can perform basic read, write, and erase operations. The read and write operations are performed at the granularity of the flash memory page, and the erase operation is performed at the granularity of the flash memory block. The programming / reprogramming module is used to execute a pseudo-programming-reprogramming strategy, and adopts a pseudo-programming-reprogramming strategy for all flash memory cells in the SLC type flash memory block, while ensuring the reliability of the flash memory cell, realizing writing data twice in the flash memory cell. The reserved space selection module can dynamically select space as reserved space according to the unused space capacity of the solid-state hard disk. When there are enough unused TLC-type flash blocks, the solid-state drive will select TLC-type flash blocks as reserved space; when there are not enough unused TLC-type flash blocks, the solid-state drive will use reprogramming technology to convert the data in the programmed SLC-type flash cells into the data of TLC-type flash cells. Since SLC-type flash cells can only store 1 bit of data and TLC-type flash cells store 3 bits of data, each TLC-type flash cell can accommodate 2 more bits of data during the conversion process, and the extra space generated by the conversion is used as reserved space. The reprogramming target selection module is used to separate hot and cold data, and realize the function of the SLC flash block selector through the heat management linked list. The embodiment of the present application is designed based on the heat management linked list of SLC-type flash blocks to realize the cold and hot data separation operation of SLC-type flash blocks, so as to select the best (coldest, with the most valid flash pages, that is, the lowest access frequency) SLC-type flash block as the reprogramming target, and migrate and erase the data in the hottest (high access frequency) SLC-type flash block.
[0046] refer to Figure 3, the embodiment of the present application divides the programmed SLC type flash memory blocks into three different types: invalid flash memory blocks, partially valid flash memory blocks and valid flash memory blocks. The invalid flash memory blocks are all invalid flash memory pages (i.e., data that has been updated after being written into the SLC type flash memory unit), which can be directly erased to become an idle flash memory block. The partially valid flash memory blocks are composed of valid flash memory pages and invalid flash memory pages, and the valid flash memory blocks are all valid flash memory pages (i.e., data that has not been updated after being written into the SLC type flash memory unit). The embodiment of the present application implements the function of the SLC flash memory block selector by constructing a heat management linked list based on the SLC type flash memory block. The heat management linked list is a three-level linked list structure, which respectively maintains a valid flash memory block linked list, a partially valid flash memory block linked list and an invalid flash memory block linked list. The valid flash memory block linked list records valid flash memory blocks, the partially valid flash memory block linked list records partially valid flash memory blocks, and the invalid flash memory block linked list records invalid flash memory blocks.
[0047] S2, obtains the data to be written, the amount of garbage collected data and the remaining TLC type free space capacity of the current cycle, obtains the predicted heat of the data to be written according to the historical access times of the data to be written, selects the SLC type flash memory block of the corresponding heat type according to the predicted heat, and programs the data to be written to the SLC type flash memory block of the corresponding heat type in a pseudo-programming manner, and updates the heat management linked list to obtain an updated heat management linked list.
[0048] In a specific embodiment, obtaining the predicted heat of the data to be written according to the historical access times of the data to be written, and selecting the SLC type flash memory block of the corresponding heat type according to the predicted heat specifically includes:
[0049] In response to determining that the number of historical accesses of the data to be written in two busy cycles before the current cycle is not 0, the predicted temperature of the data to be written is hot data, programming the data to be written to the SLC type flash memory block whose temperature type is hot data in a pseudo-programming manner;
[0050] In response to determining that the historical access times of the data to be written in the two busy cycles before the current cycle are 0, the predicted temperature of the data to be written is cold data, and the data to be written is programmed to an SLC type flash memory block with a temperature type of cold data in a pseudo-programming manner.
[0051] Specifically, the embodiment of the present application first separates the data to be written into hot and cold data, that is, the SLC type flash memory block with a heat type of cold data stores data predicted to be cold data, and the SLC type flash memory block with a heat type of hot data stores data predicted to be hot data. Since the migration data of garbage collection is usually cold data that has not been accessed for a long time, storing such data in the SLC type flash memory block with a heat type of cold data can effectively reduce the triggering frequency of garbage collection operations. The method of determining whether the data to be written is cold data or hot data is: according to whether there is a host read and write request in the time window, the time period is classified into a busy period (with a read and write request in the time window) and an idle period (without a read and write request in the time window), and the logical addresses of all updated data in the first two busy periods of the current period are recorded. If the data to be written in the current period has been accessed in the first two busy periods, the data to be written is considered to be hot data, that is, it will be frequently accessed in the future, otherwise the data to be written is considered to be cold data. After the data to be written is pseudo-programmed, the predicted temperature is determined, and the SLC type flash memory block of the corresponding temperature type is stored, the flash memory controller will update whether each flash memory page is a valid flash memory page or an invalid flash memory page, so the thermal management linked list will also be updated to obtain an updated thermal management linked list.
[0052] The solid state drive is composed of a flash memory controller and a flash memory storage chip. In the flash memory controller, it is recorded whether each flash memory page is a valid flash memory page or an invalid flash memory page, and the number of migrated flash memory pages in the TLC type flash memory block that performs the garbage collection operation is also recorded. The flash memory storage chip is composed of many flash memory units, many flash memory units will constitute a flash memory page, and multiple flash memory pages will constitute a flash memory block, and many flash memory blocks will eventually constitute a flash memory storage chip. In the embodiment of the present application, 16KB flash memory units constitute 1 flash memory page, and 1024 flash memory pages constitute 1 flash memory block. In the remaining embodiments, they can be divided according to other values. The reason for dividing flash memory pages and flash memory blocks is that read and write operations are performed at the granularity of flash memory pages, while erase operations are performed at the granularity of flash memory blocks. When the available space of the TLC type is insufficient, it is necessary to perform a garbage collection operation on the TLC type flash memory block, that is, select the flash memory block containing the most valid flash memory pages, and after migrating the valid flash memory pages to other locations (at this time, all are invalid flash memory pages), erase this flash memory block, so that more available space can be released.
[0053] S3, calculate the amount of data migrated by SLC based on the data of all valid flash memory pages in the SLC type flash memory unit, in response to determining that the amount of data migrated by SLC, the amount of data collected by garbage collection and the remaining TLC type free space capacity meet the threshold judgment condition, select the best SLC flash memory block in the updated thermal management linked list as the reprogramming target, program the data in the reprogramming target into the TLC type flash memory unit in a reprogramming manner, and use the SLC type flash memory unit obtained by reprogramming the reprogramming target as additional space as the reserved space; in response to determining that the amount of data migrated by SLC, the amount of data collected by garbage collection and the remaining TLC type free space capacity do not meet the threshold judgment condition, use the TLC type flash memory unit as the reserved space; the reserved space is used to receive the data generated by garbage collection and the data of all valid flash memory pages in the SLC type flash memory or the data of valid flash memory pages in the remaining SLC type flash memory units except the reprogramming target.
[0054] In a specific embodiment, the threshold judgment condition is: the amount of data migrated by SLC + the amount of data collected by garbage collection ≥
[0055] The remaining TLC type free space capacity.
[0056] In a specific embodiment, an SLC type flash memory cell divides a voltage range into two different voltage windows for representing 1 bit of data; a TLC type flash memory cell divides a voltage range into eight different voltage windows for representing 3 bits of data; the first two voltage windows of the eight different voltage windows in the TLC type flash memory cell are the same as the two voltage windows in the SLC type flash memory cell, and the reprogramming method is to increase the voltage to the range of the eight voltage windows so that the data programmed into the SLC type flash memory cell is reprogrammed into the TLC type flash memory cell.
[0057] Specifically, the SLC type flash memory cell divides the voltage range into two different voltage windows, and the TLC type flash memory cell divides the voltage range into eight different voltage windows. The flash memory controller will correspond the eight different values that can be represented by 3-bit data to the eight voltage windows one by one. The embodiment of the present application proposes a pseudo-programming-reprogramming strategy. The pseudo-programming strategy only uses the first two voltage windows to represent 1 bit of data, while the reprogramming strategy increases the voltage to the range of eight voltage windows to represent 3 bits of data, thereby realizing the transformation of the SLC type flash memory cell to the TLC type flash memory cell. First, all the data to be written needs to be programmed into the SLC type flash memory cell using pseudo-programming. When the amount of SLC migrated data, the amount of garbage collected data, and the remaining TLC type free space capacity meet the threshold judgment condition, the data of the SLC type flash memory cell is reprogrammed (the threshold voltage is increased) according to the bit value of the data, so that the threshold voltage is within the target voltage window. The remaining TLC type free space capacity is the number of TLC type flash memory blocks in an idle state, which can be recorded and obtained in real time. Reference Figure 4 The pseudo-programming-reprogramming strategy will first program the target flash memory cell into the P1 voltage window range. At this time, the target flash memory cell represents 1 bit of data, that is, an SLC type flash memory cell. During reprogramming, the voltage of the target flash memory cell will be increased from the P1 voltage window range to the P6 voltage window range by continuing to fill electrons, so that the target flash memory cell represents 3 bits of data, that is, a TLC type flash memory cell.
[0058] Specifically, the embodiment of the present application selects a suitable idle hard disk space as the reserved space according to the threshold judgment condition. The migration strategy of the conventional SLC / TLC hybrid architecture: migrate the data of all valid flash pages in the SLC type flash block to the TLC type flash unit, and migrate the data generated by the garbage collection operation in the TLC type flash block to the reserved space that is transparent to the user. Figure 5In the embodiment of the present application, when the threshold judgment condition is not met, there are sufficient idle TLC-type flash memory blocks (there are sufficient erased TLC-type flash memory cells) to receive the data of all valid flash memory pages in the SLC-type flash memory cells and the data generated by garbage collection, so the TLC-type flash memory blocks are selected as the reserved space. In the embodiment of the present application, when the threshold judgment condition is met, there is a lack of sufficient idle TLC-type space, so the data of the programmed SLC-type flash memory cells containing the most valid flash memory pages are selected as the reprogramming target to migrate to the TLC-type flash memory cells, and the additional space obtained by reprogramming the data of the SLC-type flash memory cells is used as the reserved space to receive the data of the valid flash memory pages in all the remaining SLC-type flash memory blocks except the reprogramming target and the data generated by garbage collection.
[0059] In a specific embodiment, the process of selecting a reprogramming target is as follows:
[0060] In response to determining that there is a valid flash memory block in the updated thermal management linked list, taking the valid flash memory block as a reprogramming target;
[0061] In response to determining that there are no valid flash memory blocks and there are some valid flash memory blocks in the updated thermal management linked list, taking the some valid flash memory blocks containing the most valid flash memory pages as a reprogramming target;
[0062] In response to determining that the valid flash memory block and the partially valid flash memory block do not exist in the updated thermal management linked list, the invalid flash memory block is taken as a reprogramming target.
[0063] Specifically, the valid flash memory block is the preferred target for reprogramming, and the valid flash memory block with the most valid flash memory pages is selected as the reprogramming target. When there is no valid flash memory block, some of the valid flash memory blocks with the most valid flash memory pages are selected as the reprogramming target. When there is no valid flash memory block and some of the valid flash memory blocks, the free flash memory block is selected as the reprogramming target.
[0064] In a specific embodiment, the garbage collection process is to select a flash memory block and migrate the data of valid flash memory pages in the flash memory block, and then erase the data in the flash memory block; multiple flash memory units constitute a flash memory page, and multiple flash memory pages constitute a flash memory block. The read and write operations of data are performed at the granularity of the flash memory page, and the erase operation is performed at the granularity of the flash memory block.
[0065] Specifically, for write operations, data will be programmed into SLC-type flash memory cells in a pseudo-programming manner. Before programming, the hot and cold data are first separated by reprogramming the target selection module, and data with the same heat are written into the same SLC-type flash memory block according to the predicted heat of the data (the probability of the data being accessed in the future is inferred based on the historical number of accesses to the data). When there is no read or write request from the host, the solid-state drive will migrate the data in the SLC-type flash memory unit to the TLC-type flash memory block, and perform garbage collection operations on the TLC-type flash memory block. At this time, it is necessary to select a suitable idle hard disk space as the reserved space. If there are enough idle TLC-type flash memory blocks (enough programmable TLC-type flash memory blocks), the TLC-type flash memory block is selected as the reserved space, and the data generated by the garbage collection operation is also migrated to this reserved space. The process of performing a garbage collection operation is to migrate the data in the TLC-type flash memory block to this reserved space and erase the TLC-type flash memory block at the same time. If there is a lack of sufficient idle TLC-type flash blocks, the SLC flash block selector in the reprogramming target selection module will select the best SLC-type flash block (the SLC-type flash block containing the most valid flash pages) as the reprogramming target, and use the extra space generated by the reprogramming operation as reserved space to receive the migration data generated by garbage collection. For read operations, the embodiment of the present application adopts the same method as other solid-state drives.
[0066] Further references Figure 6 As an implementation of the methods shown in the above figures, the present application provides an embodiment of an entity relationship identification device. Figure 1 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0067] The embodiment of the present application provides a data management device based on a zero-over-provisioning solid-state drive, including:
[0068] A linked list construction module 1 is configured to construct a thermal management linked list based on SLC type flash memory blocks, wherein the thermal management linked list includes a valid flash memory block linked list, a partially valid flash memory block linked list, and an invalid flash memory block linked list. The SLC type flash memory blocks recorded in the valid flash memory block linked list are valid flash memory blocks, and all flash memory pages in the valid flash memory blocks are valid flash memory pages. The SLC type flash memory blocks recorded in the partially valid flash memory block linked list are partially valid flash memory blocks, and the flash memory pages in the partially valid flash memory blocks include valid flash memory blocks and invalid flash memory pages. The SLC type flash memory blocks recorded in the invalid flash memory block linked list are invalid flash memory blocks, and all flash memory pages in the invalid flash memory blocks are invalid flash memory pages.
[0069] The pseudo programming module 2 is configured to obtain the data to be written, the amount of garbage collected data and the remaining free space capacity of the TLC type in the current cycle, obtain the predicted heat of the data to be written according to the historical access times of the data to be written, select the SLC type flash memory block of the corresponding heat type according to the predicted heat, and program the data to be written into the SLC type flash memory block of the corresponding heat type in a pseudo programming manner, and update the heat management linked list to obtain an updated heat management linked list;
[0070] The selection module 3 is configured to calculate the amount of data migrated by the SLC based on the data of all valid flash memory pages in the SLC type flash memory unit, and in response to determining that the amount of data migrated by the SLC, the amount of data collected by garbage collection, and the remaining TLC type free space capacity meet the threshold judgment condition, select the best SLC flash memory block in the updated thermal management linked list as the reprogramming target, program the data in the reprogramming target into the TLC type flash memory unit in a reprogramming manner, and use the SLC type flash memory unit obtained by reprogramming the reprogramming target as additional space as the reserved space; in response to determining that the amount of data migrated by the SLC, the amount of data collected by garbage collection, and the remaining TLC type free space capacity do not meet the threshold judgment condition, use the TLC type flash memory unit as the reserved space; the reserved space is used to receive the data generated by garbage collection and the data of all valid flash memory pages in the SLC type flash memory or the data of valid flash memory pages in the remaining SLC type flash memory units except the reprogramming target.
[0071] Figure 7 Schematic diagram of the hardware structure of the electronic device provided by the embodiment of the present invention. Figure 7 As shown, the electronic device of this embodiment includes: a processor 701 and a memory 702; wherein the memory 702 is used to store computer-executable instructions; the processor 701 is used to execute the computer-executable instructions stored in the memory to implement the various steps performed by the electronic device in the above embodiment. For details, please refer to the relevant description in the above method embodiment.
[0072] Optionally, the memory 702 may be independent or integrated with the processor 701 .
[0073] When the memory 702 is independently provided, the electronic device further includes a bus 703 for connecting the memory 702 and the processor 701 .
[0074] The embodiment of the present invention further provides a computer storage medium, in which computer execution instructions are stored. When the processor 701 executes the computer execution instructions, the above method is implemented.
[0075] The embodiment of the present invention further provides a computer program product, including a computer program. When the computer program is executed by the processor 701, the above method is implemented.
[0076] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0077] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to implement the solution of this embodiment.
[0078] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each module may exist physically separately, or two or more modules may be integrated into one unit. The unit formed by the above modules may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0079] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor 701 to perform some steps of the methods of various embodiments of the present application.
[0080] It should be understood that the processor 701 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or the processor 701 may be any conventional processor 701, etc. The steps of the method disclosed in the invention may be directly embodied in the execution of the hardware processor 701, or may be executed by a combination of hardware and software modules in the processor 701.
[0081] The memory 702 may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk, or an optical disk.
[0082] The bus 703 may be an Industry Standard Architecture (ISA), a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus 703 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus 703 in the drawings of the present application is not limited to only one bus 703 or one type of bus 703.
[0083] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0084] An exemplary storage medium is coupled to the processor 701, so that the processor 701 can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor 701. The processor 701 and the storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as ASIC). Of course, the processor 701 and the storage medium can also exist as discrete components in an electronic device or a main control device.
[0085] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0086] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A data management method based on a zero-over-provisioning solid-state drive, characterized in that: The following steps are involved: Constructing a thermal management linked list based on SLC type flash memory blocks, the thermal management linked list includes a valid flash memory block linked list, a partially valid flash memory block linked list and an invalid flash memory block linked list, the SLC type flash memory blocks recorded in the valid flash memory block linked list are valid flash memory blocks, all flash memory pages in the valid flash memory blocks are valid flash memory pages, the SLC type flash memory blocks recorded in the partially valid flash memory block linked list are partially valid flash memory blocks, the flash memory pages in the partially valid flash memory blocks include valid flash memory blocks and invalid flash memory pages, the SLC type flash memory blocks recorded in the invalid flash memory block linked list are invalid flash memory blocks, and all flash memory pages in the invalid flash memory blocks are invalid flash memory pages; Obtaining the data to be written, the amount of garbage collected data, and the remaining free space capacity of the TLC type in the current cycle, obtaining the predicted heat of the data to be written according to the number of historical accesses to the data to be written, selecting a flash memory block of the SLC type corresponding to the heat type according to the predicted heat, programming the data to be written to the flash memory block of the SLC type corresponding to the heat type in a pseudo-programming manner, and updating the heat management linked list to obtain an updated heat management linked list; Calculate the amount of data migrated by the SLC based on the data of all valid flash memory pages in the SLC type flash memory unit, and in response to determining that the amount of data migrated by the SLC, the amount of data collected by garbage collection, and the remaining free space capacity of the TLC type meet the threshold judgment condition, select the best SLC flash memory block in the updated thermal management linked list as the reprogramming target, program the data in the reprogramming target into the TLC type flash memory unit in a reprogramming manner, and use the SLC type flash memory unit as the additional space obtained by reprogramming the reprogramming target as the reserved space; In response to determining that the amount of data migrated by the SLC, the amount of data collected by garbage collection, and the remaining free space capacity of the TLC type do not meet the threshold judgment condition, the TLC type flash memory unit is used as a reserved space; The reserved space is used to receive data generated by garbage collection and data of all valid flash memory pages in the SLC type flash memory or data of valid flash memory pages in the remaining SLC type flash memory units except the reprogramming target.
2. The data management method based on zero over-provisioning solid state drive according to claim 1, characterized in that: The threshold judgment condition is: The amount of data migrated by SLC + the amount of data collected by garbage collection ≥ the remaining free space capacity of TLC type.
3. The data management method based on zero over-provisioning solid state drive according to claim 1, characterized in that: Obtaining predicted heat of the data to be written according to the number of historical accesses to the data to be written, and selecting a flash memory block of an SLC type corresponding to the heat type according to the predicted heat, specifically comprising: In response to determining that the number of historical accesses of the data to be written in two busy cycles before the current cycle is not 0, the predicted temperature of the data to be written is hot data, programming the data to be written to the SLC type flash memory block whose temperature type is hot data in a pseudo-programming manner; In response to determining that the number of historical accesses to the data to be written in the two busy cycles before the current cycle is 0, the predicted temperature of the data to be written is cold data, and the data to be written is programmed in a pseudo-programming manner to an SLC type flash memory block whose temperature type is cold data.
4. The data management method based on zero over-provisioning solid state drive according to claim 1, characterized in that: The data stored in the valid flash memory page is data that has not been updated after being written to the SLC type flash memory block; the data stored in the invalid flash memory page is data that has been updated after being written to the SLC type flash memory block, and the invalid flash memory block can be erased to become an idle flash memory block.
5. The data management method based on zero over-provisioning solid state drive according to claim 1, characterized in that: The SLC type flash memory cell divides the voltage range into two different voltage windows for representing 1 bit of data; the TLC type flash memory cell divides the voltage range into eight different voltage windows for representing 3 bits of data; the first two voltage windows of the eight different voltage windows in the TLC type flash memory cell are the same as the two voltage windows in the SLC type flash memory cell, and the reprogramming method is to increase the voltage to the range of the eight voltage windows so that the data programmed into the SLC type flash memory cell is reprogrammed into the TLC type flash memory cell.
6. The data management method based on zero over-provisioning solid state drive according to claim 1, characterized in that: The selection process of the reprogramming target is as follows: In response to determining that there is a valid flash memory block in the updated thermal management linked list, taking the valid flash memory block as the reprogramming target; In response to determining that there are no valid flash memory blocks and there are some valid flash memory blocks in the updated thermal management linked list, taking the some valid flash memory blocks containing the most valid flash memory pages as the reprogramming target; In response to determining that there are no valid flash memory blocks and partially valid flash memory blocks in the updated thermal management linked list, an invalid flash memory block is used as the reprogramming target.
7. The data management method based on zero over-provisioning solid state drive according to claim 1, characterized in that: The garbage collection process is to select a flash memory block and migrate the data of the valid flash memory pages in the flash memory block, and then erase the data in the flash memory block; multiple flash memory units constitute a flash memory page, and multiple flash memory pages constitute a flash memory block. The read and write operations of data are performed at the granularity of the flash memory page, and the erase operation is performed at the granularity of the flash memory block.
8. A data management device based on a zero-over-provisioning solid-state hard disk, characterized in that: include: A linked list construction module is configured to construct a thermal management linked list based on SLC type flash memory blocks, wherein the thermal management linked list includes a valid flash memory block linked list, a partially valid flash memory block linked list, and an invalid flash memory block linked list, wherein the SLC type flash memory blocks recorded in the valid flash memory block linked list are valid flash memory blocks, and all flash memory pages in the valid flash memory blocks are valid flash memory pages, the SLC type flash memory blocks recorded in the partially valid flash memory block linked list are partially valid flash memory blocks, and the flash memory pages in the partially valid flash memory blocks include valid flash memory blocks and invalid flash memory pages, the SLC type flash memory blocks recorded in the invalid flash memory block linked list are invalid flash memory blocks, and all flash memory pages in the invalid flash memory blocks are invalid flash memory pages; a pseudo-programming module configured to obtain data to be written, amount of garbage collected data and remaining free space capacity of TLC type in the current cycle, obtain predicted heat of the data to be written according to the number of historical accesses to the data to be written, select a flash memory block of SLC type corresponding to the heat type according to the predicted heat, program the data to be written to the flash memory block of SLC type corresponding to the heat type in a pseudo-programming manner, and update the heat management linked list to obtain an updated heat management linked list; A selection module is configured to calculate the amount of data migrated by the SLC according to the data of all valid flash memory pages in the SLC type flash memory unit, and in response to determining that the amount of data migrated by the SLC, the amount of data collected by garbage collection, and the remaining free space capacity of the TLC type meet the threshold judgment condition, select the best SLC flash memory block in the updated thermal management linked list as the reprogramming target, program the data in the reprogramming target into the TLC type flash memory unit in a reprogramming manner, and use the SLC type flash memory unit as the additional space obtained by reprogramming the reprogramming target as the reserved space; In response to determining that the amount of data migrated by the SLC, the amount of data collected by garbage collection, and the remaining free space capacity of the TLC type do not meet the threshold judgment condition, the TLC type flash memory unit is used as a reserved space; The reserved space is used to receive data generated by garbage collection and data of all valid flash memory pages in the SLC type flash memory or data of valid flash memory pages in the remaining SLC type flash memory units except the reprogramming target.
9. An electronic device, comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Data distribution and reprogramming optimization method for 3D TLC flash memory
CN114281251A
Managing data storage caching and tiering
US11061814B1
Storage system and data control method therefor
US20120254513A1
Method and apparatus for accessing flash memory device
US20180357013A1
Cited By
Programming method and device, computer equipment and storage medium
CN120949992A