Dynamic Data Filling for 3D Flash Memory
By dynamically filling open physical blocks in NAND flash memory with data when read thresholds are exceeded or time durations are reached, the method addresses data reliability issues in storage devices, ensuring data integrity and reducing performance impact.
Patent Information
- Application Number
- CN201910277645.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-04-08
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2039-04-08
AI Technical Summary
In storage devices, the long-term failure of open physical blocks to reduce data reliability in sensitive areas, which may lead to failure of reads, and the prior art is difficult to effectively solve this problem.
By monitoring the number of times the area of interest of the open physical block is read and the data storage time of the sensitive area, the padded data is generated and written to move the sensitive area, avoiding data corruption, a counter and timer mechanism is used to control the generation and writing of the padded data.
It effectively prevents the destruction of data in sensitive areas, improves the data reliability of storage devices, and reduces waste of storage space and performance impacts.
Smart Images

Figure CN111797028B_ABST
Abstract
Description
Technical Field
[0001] This application relates to storage technologies, and in particular, to a dynamic data filling method and a storage device for non-volatile storage media such as 3D NAND flash memory. Background Art
[0002] Figure 1 A block diagram of a solid-state storage device is shown. The solid-state storage device 102 is coupled to a host and is used to provide storage capabilities for the host. The host and the solid-state storage device 102 can be coupled in various ways, including but not limited to coupling the host and the solid-state storage device 102 through, for example, SATA (Serial Advanced Technology Attachment), SCSI (Small Computer System Interface), SAS (Serial Attached SCSI), IDE (Integrated Drive Electronics), USB (Universal Serial Bus), PCIE (Peripheral Component Interconnect Express, PCIe), NVMe (NVM Express), Ethernet, Fibre Channel, a wireless communication network, etc. The host can be an information processing device capable of communicating with the storage device through the above-mentioned ways. For example, a personal computer, a tablet computer, a server, a portable computer, a network switch, a router, a cellular phone, a personal digital assistant, etc. The storage device 102 includes an interface 103, a control component 104, one or more NVM chips 105, and DRAM (Dynamic Random Access Memory) 110.
[0003] NAND flash memory, phase change memory, FeRAM (Ferroelectric RAM), MRAM (Magnetic Random Access Memory), RRAM (Resistive Random Access Memory), XPoint memory, etc. are common NVMs.
[0004] The interface 103 can be adapted to exchange data with the host through, for example, SATA, IDE, USB, PCIE, NVMe, SAS, Ethernet, Fibre Channel, etc.
[0005] The control component 104 is used to control data transmission between the interface 103, the NVM chip 105, and the DRAM 110, and is also used for storage management, mapping of host logical addresses to flash physical addresses, wear leveling, bad block management, etc. The control component 104 can be implemented in various ways such as software, hardware, firmware, or a combination thereof. For example, the control component 104 can be in the form of an FPGA (Field - programmable gate array), an ASIC (Application Specific Integrated Circuit), or a combination thereof. The control component 104 can also include a processor or a controller, and software is executed in the processor or controller to manipulate the hardware of the control component 104 to process IO (Input / Output) commands. The control component 104 can also be coupled to the DRAM 110 and can access the data in the DRAM 110. The FTL table and / or the data of the cached IO commands can be stored in the DRAM.
[0006] The control component 104 includes a flash interface controller (or also referred to as a media interface, media interface controller, flash channel controller). The flash interface controller is coupled to the NVM chip 105 and issues commands to the NVM chip 105 in a manner that complies with the interface protocol of the NVM chip 105 to operate the NVM chip 105 and receives the command execution results output from the NVM chip 105. Known NVM chip interface protocols include "Toggle", "ONFI", etc.
[0007] In a storage device, an FTL (Flash Translation Layer) is used to maintain the mapping information from logical addresses to physical addresses. Logical addresses constitute the storage space of the solid - state storage device perceived by upper - layer software such as the operating system. Physical addresses are the addresses used to access the physical storage units of the solid - state storage device. In related technologies, address mapping can also be implemented using an intermediate address form. For example, a logical address is mapped to an intermediate address, and then the intermediate address is further mapped to a physical address. In these cases, the read / write commands received by the storage device indicate logical addresses.
[0008] The table structure that stores the mapping information from logical addresses to physical addresses is called the FTL table. The FTL table is important metadata in the solid - state storage device. Usually, the entries of the FTL table record the address mapping relationship in the storage device in units of data pages.
[0009] The control component may transform the commands received from the interface 103 (for example, split the commands according to the size of the logical address space corresponding to the FTL entries), and process the transformed commands.
[0010] The storage device includes multiple NVM chips. Each NVM chip includes one or more dies or logical units (LUNs, Logic UNits). The dies or logical units can respond to read and write operations in parallel. Multiple read, write, or erase operations on the same die or logical unit are executed sequentially.
[0011] NVM chips such as flash memory include multiple physical blocks. The physical blocks include physical pages. The physical page is the smallest unit for implementing a programming operation, while the physical block is the smallest unit for implementing an erase operation. As the density of NVM chips gradually increases, the smallest unit for a programming operation can be one or more physical pages. For example, some NVM chips provide a One-Shot Program command for programming multiple physical pages at once. A physical page generally includes multiple memory cells located on the same word line. In 3D flash memory, a word line can further include multiple word line segments, and each word line segment provides the memory cells that make up one or more physical pages.
[0012] As the storage density increases, NVM chips such as flash memory face problems such as cross-coupling interference and read disturb. When programming a certain physical page, the programming signal applied to one word line will interfere with adjacent word lines. When reading a certain physical page, the word lines around the word line being read will interfere with the word line being read, and the electrical signals generated for implementing the read operation will also interfere with the word line being read and adjacent word lines. This interference is particularly severe in the area of the physical block near the programmed and unprogrammed word lines.
[0013] A physical block in which some physical pages have been programmed and some physical pages have not been programmed is called an open physical block. Since there is an area in the open physical block near the programmed and unprogrammed word lines, the data stored in the open physical block has a reliability risk.
[0014] NVM chips have made efforts to overcome the data reliability problems caused by cross-coupling interference, read disturb, etc. When all physical pages of an open physical block have been programmed, the physical block is called a "closed" physical block. The reliability of the data in the closed physical block is greatly improved.
[0015] Figure 2 Shows multiple areas in the open physical block affected by interference.
[0016] Figure 2In this case, for the purpose of demonstration, the downward direction is defined as the increasing direction of the address of the physical page. When programming each physical page in the physical block, the physical pages are programmed in the order of increasing address. Therefore, in the open physical block, two regions are formed according to whether they have been programmed - the programmed region and the unprogrammed region. The programmed region includes three parts - the reliable region, the off region, and the sensitive region. The data in the reliable region has relatively high reliability. The read operation on the reliable region of the open physical block basically does not affect the reliability of the data stored in the open physical block.
[0017] The physical page at the adjacent position of the programmed region and the unprogrammed region is denoted as physical page C, and physical page C is the last physical page that has been programmed currently. The specified region (generally dozens to hundreds of physical pages) forward from physical page C (in the direction of decreasing physical page address) is the region of interest. For example, the region of interest includes the memory cells of adjacent word lines. The read operation on the region of interest of the open physical block will affect the reliability of the data in the sensitive region. For example, after the read operation on the region of interest accumulates, for example, thousands or tens of thousands of times, the data in the sensitive region may be damaged.
[0018] The sensitive region is included in the region of interest but is smaller than the region of interest. The sensitive region is also a specified region forward from physical page C. For example, the sensitive region includes the memory cells from the same word line. In addition to being affected by the read operation, time also affects the data stored in the sensitive region. The time that the data in the sensitive region can be maintained is significantly less than the retention time of the data in the reliable region.
[0019] The reliable region, the region of interest, the sensitive region, and the unprogrammed region are variable. With the implementation of the programming operation, the unprogrammed region of the open physical block gradually shrinks, while the programmed region gradually expands. Refer to Figure 2 As shown in, by applying one or more further programming commands to the open physical block 210, the open physical block 220 is obtained. Compared with the open physical block 210, in the open physical block 220, the reliable region becomes larger, and the ranges of the region of interest and the sensitive region as a whole move in the direction of having a larger physical page address. Since the sensitive region moves as the programming operation occurs, even if there are some read operations on the region of interest, as long as these read operations are not very frequent, their impact on the data stored in the sensitive region will not reach the level of damaging the data.
[0020] When the open physical block becomes a closed physical block, all regions in the physical block become reliable regions, and the region of interest and the sensitive region both disappear. Therefore, in the case of continuous data writing, the open physical blocks in the NVM chips in the storage device can generally be filled in time to form closed physical blocks, and the stored data has relatively good reliability. Summary of the Invention
[0021] However, the inventors have noticed that some application scenarios have special characteristics. For example, after writing a certain amount of data to a storage device, no data to be written is generated for a long time. This causes one or more open physical blocks in the NVM chips of the storage device to remain open for a long time and cannot be closed in a timely manner. With the accumulation of time and / or the accumulation of read operations on these open physical blocks, the data reliability of the sensitive areas of these open physical blocks continuously decreases and may even be damaged, resulting in failures in reading data from the sensitive areas of these open physical blocks of the storage device.
[0022] It is necessary to address and solve this problem to avoid the risk of failure in reading data from the sensitive areas of these open physical blocks of the storage device.
[0023] According to a first aspect of the present application, there is provided a first method for a storage device according to the first aspect of the present application, including: generating first padding data to be written to the open physical block in response to the number of times the first area of the open physical block is read exceeding a first threshold.
[0024] According to the first method for a storage device according to the first aspect of the present application, there is provided a second method for a storage device according to the first aspect of the present application, further including: generating second padding data to be written to the open physical block in response to the time that the data in the second area of the open physical block is stored in the second area exceeding a second threshold.
[0025] According to the first or second method for a storage device according to the first aspect of the present application, there is provided a third method for a storage device according to the first aspect of the present application, wherein the first area is the concerned area of the open physical block and is located in a specified area forward from the last programmed page of the open physical block.
[0026] According to one of the first to third methods for a storage device according to the first aspect of the present application, there is provided a fourth method for a storage device according to the first aspect of the present application, wherein the size of the first padding data is the minimum unit of data written by the storage device.
[0027] According to one of the first to fourth methods for a storage device according to the first aspect of the present application, there is provided a fifth method for a storage device according to the first aspect of the present application, wherein the size of the first padding data is associated with the first threshold. If the size of the second area of the open physical block is N times the size of the first padding data, where N is a positive integer, then N times the first threshold is not greater than the number of times the first area can be read before the data in the second area is damaged.
[0028] According to the fifth method for a storage device of the first aspect of the present application, a sixth method for a storage device of the first aspect of the present application is provided, wherein the second area is a sensitive area of the open physical block, located in a specified area forward from the last programmed page of the open physical block, and the first area contains the second area.
[0029] According to one of the first to sixth methods for a storage device of the first aspect of the present application, a seventh method for a storage device of the first aspect of the present application is provided, further including: in response to the first area of the open physical block being read, incrementing a first counter such that the first counter represents the number of times the first area of the open physical block has been read.
[0030] According to the seventh method for a storage device of the first aspect of the present application, an eighth method for a storage device of the first aspect of the present application is provided, further including: in response to writing first padding data to the open physical block, decreasing the first counter by a first threshold.
[0031] According to the fifth or sixth method for a storage device of the first aspect of the present application, a ninth method for a storage device of the first aspect of the present application is provided, further including: in response to a user writing data to the open physical block, updating the position of the second area.
[0032] According to one of the first to ninth methods for a storage device of the first aspect of the present application, a tenth method for a storage device of the first aspect of the present application is provided, further including: in response to a user writing data to the open physical block, updating the position of the first area.
[0033] According to one of the first to tenth methods for a storage device of the first aspect of the present application, an eleventh method for a storage device of the first aspect of the present application is provided, wherein the size of the second padding data is the minimum unit of data written by the storage device.
[0034] According to one of the first to eleventh methods for a storage device of the first aspect of the present application, a twelfth method for a storage device of the first aspect of the present application is provided, wherein the size of the second padding data is associated with a second threshold. If the size of the second area of the open physical block is M times the size of the second padding data, where M is a positive integer, then M times the second threshold is not greater than the time during which the data in the second area can be reliably stored before the data in the second area is damaged.
[0035] According to one of the first to twelfth methods for a storage device according to the first aspect of the present application, a thirteenth method for a storage device according to the first aspect of the present application is provided, further comprising: in response to the time that the data in the second region of the open physical block is stored in the second region exceeding a second threshold, incrementing a second counter such that the second counter represents the time that the data in the second region of the open physical block is stored in the second region.
[0036] According to the thirteenth method for a storage device according to the first aspect of the present application, a fourteenth method for a storage device according to the first aspect of the present application is provided, further comprising: in response to writing second padding data to the open physical block, decreasing the second counter by the second threshold.
[0037] According to one of the first to fourteenth methods for a storage device according to the first aspect of the present application, a fifteenth method for a storage device according to the first aspect of the present application is provided, further comprising: in response to a user writing data to the open physical block, resetting the time that the data in the second region of the open physical block is stored in the second region.
[0038] According to one of the first to third methods for a storage device according to the first aspect of the present application, a sixteenth method for a storage device according to the first aspect of the present application is provided, wherein the size of the first padding data is the size of the second region.
[0039] According to one of the second to tenth methods for a storage device according to the first aspect of the present application, a seventeenth method for a storage device according to the first aspect of the present application is provided, wherein the size of the second padding data is the size of the second region.
[0040] According to one of the first to seventeenth methods for a storage device according to the first aspect of the present application, an eighteenth method for a storage device according to the first aspect of the present application is provided, further comprising: writing the first padding data to the open physical block.
[0041] According to one of the first to eighteenth methods for a storage device according to the first aspect of the present application, a nineteenth method for a storage device according to the first aspect of the present application is provided, wherein: the storage device includes a plurality of open physical blocks, and in response to the number of times the first region of the first open physical block among the plurality of open physical blocks is read exceeding a first threshold, generating first padding data to be written to the first open physical block.
[0042] According to one of the first to eighteenth methods for a storage device according to the first aspect of the present application, a twentieth method for a storage device according to the first aspect of the present application is provided, wherein: the storage device includes one or more large blocks; and in response to the number of times the first region of the first open large block is read exceeding a second threshold, generating first padding data to be written to the first open large block.
[0043] The twentieth method for a storage device according to the first aspect of the present application provides the twenty-first method for a storage device according to the first aspect of the present application, wherein the size of the first region of the first open large block is the sum of the sizes of the first regions of all physical blocks of the first open large block; and the size of the second region of the first open large block is the sum of the sizes of the second regions of all physical blocks of the first open large block.
[0044] The twentieth method for a storage device according to the first aspect of the present application provides the twenty-second method for a storage device according to the first aspect of the present application, wherein the size of the first region of the first open large block is the sum of the sizes of the first regions of all physical blocks that do not store RAID parity data of the first open large block; and the size of the second region of the first open large block is the sum of the sizes of the second regions of all physical blocks that do not store RAID parity data of the first open large block.
[0045] The twentieth to twenty-second methods for a storage device according to the first aspect of the present application provide the twenty-third method for a storage device according to the first aspect of the present application, wherein in response to the time that the data in the second region of the first open large block is stored in the second region exceeding a third threshold, second padding data to be written to the second region of the first open large block is generated.
[0046] One of the first to twenty-third methods for a storage device according to the first aspect of the present application provides the twenty-fourth method for a storage device according to the first aspect of the present application, wherein: the storage device is a multi-stream storage device; in response to the number of times the first region corresponding to the first stream is read exceeding a fourth threshold, first padding data is generated for the first stream.
[0047] The twenty-fourth method for a storage device according to the first aspect of the present application provides the twenty-fifth method for a storage device according to the first aspect of the present application, wherein a stream is bound to one or more large blocks.
[0048] According to the second aspect of the present application, there is provided an information processing device according to the second aspect of the present application, including a memory, a processor, and a program stored on the memory and executable on the processor, wherein when the processor executes the program, one of the methods for a storage device according to the first aspect of the present application is implemented.
[0049] According to the third aspect of the present application, there is provided a computer-readable storage medium according to the third aspect of the present application, on which a computer program is stored, characterized in that when the program is executed by a processor, one of the methods for a storage device according to the first aspect of the present application is implemented.
[0050] According to a fourth aspect of the present application, there is provided a storage device according to the fourth aspect of the present application, including a memory, a processor, and a program stored on the memory and executable on the processor. When the processor executes the program, one of the methods for the storage device according to the first aspect of the present application is implemented.
[0051] According to a fifth aspect of the present application, there is provided a system for a storage device according to the fifth aspect of the present application, including: a data filling module for generating first filling data to be written to the open physical block in response to the number of times the first area of the open physical block is read exceeding a first threshold. Description of the Drawings
[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0053] Figure 1 It is a block diagram of a storage device in the prior art;
[0054] Figure 2 It shows multiple areas in the open physical block affected by interference;
[0055] Figure 3 It shows a schematic diagram of data filling of the open physical block according to an embodiment of the present application;
[0056] Figure 4 It is a schematic diagram of data filling of the open physical block according to another embodiment of the present application;
[0057] Figure 5 It shows a flowchart of data filling of the open physical block according to another embodiment of the present application;
[0058] Figure 6 It shows a flowchart of data filling of the open physical block according to still another embodiment of the present application; and
[0059] Figure 7 It shows a flowchart of data filling of the open physical block according to still another embodiment of the present application. Detailed Embodiments
[0060] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the protection scope of the present application.
[0061] Figure 3 A schematic diagram showing the data filling of the open physical block according to an embodiment of the present application is presented.
[0062] The programmed area of the open physical block 310 includes a sensitive area 312. Due to the lack or absence of further programming operations on the open physical block 310 (resulting in no movement of the sensitive area 312), and the read operations on the concerned area of the physical block 310 have accumulated a certain number of times (and / or the storage units in the sensitive area 312 have been stored in the sensitive area 312 for a certain period of time), the data reliability in the sensitive area 312 has significantly decreased (indicated by the physical block 320).
[0063] Refer to Figure 3 , the physical block 320 indicates the open physical block 310 after the data reliability has decreased. The data reliability in the sensitive area 322 of the physical block 320 has decreased, and there may be uncorrectable errors (referred to as dangerous data) when the data therein is read.
[0064] To eliminate such dangerous data, according to an embodiment of the present application, the number of times the concerned area in the open physical block 320 is read and / or the time the data in the sensitive area 312 is stored is statistically counted. If the number of times the concerned area in the open physical block 320 is read is greater than the number threshold and / or the time the data in the sensitive area 312 is stored is greater than the time threshold, filling data is written to the open physical block 320.
[0065] Figure 3 In [reference], the open physical block 330 shows the written filling data (indicated by "1 / 2 / 3 / 4 / ……A / B / C"). The filling data can be, for example, random numbers or pre-specified data. The filling data is written to the unprogrammed area and causes the sensitive area to move downward (in the direction of increasing physical page address), so that the sensitive area 312 in the open physical block 310 is no longer a sensitive area. In this way, the data in the sensitive area 312 is removed from the sensitive area (the sensitive area moves downward) before being damaged due to the reading of the concerned area or the accumulation of time, thus avoiding the data in the sensitive area 312 from being damaged.
[0066] Optionally, to ensure that the sensitive area 312 is no longer a sensitive area, the amount of filled data is greater than or equal to the size of the sensitive area 312.
[0067] Optionally, the number threshold and the time threshold are determined according to the characteristics of the non-volatile storage medium, provided by the manufacturer of the non-volatile storage medium or measured in a laboratory. For example, if an uncorrectable error occurs after the data in the sensitive area is read 50,000 times in the area of concern, the number threshold is set to 40,000 times or a value less than 50,000 times; if an uncorrectable error occurs 24 hours after the data in the sensitive area is written, the time threshold is set to 20 hours or a value less than 24 hours.
[0068] According to Figure 3 the embodiments, the data in the sensitive area can be prevented from being damaged. However, when writing padding data, once the data filling the entire sensitive area is generated at one time, it not only wastes storage space but also affects the performance of the storage device (writing padding data occupies the write bandwidth of the storage device, causing the write bandwidth experienced by the user to decrease or jitter, and writing padding data also affects the processing delay and read bandwidth of the read operation of the open physical block where the data to be written is located). Moreover, if a write operation of the user to the open physical block occurs during the period of counting the number of times the area of concern is read and / or the time when the data in the sensitive area is stored, causing the sensitive area to move downward, the amount of padding data required when generating the padding data decreases. If the padding data is generated according to the size of the sensitive area, some padding data is unnecessary and causes waste of storage space.
[0069] According to another embodiment of the present application, the number of read operations (number of times read) of the area of concern that affects each physical page, the smallest unit of the programming operation or the smallest unit of the read operation (these units are simply referred to as statistical units) in the sensitive area and / or the time when the data thereon is stored is recorded. In response to the number of times any statistical unit (denoted as statistical unit SU) is read being greater than the number threshold and / or the time it is stored being greater than the time threshold, padding data is written to the open physical block where the sensitive area is located, so that the sensitive area moves downward and the statistical unit SU no longer belongs to the sensitive area.
[0070] As the sensitive area moves downward, some new statistical units are newly added to the sensitive area, while some original statistical units are removed from the sensitive area, and the number of times read and the storage time are no longer recorded for the statistical units removed from the sensitive area.
[0071] In response to the user writing data to the storage device, when the storage device generates garbage collection data or log data, data is also written to the open physical block and the sensitive area is moved downward.
[0072] In this way, the number of times each statistical unit in the sensitive area is read and / or the storage time is accurately counted, and padding data is generated to minimize the generated padding data and reduce the waste of storage space. However, more data needs to be recorded and the computational complexity is relatively high.
[0073] Figure 4 FIG. is a schematic diagram of data padding for an open physical block according to another embodiment of the present application.
[0074] The programmed area of the open physical block 410 includes a sensitive area 412. To avoid data in the sensitive area 412 from being damaged, whenever the concerned area corresponding to the sensitive area is read a specified number of times (denoted as C1), a specified amount of padding data (denoted as P1) is generated and written to the open physical block where the sensitive area is located. By way of example, the size of the specified amount of padding data P1 is the minimum unit of a read operation or the minimum unit of a programming operation. Still by way of example, the size of the padding data P1 is 2KB, 4KB, 16KB or a multiple thereof. It can be understood that the generated padding data P1 does not need to be immediately written to the open physical block, but is treated as data to be written and combined with other data to be written before being written to the open physical block. It can still be understood that if the padding data P1 is 4KB, the storage device also generates metadata (such as check data, etc.) for the padding data and writes the padding data P1 and the check data to the open physical block together.
[0075] According to an embodiment of the present application, there is an association between the specified number of times C1 and the padding data P1. For example, the size of the sensitive area is N times the size of the padding data P1 generated each time (N is a positive integer), and C1*N is the number of times threshold or the number of read operations that the concerned area corresponding to the sensitive area can withstand before the data in the sensitive area is damaged. For example, the size of the padding data P1 is 4KB, and the size of the sensitive area is 64KB. Before the data in the sensitive area is damaged, the concerned area corresponding to the sensitive area can withstand 100,000 read operations, then C1 is 6250, that is, for every 6250 read operations carried by the concerned area, a piece of padding data P1 is generated. Similarly, the size of the padding data P1 is 16KB, and the size of the sensitive area is 64KB. Before the data in the sensitive area is damaged, the concerned area corresponding to the sensitive area can withstand 100,000 read operations, then C1 is 25000. Optionally, the size of the padding data P1 is 4KB, and the size of the sensitive area is 64KB. Before the data in the sensitive area is damaged, the concerned area corresponding to the sensitive area can withstand 100,000 read operations, then C1 is set to be less than 6250 to generate padding data earlier and improve the reliability of the data in the sensitive area.
[0076] In this way, the filling of the sensitive area is decomposed into multiple write operations spaced apart from each other, and the amount of data written to the open physical block each time is very small, so that the impact of data filling on the performance of the storage device is minimized.
[0077] Optionally or further, if the user generates data to be written to the open physical block, or the garbage collection operation, log operation, etc. of the storage device generate data to be written to the open physical block, these non-filling data are recorded as user data U. In response to obtaining the user data U or writing the user data U to the open physical block, the positions of the concerned area and the sensitive area change (shift down), but there is no need to change the number of times the concerned area corresponding to the sensitive area is read as counted. The previous statistics are still valid. Thus, the calculation process is simplified.
[0078] For example, the current concerned area is the physical address range P1 to P2. The number of read operations carried on the address range P1 to P2 is counted. Whenever the number of read operations exceeds C1, a piece of filling data is generated and written to the open physical block, and in response to the generation or writing of the filling data to the open physical block, the number of read operations carried on the sensitive area as counted is decreased by C1. If there is user data U of size A to be written to the open physical block, the physical address range of the concerned area becomes (P1 + A) to (P2 + A), and the number of read operations carried on the address range (P1 + A) to (P2 + A) continues to be counted.
[0079] Thus, referring to Figure 4 , a scenario where user data U and filling data P coexist is formed in the sensitive area 422 of the open physical block 420. According to this embodiment of the present application, if there is a large amount of user data U, due to the continuous movement of the concerned area, the probability that the read operation falls into the concerned area is reduced, the generation probability of the filling data P is reduced, thereby increasing the (data volume) ratio of U / P and reducing the unnecessary occupation of storage space. And the calculation process is simple, and the impact on the performance of the storage device each time the filling data P is generated is also very low.
[0080] In an extreme case, if there is continuous user data U and there are also a large number of read operations on the newly written user data U, a certain amount of unnecessary filling data P will be generated. This is a side effect of this embodiment, in exchange for a simple calculation process, reducing the use of computing power, reducing the impact on the performance of the storage device, and also reducing the fluctuation of the storage device performance.
[0081] Still optionally or further, to avoid data in the sensitive area 412 from being damaged, the time when the data in the sensitive area is saved is counted. Whenever the time when the data in the sensitive area is saved exceeds a specified time (denoted as T1), a specified amount of padding data (denoted as P2) is generated and written to the open physical block where the sensitive area is located. As an example, the size of the specified amount of padding data P2 is the minimum unit of a read operation or the minimum unit of a programming operation. Still as an example, the size of the padding data P2 is 2KB, 4KB, 16KB or a multiple thereof.
[0082] The specified time T1 is associated with the padding data P2. For example, the size of the sensitive area is M times the size of the padding data P2 generated each time (M is a positive integer), and T1 * M is the time threshold or the time during which the data in the sensitive area can be reliably stored before the data in the sensitive area is damaged. For example, the size of the padding data P2 is 4KB, and the size of the sensitive area is 64KB. Before the data in the sensitive area is damaged, the data in the sensitive area can be reliably saved for 24 hours, then T1 is 1.5 hours. That is, in the case where the sensitive area does not change, every 1.5 hours, a portion of padding data P2 is generated. Similarly, the size of the padding data P2 is 16KB, and the size of the sensitive area is 64KB. Before the data in the sensitive area is damaged, the data in the sensitive area can be reliably saved for 24 hours, then T1 is 6 hours. Optionally, the size of the padding data P2 is 4KB, and the size of the sensitive area is 64KB. Before the data in the sensitive area is damaged, the data in the sensitive area can be reliably saved for 24 hours, then T1 is set to be less than 1.5 hours to generate padding data earlier and improve the reliability of the data in the sensitive area.
[0083] In this way, the padding of the sensitive area is decomposed into multiple write operations at intervals. The amount of data written to the open physical block each time is very small, so that the impact of data padding on the performance of the storage device is minimized.
[0084] The padding data P1 generated based on the read operation of the area of interest and the padding data P2 generated based on the time when the data in the sensitive area is stored can be independent of each other or associated with each other. For example, in response to the area of interest carrying out C1 read operations, padding data P1 is generated, and in response to the time when the data in the sensitive area is stored reaching T1, padding P2 is generated. As another example, each time padding data is generated, the number of read operations on the area of interest and the time when the data in the sensitive area is stored are both cleared or re - counted.
[0085] Optionally or further, during the time when the data in the statistical sensitive area is stored, if user data U appears, the time when the data in the sensitive area is stored is cleared or re - counted, because the user data U will cause the sensitive area to change (shift down), and the time when the data in the old sensitive area was stored is no longer applicable to the new sensitive area.
[0086] Figure 5 Shows a flowchart of data filling for an open physical block according to another embodiment of the present application.
[0087] In response to obtaining a read command (510), identify whether the read command is to access the concerned area of the open physical block (520). For example, identify whether the read command accesses the concerned area of the open physical block by comparing whether the physical address to be accessed by the read command belongs to the physical address range of the concerned area.
[0088] If the read command accesses the concerned area of the open physical block, increment the number of times the concerned area of the open physical block is read to accumulate the number of times the concerned area is read (530). If the number of times the concerned area of the open physical block is read exceeds a specified threshold (540), generate fill data P1 and write the generated fill data P1 to the unprogrammed area of the physical block to which the concerned area belongs (550), and also subtract the specified threshold from the accumulated number of times the concerned area is read (560).
[0089] It can be understood that the concerned area is dynamic. As user data U appears or fill data P1 is generated, the open physical block is written with user data U or fill data P1, which also causes the concerned area to shift down.
[0090] As an example, the size of the fill data P1 is 2KB, 4KB, 16KB or a multiple thereof, and the size of the fill P1 is associated with the specified threshold. If the size of the fill data P1 generated each time increases, a larger specified threshold is also set accordingly. For example, the size of the sensitive area is N times the size of the fill data P1 generated each time (N is a positive integer), and the specified threshold C1*N is the number - of - times threshold or the number of read operations that the concerned area corresponding to the sensitive area can carry before the data in the sensitive area is damaged.
[0091] In yet another embodiment, the storage device includes multiple open physical blocks. Count the number of times the concerned area of each open physical block is read, and in response to the number of times the concerned area of the open physical block OP is read exceeding the specified threshold, generate fill data for the open physical block OP.
[0092] In yet another embodiment, the storage device includes one or more large blocks, each large block including a plurality of physical blocks, and a large block having open physical blocks is referred to as an open large block. The number of times the region of interest of each open large block is read is counted, and in response to the number of times the region of interest of the open large block OXP being read exceeding a specified threshold, padding data is generated for the open large block OXP. The size of the region of interest / sensitive region of the open large block OXP is the sum of the sizes of the regions of interest / sensitive regions of all the physical blocks in the open large block; alternatively, in the case of a data protection mechanism such as RAID being applied to the large block, the size of the region of interest / sensitive region of the open large block OXP is the sum of the sizes of the regions of interest / sensitive regions of all the physical blocks in the open large block that do not store RAID parity data.
[0093] In still yet another embodiment, the storage device is a multi-stream storage device capable of processing multiple streams, and each stream is bound to one or more physical blocks or large blocks. The data to be written to the storage device comes from at least one stream. For example, the data of the user write requests accessing each namespace constitutes a stream; or, according to the stream label of the user write requests, the data of the user write requests having the same stream label constitutes a stream; or, according to the application or virtual machine that issues the user write requests, the data of the user write requests from the same application and / or virtual machine constitutes a stream. The number of times the region of interest of each stream is read is counted, and in response to the number of times the region of interest of the stream S being read exceeding a specified threshold, padding data is generated for the stream S. Wherein, the size of the region of interest / sensitive region of the stream is the sum of the sizes of the regions of interest / sensitive regions of the physical blocks or large blocks bound to the stream.
[0094] Figure 6 A flowchart of data padding for open physical blocks according to still another embodiment of the present application is shown.
[0095] In response to the passage of time (610), a counter (640) is incremented according to the amount of time elapsed, such that the counter represents the length of time that data on the sensitive region of the open physical block has been stored.
[0096] In response to receiving a user write command (or garbage collection operation, log operation) to write data to the open physical block (620), the counter that records the passage of time corresponding to the open physical block is cleared (630).
[0097] If the length of time that data on the sensitive region of the open physical block represented by the counter has been stored exceeds a specified threshold (650), then padding data P2 is generated, and the generated padding data P2 is written to the unprogrammed region of the physical block to which the region of interest belongs (660), and the counter is also decremented by the specified threshold (670).
[0098] Understandably, the sensitive area is dynamic. As user data U appears or padding data P1 is generated, the open physical block is written with user data U or padding data P1, which also causes the sensitive area to shift downward. Optionally, in response to a change in the sensitive area, a counter representing the length of time that the data on the sensitive area representing the open physical block is stored is cleared.
[0099] As an example, the size of the padding data P2 is 2KB, 4KB, 16KB, or a multiple thereof, and the size of the padding P2 is associated with a specified threshold T1. If the size of the padding data P2 generated each time increases, a correspondingly larger specified threshold is also set. For example, the size of the sensitive area is M times the size of the padding data P2 generated each time (M is a positive integer), and T1 * M is the time threshold or the time during which the data in the sensitive area can be reliably stored before the data in the sensitive area is destroyed.
[0100] In yet another embodiment, the storage device includes a plurality of open physical blocks. The time that the data on the sensitive area of each open physical block is stored is counted, and in response to the time that the data on the sensitive area of the open physical block OP is stored exceeding the specified threshold, padding data is generated for the open physical block OP.
[0101] In still another embodiment, the storage device includes one or more large blocks. The time that the data on the sensitive area of each open large block is stored is counted, and in response to the time that the data on the sensitive area of the open large block OXP is stored exceeding the specified threshold, padding data is generated for the open large block OXP.
[0102] In still yet another embodiment, the storage device is a multi-stream storage device. The time that the data on the sensitive area of each stream is stored is counted, and in response to the time that the data on the sensitive area of the stream S is stored exceeding the specified threshold, padding data is generated for the stream S.
[0103] Figure 7 Shows a flowchart of data padding for an open physical block according to still another embodiment of the present application.
[0104] In response to obtaining a read command (710), it is identified whether the read command is to access a concerned area of an open physical block (720). If the read command accesses the concerned area of the open physical block, a first counter representing the number of times the concerned area of the open physical block has been read is incremented to accumulate the number of times the concerned area of the open physical block has been read (730). If the number of times the concerned area of the open physical block has been read exceeds a specified threshold TH1 (740), padding data P1 is generated, and the generated padding data P1 is written to the unprogrammed area of the physical block to which the concerned area belongs (750), and the specified threshold TH1 is also subtracted from the first counter (760). Optionally, in response to generating the padding data P1, the specified threshold TH2 is also subtracted from a second counter.
[0105] As an example, the size of the padding data P1 is associated with the specified threshold TH1.
[0106] In response to the passage of time (715), the second counter is incremented according to the amount of time elapsed (745) so that the second counter represents the length of time that data on the sensitive area of the open physical block has been stored. In response to receiving a user write command (or garbage collection operation, log operation) to write data to the open physical block (725), the second counter that records the passage of time corresponding to the open physical block is cleared (735).
[0107] If the length of time that data on the sensitive area of the open physical block represented by the second counter has been stored exceeds a specified threshold TH2 (755), padding data P2 is generated, and the generated padding data P2 is written to the unprogrammed area of the physical block to which the concerned area belongs (760), and the specified threshold TH2 is also subtracted from the second counter (770). Optionally, in response to generating the padding data P2, the specified threshold TH1 is also subtracted from the first counter.
[0108] As an example, the size of the padding data P2 is associated with the specified threshold TH2.
[0109] One or more embodiments of the present application are also applicable to 2D flash memory and other non-volatile storage media.
[0110] It should be understood that each block of the block diagrams and flowcharts, and combinations of blocks in the block diagrams and flowcharts, can be implemented respectively by various devices including computer program instructions. These computer program instructions can be loaded onto a general-purpose computer, a special-purpose computer, or other programmable data control devices to generate a machine, so that the instructions executed on the computer or other programmable data control devices create means for implementing the functions specified in one or more flowchart blocks.
[0111] The blocks of block diagrams and flowcharts support combinations of means for performing specified functions, combinations of steps for performing specified functions, and combinations of program instruction means for performing specified functions. It should also be understood that each block of block diagrams and flowcharts, and combinations of blocks of block diagrams and flowcharts, can be implemented by a dedicated computer system based on hardware for performing the specified functions or steps, or by a combination of dedicated hardware and computer instructions.
[0112] At least a portion of the different blocks, operations, and techniques described above can be performed by using hardware, a control device executing firmware instructions, a control device executing software instructions, or any combination thereof. When performed in hardware, the hardware can include one or more discrete components, integrated circuits, application-specific integrated circuits (ASICs), and the like. It should be understood that the present invention can be implemented in pure software, pure hardware, firmware, and various combinations thereof. The hardware can be, for example, a control device, an application-specific integrated circuit, a large-scale integrated circuit, and the like.
[0113] Although the examples referred to in the present application are described, they are for illustrative purposes only and not limitations on the present application. Changes, additions, and / or deletions to the embodiments can be made without departing from the scope of the present application.
[0114] As described above, the above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed in the present application can easily think of changes or substitutions, which should all be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for a storage device, comprising: generating first padding data to be written to the open physical block in response to the number of times the first region of the open physical block is read exceeding a first threshold; generating second padding data to be written to the open physical block in response to the time that the data in the second region of the open physical block is stored in the second region exceeding a second threshold; the first region is a region of interest of the open physical block, located in a specified region forward from the last programmed page of the open physical block; the second region is a sensitive region of the open physical block, located in a specified region forward from the last programmed page of the open physical block, and the first region includes the second region; updating the positions of the first region and the second region in response to a user writing data to the open physical block.
2. The method according to claim 1, wherein the size of the first padding data is associated with the first threshold. If the size of the second region of the open physical block is N times the size of the first padding data, where N is a positive integer, then N times the first threshold is not greater than the number of times the first region can be read before the data in the second region is damaged.
3. The method according to claim 1 or 2, wherein the size of the first padding data is the minimum unit for the storage device to write data, and the size of the second padding data is the minimum unit for the storage device to write data.
4. The method according to claim 1 or 2, wherein Also included are: incrementing a first counter in response to the first region of the open physical block being read, such that the first counter represents the number of times the first region of the open physical block is read.
5. The method according to claim 4, wherein Also included are: decrementing the first counter by the first threshold in response to writing the first padding data to the open physical block.
6. The method according to claim 1 or 2, wherein the size of the second padding data is associated with the second threshold. If the size of the second region of the open physical block is M times the size of the second padding data, where M is a positive integer, then M times the second threshold is not greater than the time that the data in the second region can be reliably stored before the data in the second region is damaged.
7. The method according to claim 1 or 2, wherein Further included are: incrementing a second counter in response to the time that the data in the second region of the open physical block is stored in the second region exceeding the second threshold, such that the second counter represents the time that the data in the second region of the open physical block is stored in the second region.
8. The method according to claim 7, wherein Further comprising: decrementing the second counter by the second threshold in response to writing the second padding data to the open physical block.
9. The method according to claim 1 or 2, further comprising: resetting the time that the data in the second region of the open physical block is stored in the second region in response to a user writing data to the open physical block.
10. The method according to claim 1 or 2, wherein the size of the first padding data is the size of the second region, and the size of the second padding data is the size of the second region.
11. The method according to claim 1 or 2, wherein Also included are: writing the first padding data to the open physical block.
12. The method according to claim 1 or 2, wherein the storage device includes a plurality of open physical blocks, and in response to the number of times the first region of the first open physical block among the plurality of open physical blocks is read exceeding a first threshold, first padding data to be written to the first open physical block is generated.
13. The method according to claim 1 or 2, wherein the storage device includes one or more large blocks; in response to the number of times the first region of the first open large block is read exceeding a second threshold, first padding data to be written to the first open large block is generated.
14. The method according to claim 13, wherein the size of the first region of the first open large block is the sum of the sizes of the first regions of all physical blocks of the first open large block; and the size of the second region of the first open large block is the sum of the sizes of the second regions of all physical blocks of the first open large block.
15. The method according to claim 13, wherein the size of the first region of the first open large block is the sum of the sizes of the first regions of all physical blocks that do not store RAID parity data of the first open large block; and the size of the second region of the first open large block is the sum of the sizes of the second regions of all physical blocks that do not store RAID parity data of the first open large block.
16. The method according to claim 13, wherein in response to the time that the data in the second region of the first open large block is stored in the second region exceeding a third threshold, second padding data to be written to the first open large block is generated.
17. The method according to claim 1 or 2, wherein the storage device is a multi-stream storage device, and streams are bound to one or more large blocks; in response to the number of times the first region corresponding to the first stream is read exceeding a fourth threshold, first padding data is generated for the first stream.
18. A storage device, comprising a memory, a processor, and a program stored on the memory and executable on the processor, wherein when the processor executes the program, the method according to any one of claims 1-17 is implemented.
Citation Information
Patent Citations
Method and device for managing physical blocks in solid state disk
CN108874309A
Reducing read disturb effect on partially programmed blocks of non-volatile memory
US10115472B1