Data writing method and apparatus for resource blocks, device and storage medium
By determining the open time threshold of word lines based on the test data and characteristic data of each resource block in ZNS SSD, garbage collection and write amplification problems in the prior art due to dependence on the worst word line threshold are solved, and more efficient resource block management is achieved, and the performance and life of SSD is improved.
Patent Information
- Application Number
- PCT/CN2024/135060
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-05
- Filing Date
- 2024-11-27
- Publication Date
- 2025-06-12
AI Technical Summary
In ZNS SSD, the prior art relies on the worst wordline threshold in resource block open management, resulting in stricter block opening time, increasing garbage collection and write amplification, affecting SSD performance and lifetime.
By obtaining test data and characteristic data for each resource block in the SSD, determine the word line position and the opening time threshold for each word line, reducing the impact of garbage collection and write amplification.
It extends the opening time of resource blocks, reduces the frequency of garbage collection and write amplification, improves SSD performance, reduces power consumption and extends service life.
Smart Images

Figure CN2024135060_12062025_PF_FP_ABST
Abstract
Description
Method, device, equipment and storage medium for writing data into resource block
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed on December 5, 2023, with application number 202311667638.6 and invention name “A method, apparatus, device and storage medium for writing data to a resource block”. The entire contents of that application are incorporated by reference into this application. Technical Field
[0003] The present disclosure relates to the field of storage technology, and in particular to a method, apparatus, device, and storage medium for writing data into a resource block. Background Art
[0004] High-density non-volatile flash memory (NAND) technology has transitioned from 2D to 3D. 3D NAND technology adds multiple layers of memory cells to improve the die density within each layer. As the number of layers increases, the size of the resource blocks within each layer increases, and consequently, the wordlines (WLs) within each resource block also increase.
[0005] NVMe Zone Namespace (ZNS) SSD (Solid State Drive) is a new SSD technology that allows communication and transmission between the host and SSD (such as NAND). The ZNS command set allows host data to be transferred to SSD media through the SSD, thereby minimizing write amplification (WA) and limiting garbage collection (GC). However, to compensate for host data movement between different applications, ZNS needs to open more resource blocks and keep the blocks open longer.
[0006] In current resource block open management, the resource block open time threshold is often designed based on the worst word line (WL), which includes variations between NAND flash batches and chips. The resource block open time needs to cover the worst word line to ensure that the SSD does not lose data on any resource block. The threshold under this design then requires a stricter block open time to ensure the reliability of the storage device. However, a stricter block open time setting will result in more frequent filling of pages on the word line to close the resource block. Frequent filling of pages on the word line will lead to garbage collection and write amplification, which will affect the performance and life of the SSD hard drive storage. Summary of the Invention
[0007] The present disclosure provides a method, apparatus, device, and storage medium for writing data to a resource block. This method reduces the impact of garbage collection and write amplification by determining word line positions and an open time threshold for each word line in a resource block in a NAND flash memory batch. Specifically, the following technical solutions are disclosed:
[0008] In a first aspect, the present disclosure provides a method for writing data into a resource block, the method comprising:
[0009] Acquiring test data for each resource block in a solid-state drive (SSD), and acquiring an association relationship determined based on characteristic data in the SSD, wherein the test data includes a number of errors (FBC) for different pages on at least one word line in each resource block, and the association relationship represents a relationship between timestamps of different erase / write cycles in the SSD and each word line;
[0010] determining a weight value of a target word line according to the FBC of the different pages, the target word line being one of the at least one word line;
[0011] Calculating an open time threshold of the target word line according to the weight value of the target word line and the relationship represented by the Boolean equation;
[0012] When data needs to be written to the target word line, the data is written according to the current open time of the target word line and the open time threshold.
[0013] In a second aspect, the present disclosure provides a device for writing data into a resource block, the device comprising:
[0014] an acquisition module, configured to acquire test data of each resource block in a solid-state drive (SSD), and to acquire an association relationship determined based on characteristic data in the SSD, wherein the test data includes a number of errors (FBC) of different pages on at least one word line in each resource block, and the association relationship represents a relationship between a timestamp of different erase / write cycles in the SSD and each word line;
[0015] a determination module, configured to determine a weight value of a target word line according to the FBCs of the different pages, the target word line being one of the at least one word line;
[0016] a calculation module, configured to calculate an open time threshold of the target word line according to the weight value of the target word line and the association relationship;
[0017] The writing module is used for writing data according to the current open time of the target word line and the open time threshold when data needs to be written to the target word line.
[0018] In a third aspect, the present disclosure provides an electronic device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the data writing method of the resource block described in the first aspect above by executing the computer instructions.
[0019] In addition, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, and the computer instructions are used to enable a computer to execute the data writing method for the resource block described in the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0021] FIG1 is a schematic diagram of the structure of a partitioned namespace solid-state drive provided by an embodiment of the present disclosure;
[0022] FIG2 is a schematic diagram of the structure of a word line in a resource block provided by an embodiment of the present disclosure;
[0023] FIG3 is a flow chart of a method for writing data into a resource block provided by an embodiment of the present disclosure;
[0024] FIG4 is a schematic diagram showing the relationship between the number of errors FBC and the page provided by an embodiment of the present disclosure;
[0025] FIG5 is a graph of a Boolean equation provided by an embodiment of the present disclosure;
[0026] FIG6 is a flow chart of a method for writing data provided by an embodiment of the present disclosure;
[0027] FIG7 is a schematic diagram of setting a resource block open time threshold according to an embodiment of the present disclosure;
[0028] FIG8 is a structural block diagram of a device for writing data into a resource block provided by an embodiment of the present disclosure;
[0029] FIG9 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] To make the purpose, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present disclosure.
[0031] It should be noted that, in this embodiment, the terms "first" and "second" are used only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may explicitly or implicitly include at least one of such features. In the description of this application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. In the description of this application, the meaning of "several" is at least one, such as one, two, etc., unless otherwise clearly and specifically defined.
[0032] First, the application scenarios and technical terms of the technical solutions of the embodiments of the present disclosure are introduced.
[0033] The technical solution disclosed in the present invention can be applied to a ZNS (Zone Namespace) solid-state drive SSD. As shown in Figure 1, ZNS is developed based on OC (Open Channel) SSD. It is used to realize the migration of partition FTL (Flash Translation Layer) from the inside of SSD (Solid State Drive) to the upper host side (host side), and open the inside of SSD to the host side. In this way, users can have their own specific FTL more flexibly according to their needs. The cost is that the software architecture must be redesigned, the cost is very high, and the technical strength requirements of users are also very high. The ZNS protocol will standardize part of NVMe 2.0 to meet industry needs. In comparison, the ZNS SSD specification is more standardized, the ecological environment is more friendly, and the software architecture is simplified. Users can more easily develop specific software according to their own scenario requirements.
[0034] Figure 1 shows a schematic diagram of the ZNS architecture, which includes the application layer, host, and SSD. The application layer includes at least one service application. Figure 1 shows three service applications, but it can actually include more or fewer. Below the application layer is the host side, which includes the service application engine, data layout / garbage collection in the partition FTL, and the host ZBD (zone block device) driver. The host side connects to the hard drive SSD through the zone partition.
[0035] SSDs include NVMe, an FTL for error handling and wear leveling, and media management. Media management connects to NAND flash memory, a type of electrically erasable programmable read-only memory (EEPM). NAND contains at least one resource block, each of which stores data.
[0036] As the size of data resource blocks increases and the amount of data increases, more / longer open times are required for each resource block in ZNS SSD to obtain more technical benefits. Therefore, on the new 3D NAND technology, setting the open time for writing data to each resource block is becoming more and more critical. Currently, the method of setting the open time threshold for each word line in each resource block is to cover the worst word line to ensure that the SSD does not lose data on any resource block. In this case, the time each resource block is closed or remains open depends on the preset time threshold of each resource block, such as 24 hours or 48 hours. If the worst time threshold, such as 24 hours or 48 hours, is followed, WA (Write Amplification) and GC (garbage collection) will result, thereby affecting the performance and life of the SSD hard drive storage and increasing power consumption.
[0037] In order to solve the above technical problems, an embodiment of the present disclosure provides a method for writing data to a resource block. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0038] The method provided in this embodiment can be executed by an electronic device including an SSD structure, such as a personal computer or a mobile terminal, or by an SSD controller. The structure of the electronic device can be as shown in FIG1 . In the NAND shown in FIG1 , the structure of each resource block is shown in FIG2 .
[0039] In Figure 2 , each resource block includes at least one relatively independent wordline (WL), such as wordlines WL0, WL1, WL2, ..., WL N, etc. Each wordline WL is used to store data, that is, data is written to each wordline in each resource block. In addition, each resource block also includes bitlines (BL).
[0040] Each word line WL includes at least one page. In this embodiment, it is assumed that each WL includes three pages. For example, word line WL 0 includes page 0, page 1, and page 2. In addition, other WLs may include more or fewer pages.
[0041] The method provided in this embodiment is described in detail below.
[0042] This embodiment provides a method for writing data into a resource block, which includes two processes: one is a word line open time configuration phase, and the other is a word line open time usage phase.
[0043] The first part, the "configuration phase," primarily involves determining the impact of batch-to-batch and chip-to-chip drive variations on the open time of each resource block based on manufacturing test data. A Boolean equation is then defined based on characteristic data from the SSD development process. Finally, constraints are set based on the Boolean equation to determine the open time threshold for the word line on each resource block during the lifecycle.
[0044] Specifically, referring to FIG3 , a method for writing data into a resource block provided in this embodiment includes:
[0045] Step S101 : obtaining test data of each resource block in a solid state drive (SSD), and obtaining an association relationship determined based on characteristic data in the SSD.
[0046] The test data includes the FBC (fail bit count) of different pages on at least one wordline in each resource block. The bit count function is used to count the number of 1s in a binary bit of a number. Specifically, during SSD production testing, the manufacturing firmware obtains the FBC of each page in each resource block by writing data to NAND flash memory and then reading it from it. As shown in Figure 4, three FBC curves are shown, each representing the FBC of a resource block on an SSD for different pages. Specifically, the relationship between different pages and FBC can be represented by an FBC histogram.
[0047] Assume that a single unit die before packaging is called a die. Figure 4 shows the relationship between the page and FBC for resource blocks p, n, and m in three SSDs: SSD k, SSD j, and SSD i. Each resource block contains N pages, numbered from page 0 to page N-1. As shown in Figure 4, the vertical axis represents the FBC measurement of each page in the resource block read after writing during manufacturing testing, and the horizontal axis represents the page number, from 0 to N-1, for a total of N pages.
[0048] One implementation of step S101 is to perform a hardware test on each resource block in the solid-state drive (SSD), determine the FBC of different pages corresponding to each word line in at least one word line in each resource block, and obtain the test data based on the FBC. Each WL corresponds to three pages, and a page size of 4 KB x 4 means that one page occupies 16 KB, so each WL occupies 48 KB.
[0049] The SSD controller transmits the FBC of each page to the host through the ECC (Error Checking and Correcting) engine. For TLC (Trinary level cell) blocks, each storage unit can store 3 bits of information. Among them, TLC is the most common flash memory particle and is widely used. Its erase and write life can reach about 1000-3000 times. Compared with SLC (single level cell) and MLC (Multi Level Cell), TLC has lower speed, lower quality and life, but its cost is lower and can meet the needs of daily life. It has a high cost performance and is the mainstream chip in the current mid-to-high-end market.
[0050] In addition, in this step, a Boolean equation represents the relationship between the time stamp of different program erase (PE) cycles in the SSD and each word line.
[0051] Step S102 : determining a weight value of a target word line according to the FBCs of the different pages, where the target word line is one of the at least one word line.
[0052] Specifically, one implementation involves first acquiring a sampling database that records the correspondence between a number of pages included in a target wordline and the FBC of each page. This correspondence can be represented by recording a distribution curve, where all points on the distribution curve correspond to a range of weight values, such as [0, 1].
[0053] Then, based on the correspondence between the FBC of each page on the target word line and the sampling database, the weight value of the target word line is determined. Specifically, the SSD where the current word line is located is determined based on the correspondence between the page and the FBC on each curve and the FBC in the test data. Finally, based on the weight value assigned to each SSD in the sampling database, the weight value corresponding to the word line WL to which data is currently being written is determined.
[0054] The host assigns a weight to each SSD. For example, the host assigns a weight value Wi to SSD i, assuming Wi = 0.5, a weight value Wj = 0.7 to SSD j, and a weight value Wk = 1 to SSD k. These weight values are written back to each SSD during manufacturing testing, and the weight of each drive is stored in NAND flash memory as a parameter used in step S103 to determine the open time of the word line WL on the resource block of each drive, such as the open time threshold.
[0055] In this embodiment, assuming that the corresponding SSD determined according to the FBC is SSD j, then the weight value Wj in the above-mentioned sampling database can be used to determine that the weight of the current target word line is Wj=0.7.
[0056] Step S103 : calculating an open time threshold of the target word line according to the weight value of the target word line and the association relationship.
[0057] Among them, this association relationship represents the relationship between the timestamps of different erase / write cycles and each word line. Since data in the SSD is continuously erased and written, this association relationship records the correspondence between the open time and WL when the erase reaches a certain level under PE cycles. The above association relationship can be determined based on the open time of the resource block based on SSD development and NAND flash memory characteristics. Specifically, during the SSD development process, the new NAND flash memory needs to be characterized and qualified. During the resource block characterization process, data is written to different WLs of each resource block, so the open time threshold corresponding to the WL of each resource block is set.
[0058] Optionally, the above association relationship can be expressed by a Boolean equation.
[0059] Step S103 specifically includes determining a timestamp corresponding to the target word line based on the weight value of the target word line and the relationship between timestamps of different erase / write cycles in the SSD and each word line, and then recording the timestamp as the open time threshold. Specifically, one implementation method is to calculate and determine the open time threshold using the relationship: T = f(N) × W.
[0060] Where T represents the timestamp of the target wordline, i.e., the open time threshold; W represents the weight value; and N represents the number of wordlines in the resource block, where N ≥ 1 and is a positive integer. This association can be expressed as a Boolean equation, represented by f(N). Furthermore, T represents the open time threshold of the resource block containing the last wordline WL N programmed with data.
[0061] For example, Figure 5 shows the Boolean equations for two SSDs at different PEs. The upper curve represents the Boolean equation f(N) when PE = 1K, while the lower curve represents the Boolean equation f(N) when PE = 10K. Calculating f(N) × W yields the corresponding open time thresholds for different word lines.
[0062] Step S104 : when data needs to be written into the target word line, the data is written according to the open time threshold of the target word line.
[0063] Specifically, step S104 is the application stage of configuring the open time threshold of each WL. As shown in FIG6 , step S104 specifically includes:
[0064] Step S1041: obtaining the current open time of the target word line.
[0065] Assume that the first word line WL1 is a word line to be currently written into the resource block, and the word line to be written is known in advance by the controller.
[0066] Step S1042: Determine whether the current open time is greater than the open time threshold of the target word line.
[0067] If yes, execute step S1043; if no, execute step S1044.
[0068] Step S1043: If the time is greater than the open time threshold, the write switch to the target word line is turned off to stop writing data to the target word line.
[0069] For example, the current open time of the first word line WL1 is t1, and the open time threshold configured for the first word line WL1 is t2. Comparing t1 and t2, if t1>t2, it is determined that the open time of WL1 has exceeded the preset open time threshold t2, and the transistor of the memory cell connected to the first word line WL1 is turned off, stopping data writing and storage.
[0070] Step S1044: If the time is less than or equal to the open time threshold, continue to perform the data writing operation on the target word line.
[0071] Specifically, the transistor of the memory cell connected to the first word line WL1 is turned on, data is written into the memory cell connected to the first word line WL1, and the transistor remains turned on until the opening time threshold t2 of the first word line is reached, and then turned off, where t2 is greater than t1.
[0072] Optionally, in another example, the above steps S1041 to S1044 are executed in a loop, for example, data is written on word line WL 0 in resource block 0, data is written on word line WL 1 in resource block 1, data is written on word line WL N-1 in resource block N-1, and data is written on word line WL N in resource block N, until all the data are written into the NAND flash memory, and the flash memory chip is baked at a high temperature to accelerate charge loss.
[0073] The controller reads data from each block of the last WL every hour. For example, the test program reads data on WL 0 from resource block 0, data written on WL 1 from resource block 1, data on WL N-1 from resource block N-1, and data on WL N from resource block N. When the FBC reaches the ECC hard decode threshold, the WL time is saved. This process is repeated to obtain data for PE cycles of 1K, 3K, 5K, 7K, and 10K. Each PE cycle generates a Boolean equation, T = f(N), which controls whether to continue writing data to the target word line based on the open time threshold determined above.
[0074] The method provided in this embodiment uses test data from the manufacturer and characteristic data from SSD development to determine the open time threshold of each word line in the resource block. Since the time open threshold is determined based on the hard disk SSD test data and the correlation relationship, it does not rely on the time open threshold of the worst word line setting. Therefore, compared with the method of using the worst word line setting method, the time open threshold of each word line determined by this method can extend the open time of the resource block, thereby effectively reducing the impact of garbage collection and write amplification, improving the performance of the SSD system, reducing power consumption and extending the service life.
[0075] For example, as shown in Figure 7, the original time open threshold is set to 5 hours (hours) based on the worst-case word line assumption point a2. Because it is based on the minimum value (trough) of the time threshold curve for the entire SSD, it is set according to t2 = 5 hours. If the current target word line open time exceeds 5 hours, for example, 6 hours, the write data operation must be disabled. According to the method of this embodiment, the time open threshold of the target word line a1 is set to 10 hours, not the minimum value (5 hours). Therefore, if the current open time is 6 hours, 4 hours of data can still be written. Compared with the previous method of disabling writes at 5 hours, this method extends the word line data write time, thereby effectively reducing GC and WA, especially for data writing of multiple resource blocks, significantly improving overall system performance and reducing power consumption.
[0076] In addition, the Boolean equation used in this method is determined based on the previous word line WL, thereby reducing table lookup time; and, different Boolean equations are determined using the PE cycle range to more accurately determine the maximum resource block open time, thereby ensuring the reliability of the open block data.
[0077] Optionally, in another implementation of this embodiment, after the above step S104, the method further includes: when the word lines on the resource block are full of data, the data of the resource block can be moved. Specifically, it includes:
[0078] When all word lines in the target resource block where the target word line is located are fully written with data, the current data retention time of the target word line is obtained; a determination is made as to whether the current data retention time is greater than a retention time threshold; if so, the data on the target resource block is moved to another resource block. The target word line can be any word line in the target resource block, such as the last word line WL.
[0079] The current data retention time of the target word line is determined by the FBC test for each page described above. The specific process is the same as the process for obtaining the current open time of the target word line in step S1041. (See step S1041 above, and this embodiment will not be further described here.) Furthermore, the retention time threshold, also known as time retention, can also be customized by the system or user. This retention time threshold is used to detect the retention time of each word line and determine whether to migrate data to the resource block based on the retention time.
[0080] If the retention time threshold is exceeded, the data can be updated, that is, the data on the resource block can be moved. If the retention time threshold is not exceeded, the data on the resource block can continue to be saved until the retention time threshold is reached, and then the data in the resource block can be moved.
[0081] Before data is moved, this method compares the data retention time on the word line with the retention time threshold. The data can be moved only when the retention time threshold is exceeded. If the data in the resource block is not moved, the data in the resource block will be written on the word line for a long time. Since the data is not the latest data, the data is unreliable. In this embodiment, data is moved from the target resource block to another resource block through periodic triggering, ensuring that the data stored on the target word line is new data, thereby improving data reliability.
[0082] This embodiment also provides a device for writing data to a resource block. The device is used to implement the above-mentioned embodiments and preferred implementations, and the details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0083] This embodiment provides a data writing device for a resource block, as shown in Figure 8, the device includes: an acquisition module 801, a determination module 802, a calculation module 803 and a writing module 804. In addition, it may also include other more or fewer modules, which is not limited by this embodiment.
[0084] Among them, the acquisition module 801 is used to obtain test data of each resource block in the solid-state drive (SSD), and to obtain an association relationship determined based on characteristic data in the SSD, wherein the test data includes the number of errors FBC of different pages on at least one word line in each resource block, and the association relationship represents the relationship between the timestamps of different erase and write cycles in the SSD and each word line.
[0085] The determination module 802 is configured to determine a weight value of a target word line according to the FBCs of the different pages, where the target word line is one of the at least one word line.
[0086] The calculation module 803 is configured to calculate an open time threshold of the target word line according to the weight value of the target word line and the association relationship.
[0087] The writing module 804 is configured to write data according to the current open time of the target word line and the open time threshold when data needs to be written to the target word line.
[0088] Optionally, in a possible implementation of this embodiment, the acquisition module 801 is specifically configured to perform a hardware test on each resource block in the solid-state drive (SSD), determine at least one word line in each resource block, and obtain the test data based on the FBC corresponding to each word line. Each word line corresponds to an FBC of a different page.
[0089] Optionally, in another possible implementation of this embodiment, the determination module 802 is specifically configured to obtain a sampling database and determine the weight value of the target word line based on the corresponding relationship between the FBC of each page on the target word line and the sampling database. The sampling database records the corresponding relationship between at least one page included in the target word line and the FBC of each page.
[0090] Optionally, in another possible implementation of this embodiment, the calculation module 803 is further used to determine the timestamp corresponding to the target word line based on the weight value of the target word line and the relationship between the timestamp of different erase and write cycles in the SSD and each word line, and record the timestamp as the open time threshold.
[0091] Among them, the relationship is: T = f(N) × W
[0092] Wherein, T represents the open time threshold of the target word line, f(N) represents a Boolean equation, W represents a weight value, N represents the number of word lines, and N≥1 and is a positive integer.
[0093] Optionally, in another possible implementation of this embodiment, the write module 804 is specifically used to obtain the current open time of the target word line; determine whether the current open time is greater than the open time threshold of the target word line; if so, turn off the write switch to the target word line and stop writing data to the target word line; if not, continue to turn on the write switch to perform the data write operation on the target word line.
[0094] Optionally, in another possible implementation of this embodiment, the acquisition module 801 is further configured to acquire the current data retention time of the target word line when all word lines on the target resource block where the target word line is located are fully written with data.
[0095] The device further includes: a comparison module and a transmission module, which are not shown in FIG8 , wherein the comparison module is configured to determine whether the current data retention time is greater than a retention time threshold.
[0096] The transmission module is configured to move the data on the target resource block to another resource block when the comparison module determines that the current data retention time is greater than the retention time threshold after comparison.
[0097] The data writing device provided in this embodiment can determine the open time threshold of the word line to which data is to be written in the current resource block based on SSD test data and characteristic data in the SSD. Since the time open threshold is determined based on the hard disk SSD test data and the association relationship, it does not depend on the time open threshold set by the worst word line. Therefore, compared with the method of setting the worst word line, this method determines the time open threshold of each word line, which can extend the open time of the resource block, thereby effectively reducing the impact of garbage collection and write amplification, improving the performance of the SSD system, reducing power consumption and extending the service life.
[0098] In addition, the device also reduces the resource block size of future NAND flash memory architectures. As the number of resource blocks in NAND increases, time open thresholds can be set for word lines on more resource blocks, allowing more open blocks to write data within the time open threshold, thereby improving the overall SSD system performance and accommodating more ZNS applications and services.
[0099] The data writing device of the resource block in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0100] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0101] An embodiment of the present disclosure further provides an electronic device having the data writing device for the resource block shown in FIG8 .
[0102] Please refer to Figure 9, which is a structural diagram of an electronic device provided by an optional embodiment of the present disclosure. As shown in Figure 9, the electronic device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses and can be installed on a common motherboard or in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphic information on an external input / output device (such as a display device coupled to the interface).
[0103] In some alternative embodiments, multiple processors and / or multiple buses can be used with multiple memories and multiple storages if desired. Similarly, multiple electronic devices can be connected, with each device providing a portion of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). FIG9 shows a single processor 10 as an example.
[0104] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.
[0105] The memory 20 stores instructions that can be executed by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0106] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created based on the use of an electronic device presented by a small program landing page, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0107] The memory 20 may include volatile memory, such as random access memory; non-volatile memory, such as flash memory, a hard disk, or a solid-state drive; or a combination of the aforementioned types of memory. In this embodiment, the memory 20 includes an SSD.
[0108] The electronic device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30, and the output device 40 may be connected via a bus or other means, with FIG9 taking the bus connection as an example.
[0109] The input device 30 can receive input digital or character information and generate key signal input related to user settings and function control of the electronic device, such as a touch screen, a keypad, a mouse, a trackpad, a touch pad, an indicator stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 can include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor). The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display, and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0110] The electronic device also includes a communication interface for the electronic device to communicate with other devices or a communication network.
[0111] The present disclosure also provides a computer-readable storage medium. The methods according to the present disclosure can be implemented in hardware, firmware, or as computer code that can be recorded on a storage medium, or downloaded over a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. The methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory.
[0112] It can be understood that a computer, processor, microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by the computer, processor or hardware, the method shown in the above embodiment is implemented.
[0113] Although the embodiments of the present disclosure have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for writing data into a resource block, the method comprising: Acquire test data of each resource block in a solid state drive (SSD), and acquire an association relationship determined based on characteristic data in the SSD, wherein the test data includes a number of errors FBC of different pages on at least one word line in each resource block, and the association relationship is a relationship between timestamps of different erase and write cycles in the SSD and each word line; determining a weight value of a target word line according to the FBC of the different pages, the target word line being one of the at least one word line; Calculating an open time threshold of the target word line according to the weight value of the target word line and the association relationship; When data needs to be written to the target word line, the data is written according to the current open time of the target word line and the open time threshold.
2. The method according to claim 1, wherein the step of obtaining test data of each resource block in the solid state drive (SSD) comprises: Performing a hardware test on each resource block in the solid state drive SSD to determine the FBC of different pages corresponding to each word line on at least one word line in each resource block; The test data is obtained according to the FBC corresponding to each word line.
3. The method according to claim 2, wherein determining the weight value of the target word line according to the FBC of the different pages comprises: Acquire a sampling database, wherein the sampling database records a correspondence between at least one page included in the target word line and the FBC of each page; The weight value of the target word line is determined according to the FBC of each page on the target word line and the corresponding relationship in the sampling database.
4. The method according to claim 3, wherein the step of calculating the open time threshold of the target word line according to the weight value of the target word line and the association relationship comprises: According to the weight value of the target word line and the relationship between the timestamps of different erase / write cycles in the SSD and each word line, the timestamp corresponding to the target word line is determined, and the timestamp is marked as the open time threshold.
5. The method according to any one of claims 1 to 4, wherein writing data according to the current open time of the target word line and the open time threshold comprises: Obtaining a current open time of the target word line; Determining whether the current open time is greater than an open time threshold of the target word line; If yes, the write switch to the target word line is closed to stop writing data to the target word line.
6. The method according to claim 5, wherein the method further comprises: If it is less than or equal to the open time threshold, the write switch continues to be turned on to perform a data write operation on the target word line.
7. The method according to any one of claims 1 to 4, wherein the method further comprises: When all word lines on the target resource block where the target word line is located are fully written with data, obtaining the current data retention time of the target word line; Determine whether the current data retention time is greater than a retention time threshold; If yes, the data on the target resource block is moved to another resource block.
8. A device for writing data into a resource block, the device comprising: An acquisition module, used for acquiring test data of each resource block in a solid state drive SSD, and acquiring an association relationship determined based on characteristic data in the SSD, wherein the test data includes a number of errors FBC of different pages on at least one word line in each resource block, and the association relationship is a relationship between a timestamp of different erase and write cycles in the SSD and each word line; a determination module, configured to determine a weight value of a target word line according to the FBCs of the different pages, the target word line being one of the at least one word line; A calculation module, configured to calculate an open time threshold of the target word line according to the weight value of the target word line and the association relationship; The writing module is used for writing data according to the current opening time of the target word line and the opening time threshold when data needs to be written to the target word line.
9. An electronic device, comprising a memory and a processor, wherein the memory and the processor are connected; The memory stores computer instructions; The processor executes the method for writing data into a resource block according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, wherein the computer-readable storage medium has computer instructions stored thereon, The computer instructions are used to enable a computer to execute the method for writing data into a resource block according to any one of claims 1 to 7.
Citation Information
Patent Citations
Data writing method and device of NAND flash memory, storage medium and storage equipment
CN114822650A
Method and device for improving read-write performance of hard disk, hard disk and storage medium
CN116301631A
Resource block data writing method and device, equipment and storage medium
CN117632033A
Preserving blocks experiencing program failure in memory devices
US20230197186A1