Method and device for determining threshold value of number of times of programming suspension, equipment and medium
By dynamically determining the programming suspension count threshold, combined with the programming type and the number of suspensions, the problem of insufficient flexibility and accuracy of the programming suspension count threshold in storage devices is solved, and more efficient storage operations are achieved.
Patent Information
- Application Number
- CN202511188819.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-08-25
AI Technical Summary
In existing storage technologies, the programming suspension count threshold has low flexibility and accuracy, which may result in data block corruption or read requests failing to complete in a timely manner.
By obtaining the programming type and the number of suspension times of the target word line, combining the first preset threshold and the remaining programming suspension times, the maximum programming suspension times threshold is dynamically determined. Considering the programming type and the overall situation of the data block, the suspension operation times threshold is flexibly adjusted.
The flexibility and accuracy of the programming suspend count threshold are improved, data block damage and read request delays are avoided, and the operating efficiency of the storage device is improved.
Smart Images

Figure CN120690265A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of storage technology, and in particular to a method, apparatus, device, and medium for determining a programming suspend count threshold. Background Art
[0002] In the field of storage technology, a storage device can include multiple data blocks. Each data block is composed of multiple layers of stacked memory cells. Read and write operations for a row of cells can be controlled by a word line. This involves applying a voltage to the cells via the word line, thereby activating or changing the charge state in the cells to read or write data. When a storage controller receives a write request, it can program one or more data blocks based on the write request.
[0003] While a storage controller is programming a data block, it may receive a read request for that data block. Since programming operations take longer, waiting for the program operation to complete before executing a read request will result in a longer wait time for the read request. Furthermore, the read request may be for a specific memory cell within the data block being programmed—for example, a memory cell in the row corresponding to the current wordline, or a memory cell in another row. For the former, the current wordline must be suspended to save the current programming state before the read operation is performed on that wordline. For the latter, although the wordlines are different, the memory cells within the data block are close together. Simultaneously applying voltage to both wordlines can cause interference between the memory cells, leading to data errors. Therefore, the programming operation on the current wordline must be suspended before the read operation is performed on that wordline. Furthermore, if programming is suspended frequently during a programming operation, this can affect programming progress. Therefore, a fixed programming suspension threshold is typically set for each wordline. This threshold specifies the maximum number of times a suspension operation can be performed on the currently active wordline when processing a write request. In this way, using this programming suspend count threshold as the upper limit to perform a suspend operation has poor flexibility and low accuracy. For example, if the fixed programming suspend count threshold is set to a large value, a large number of programming suspend times may cause data block corruption. If the fixed programming suspend count threshold is set to a small value, some read requests may not be completed in time during the current programming operation. Summary of the Invention
[0004] The present application provides a method, device, electronic device, storage medium, and program product for determining a programming suspension count threshold to solve the problem of low flexibility and accuracy of the programming suspension count threshold.
[0005] The present application provides a method for determining a programming suspension count threshold, the method comprising: Obtaining a programming type of a programming operation corresponding to a target word line and a first programming suspended count corresponding to a target data block, wherein the target data block is a data block in data blocks included in a storage device, and the target word line is any one of a plurality of word lines corresponding to the target data block; After determining that the first program suspended count is less than a first preset threshold, determining a remaining program suspended count corresponding to the target data block according to the first preset threshold and the first program suspended count, wherein the first preset threshold is used to indicate a maximum total program suspended count for all word lines of the target data block; According to the program type and the remaining program suspend times, a maximum program suspend times threshold is determined during a process of performing a program operation on a target data block using a target word line.
[0006] The present application also provides a device for determining a programming suspension count threshold, comprising: an acquisition module, configured to acquire a programming type of a programming operation corresponding to a target word line and a first programming suspended count corresponding to a target data block, wherein the target data block is a data block in data blocks included in the storage device, and the target word line is any one of a plurality of word lines corresponding to the target data block; A determination module is used to determine, after determining that the first programming has been suspended number of times is less than a first preset threshold, the remaining programming suspension number corresponding to the target data block based on the first preset threshold and the first programming has been suspended number, wherein the first preset threshold is used to indicate the maximum total programming suspension number of all word lines of the target data block; and determine, based on the programming type and the remaining programming suspension number, the maximum programming suspension number threshold in the process of programming the target data block using the target word line.
[0007] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned methods for determining a programming suspension number threshold when executing the computer program.
[0008] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned methods for determining the programming suspension number threshold are implemented.
[0009] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned methods for determining the programming suspension number threshold when the computer program is executed by a processor.
[0010] Through the present application, before using any word line of the target data block for a programming operation, the programming type of the current programming operation and the first programming suspension count corresponding to the target data block are first obtained. If it is determined that the first programming suspension count is less than the first preset threshold, it means that the number of suspension operations on the target data block has not reached the limit, and the target word line is allowed to be suspended during this programming operation. Further, in this case, the remaining programming suspension count corresponding to the target data block can be determined based on the first preset threshold and the first programming suspension count. In addition, considering that the degree of damage to the target data block caused by the suspension operation on the word line varies under programming operations of different programming types, when determining the maximum programming suspension count threshold corresponding to the target word line, the programming type and the remaining programming suspension count threshold can be combined to jointly determine the maximum programming suspension count threshold for the target word line. In this way, during each programming operation, the maximum programming suspension count threshold of the word line takes into account both the overall situation of the data block in which it is located (the remaining programming suspension count threshold) and the individual situation of the current programming operation (the programming type), so that the maximum programming suspension count threshold finally determined is more accurate and more flexible, which can avoid the problem of data block damage caused by a large programming suspension count threshold, and the problem of read requests not being completed in a timely manner due to a small programming suspension count threshold. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0012] Figure 1 A schematic diagram of the architecture of a storage device provided in an embodiment of the present application; Figure 2 A flowchart of a method for determining a programming suspension count threshold provided in an embodiment of the present application; Figure 3 A flowchart of a method for performing a suspend operation provided in an embodiment of the present application; Figure 4 A schematic diagram of the structure of a device for determining a programming suspension count threshold provided in an embodiment of the present application; Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0013] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0014] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0015] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0016] The method for determining the programming suspension number threshold provided in this application can be implemented by a storage device, such as Figure 1 As shown, a storage device may include a storage controller and multiple data blocks. Flash memory may include multiple data blocks. Each data block may include multiple rows of memory cells. When the storage controller performs programming or reading operations on the memory cells, it uses a single word line for the memory cells in the same row. A memory cell is used to store one or more bits of data. A memory cell storing one bit of data may be a single-level cell (SLC), while a memory cell storing multiple bits of data may be a dual-level cell (MLC), which has evolved to a triple-level cell (TLC), a quad-level cell (QLC), and so on. For example, the storage device may be a flash memory type storage device, and accordingly, the data block may be a flash memory block.
[0017] The embodiment of the present application provides a method for determining a programming suspend count threshold value, which can be executed by a storage controller, such as Figure 2 As shown, the specific processing steps of the method for determining the programming suspension number threshold may include: Step S201 : obtaining a programming type of a programming operation corresponding to a target word line and a first programming suspension count corresponding to a target data block.
[0018] The target data block is any one of the data blocks included in the flash memory, and the target word line is any one of the multiple word lines corresponding to the target data block.
[0019] Specifically, during the period when the storage controller performs programming operations on the target data block, it can use the word line corresponding to the target data block to perform programming operations on the storage cells in the target data block. The storage controller can perform programming operations of different programming types. Accordingly, each time a programming operation is initiated, the storage controller can first obtain the programming type corresponding to the target word line. In addition, since the current programming operation may be one of the multiple programming operations involved in the execution of a write request, that is, before the current programming operation, the storage controller may have performed programming operations on other storage cells in the target data block, and suspend operations (Suspend) may have been performed during these programming operations. Therefore, the storage controller can obtain the number of suspend operations that the storage controller has performed on the word lines in the target data block, that is, the number of first programming suspend operations mentioned above.
[0020] Step S202 : When it is determined that the first program suspension count is less than a first preset threshold, a remaining program suspension count corresponding to the target data block is determined according to the first preset threshold and the first program suspension count.
[0021] The first preset threshold may be used to indicate a maximum total program suspension times for all word lines of the target data block.
[0022] Specifically, to prevent physical damage to data blocks caused by suspend operations, the storage controller can pre-set a maximum total number of program suspend attempts for the target data block. Accordingly, when performing a programming operation using a target word line, the storage controller can determine in advance whether the first program suspend attempt count for the target data block is less than a first preset threshold. If so, this indicates that the number of suspend operations on the target data block has not reached the limit, and suspend operations on the target word line are permitted during this programming operation. Furthermore, the storage controller can determine the absolute value of the difference between the first preset threshold and the first program suspend attempt count as the remaining program suspend attempt count for the target data block.
[0023] Step S203 : determining a maximum threshold of program suspend times in a process of programming a target data block using a target word line according to the program type and the remaining program suspend times.
[0024] Specifically, due to the differences in the operating voltages used in programming operations of different programming types, the degree of damage to the target data block caused by the suspend operation on the word line is inconsistent under programming operations of different programming types. Therefore, the storage controller can combine the programming type and the number of suspend operations that can be performed on the target data block (that is, the remaining programming suspend times) to determine the maximum programming suspend times threshold that can be performed on the target word line in this programming operation (that is, the maximum programming suspend times threshold).
[0025] The method for determining the programming suspension count threshold of an embodiment of the present application is to first obtain the programming type of the current programming operation and the first programming suspension count corresponding to the target data block before using any word line of the target data block to perform a programming operation. If it is determined that the first programming suspension count is less than the first preset threshold, it means that the number of suspension operations on the target data block has not reached the limit, and the target word line is allowed to be suspended during this programming operation. Further, in this case, the remaining programming suspension count corresponding to the target data block can be determined based on the first preset threshold and the first programming suspension count. In addition, considering that the degree of damage to the target data block caused by the suspension operation on the word line varies under programming operations of different programming types, when determining the maximum programming suspension count threshold corresponding to the target word line, the programming type and the remaining programming suspension count threshold can be combined to jointly determine the maximum programming suspension count threshold for the target word line. In this way, during each programming operation, the maximum programming suspension count threshold of the word line takes into account both the overall situation of the data block in which it is located (the remaining programming suspension count threshold) and the individual situation of the current programming operation (the programming type), so that the maximum programming suspension count threshold finally determined is more accurate and more flexible, which can avoid the problem of data block damage caused by a large programming suspension count threshold, and the problem of read requests not being completed in a timely manner due to a small programming suspension count threshold.
[0026] In some optional implementations, in the above step S203, the memory controller may specifically determine the maximum program suspend count threshold of the target word line in the following two ways: Method 1: The above-mentioned programming type can be one of a coarse programming (Course Program) type, a fine programming (Fine Program) type, a mixed programming type, etc. The mixed programming type can be an SLC programming type or a TLC programming type, etc., that is, the programming operation of the mixed programming type includes coarse programming and fine programming. Accordingly, when the storage controller determines that the programming type is a coarse programming type, the minimum value of the programming suspend count threshold corresponding to the coarse programming type and the remaining programming suspend count is determined as the maximum programming suspend count threshold; or, when the storage controller determines that the programming type is a fine programming type, the minimum value of the programming suspend count threshold corresponding to the fine programming type and the remaining programming suspend count is determined as the maximum programming suspend count threshold; or, when the storage controller determines that the programming type is a mixed programming type, the minimum value of the programming suspend count threshold corresponding to the mixed programming type and the remaining programming suspend count is determined as the maximum programming suspend count threshold.
[0027] The program suspend count threshold corresponding to the mixed program type may be the sum of the program suspend count thresholds corresponding to the coarse program type and the fine program type, respectively.
[0028] Specifically, considering that program suspension causes different damage to memory cells under programming operations of different programming types, the storage controller can determine, based on the programming type of the target word line, a first program suspension count threshold corresponding to the programming type in the mapping relationship information between the programming type and the program suspension count threshold, and determine the minimum value between the remaining program suspension count and the first program suspension count threshold as the maximum program suspension count threshold. For example, when the programming type is determined to be a coarse programming type, the minimum value between the program suspension count threshold corresponding to the coarse programming type and the remaining program suspension count is determined as the maximum program suspension count threshold. Alternatively, when the programming type is determined to be a fine programming type, the minimum value between the program suspension count threshold corresponding to the fine programming type and the remaining program suspension count is determined as the maximum program suspension count threshold. Alternatively, when the programming type is determined to be a mixed programming type, the minimum value between the program suspension count threshold corresponding to the mixed programming type and the remaining program suspension count is determined as the maximum program suspension count threshold.
[0029] In this way, when the remaining number of program suspend times is less than the first program suspend times threshold, a smaller number of remaining program suspend times is selected as the maximum program suspend times threshold, so that the current programming operation is executed with the maximum number of program suspend times that the data block can support as the upper limit. Regardless of the programming type, the problem of data block damage caused by setting the first program suspend times threshold too high can be avoided. When the remaining number of program suspend times is greater than the first program suspend times threshold, the data block can accept a larger number of suspend operations. In this case, a smaller first program suspend times threshold is selected as the maximum program suspend times threshold. The first program suspend times threshold allowed by the current programming type is used as the maximum program suspend times threshold, so that the suspend operation can be executed in a timely manner in the current programming operation and the read request can be completed in a timely manner.
[0030] Method 2: The storage controller obtains a first programming suspension count threshold value corresponding to the programming type based on the programming type; obtains the number of remaining word lines of the uncompleted programming operation corresponding to the target data block; and determines a maximum programming suspension count threshold value based on the first programming suspension count threshold value, the number of remaining word lines, and the remaining programming suspension count.
[0031] Specifically, since there are still word lines that have not been programmed during the execution of the current write operation, that is, during the period of other programming operations, it is also possible to suspend the word lines. Therefore, the storage controller can first obtain the number of remaining word lines that have not completed the programming operation in the target data block. Similarly, considering that the damage caused to the storage unit by programming suspension under programming operations of different programming types is different, the storage controller can determine the first programming suspension count threshold corresponding to the programming type in the mapping relationship information between the programming type and the programming suspension count threshold based on the programming type. Further, the storage controller can determine the maximum programming suspension count threshold based on the first programming suspension count threshold, the number of remaining word lines, and the remaining programming suspension count.
[0032] In this way, when determining the maximum programming suspension times threshold, a more accurate maximum programming suspension times threshold can be determined by comprehensively considering the latest suspension status of the target data block as a whole, the need for subsequent suspension operations, and the more accurate first programming suspension times threshold.
[0033] In some optional implementations, in the above-mentioned second approach, the specific steps of the memory controller according to the first program suspend count threshold, the number of remaining word lines, and the remaining program suspend count may include: Step 1: determining an average program suspend count based on the remaining program suspend count and the number of remaining word lines.
[0034] Step 2: The minimum value between the remaining program suspend times and the first program suspend times threshold is used as the first program suspend times threshold.
[0035] Step three: determining a maximum programming suspend times threshold value based on the average programming suspend times and the first programming suspend times threshold value.
[0036] Specifically, the storage controller may determine the ratio of the remaining programming suspend times to the number of remaining word lines as the average programming suspend times. Similar to method one, the storage controller may use the minimum value between the remaining programming suspend times and the first programming suspend times threshold as the first programming suspend times threshold. Since the average programming suspend times can reflect the average programming suspend times of the remaining word lines, and the first programming suspend times threshold can accurately reflect the maximum programming suspend times currently allowed for the target word line, the storage controller may determine the maximum programming suspend times threshold for the target word line in this programming operation based on the average programming suspend times and the first programming suspend times threshold, so that the maximum programming suspend times threshold ultimately obtained takes into account both extreme conditions and word line balance conditions, and is more in line with actual conditions.
[0037] For example, the above step 3 can be expressed as follows:
[0038] Wherein, M is the maximum programming suspend times threshold, A is the first programming suspend times threshold, and B is the average programming suspend times.
[0039] In the above expression, the determination of A takes into account the overall situation of the target data block and the influence of the programming type, and B takes into account the situation of word line balance, that is, the number of programming suspensions that may be required later. Therefore, the average of A and B can be taken to ensure that both situations can be comprehensively considered. Furthermore, by rounding down, the problem of the determined programming suspension number threshold being too large and exceeding the data block limit can be avoided. At the same time, in the case of rounding down, the purpose of adding 1 to the first programming suspension number threshold is to prevent the last programming suspension number from being used when the remaining programming suspension number of the target data block is 1. For example, when A is 1 and B is 0, the calculated M is 0, resulting in the inability to perform the suspension operation during the programming operation, wasting the programming suspension number. By adding one, it can be ensured that the last programming operation can be executed in this special case.
[0040] In some optional implementations, to improve the efficiency of read and program operations, after comparing the first program suspended count with the first preset threshold, the storage controller may further perform the following operations based on the comparison result: When it is determined that the number of times the first program has been suspended is less than a first preset threshold, the state information of the suspend flag is set to the first preset state information. Alternatively, when it is determined that the number of times the first program has been suspended is greater than or equal to the first preset threshold, the state of the suspend flag is set to second preset state information, wherein the second preset state information is used to indicate that a program suspend operation is not allowed during a process of performing a programming operation on a target data block using a target word line.
[0041] Among them, the first preset state information can be used to indicate that a program suspend operation is allowed during the process of performing a programming operation on a target data block using a target word line, and the second preset state information can be used to indicate that a program suspend operation is not allowed during the process of performing a programming operation on a target data block using a target word line.
[0042] Specifically, when the storage controller determines that the number of times the first programming of the target data block has been suspended is less than a first preset threshold, it indicates that the number of suspension operations on the target data block has not reached the limit. During this programming operation, the suspension operation on the target word line is allowed. Accordingly, in order to facilitate the storage controller to promptly determine that a read operation can be performed when a read request is obtained during the programming operation using the target word line, the storage controller can pre-set the status information of the suspension mark to the first preset status information. Alternatively, when the storage controller determines that the number of times the first programming of the target data block has been suspended is greater than or equal to the first preset threshold, it indicates that the number of suspension operations on the target data block has reached the limit. During this programming operation, the suspension operation on the target word line is no longer allowed. Accordingly, in order to facilitate the storage controller to promptly determine that a read operation will not be performed when a read request is obtained during the programming operation using the target word line, the status information of the suspension mark can be set to the second preset status information.
[0043] Thus, by presetting the suspend flag, the storage controller no longer needs to make a real-time determination based on the first programming suspend count and the first preset threshold when receiving a read request for a target data block. Instead, the controller can simply and directly make an efficient decision on whether to suspend the operation based on the indication of the suspend flag. Furthermore, if it is determined that the suspend operation is possible, the read operation can be completed efficiently, allowing the storage controller to resume the programming operation earlier, thereby improving the efficiency of the programming operation.
[0044] In some optional implementations, after determining the maximum suspended word line threshold of the target word line and completing the setting operation of the suspended flag, the memory controller may further perform the following specific steps: Step 1: After obtaining a target read request corresponding to a target data block and determining that the state of the suspension mark is the first preset state information, obtain a second programming suspension count in the process of performing a programming operation on the target data block using the target word line.
[0045] Step 2: When it is determined that the second program suspension count is less than the maximum program suspension count threshold, suspending the program operation of the target word line in the target data block.
[0046] Step three: according to the target read request, use the target word line to perform a read operation corresponding to the target read request on the target data block.
[0047] Specifically, during the period when the storage controller uses the target word line to perform a programming operation on the target data block, a read request for the target data block may be obtained. Since both the programming operation and the read operation require the use of the word line corresponding to the target data block, when the target read request for the target data block is obtained, the storage controller needs to first determine whether the current target word line is still allowed to perform a suspend operation. Accordingly, when the storage controller determines that the state of the suspend mark is the first preset state information, it can first determine the number of suspend operations that have been performed on the target word line during the current programming operation, that is, obtain the second programming suspension number. In addition, in the aforementioned steps, the storage controller has calculated the maximum programming suspension number threshold allowed for the target word line during this programming operation. Therefore, it can first determine whether the second programming suspension number is less than the maximum programming suspension number threshold. If the second programming suspension count is less than the maximum programming suspension count threshold, it indicates that the target word line can still be suspended. In this case, the storage controller can immediately suspend the target word line and, based on the target read request, perform a read operation corresponding to the target read request on the target data block. After completing the read operation, the program operation using the target word line can be continued. If the second programming suspension count is equal to the maximum programming suspension count threshold, it indicates that the target word line cannot be suspended. In this case, the storage controller can wait until the program operation corresponding to the target word line is completed before performing the read operation corresponding to the target read request on the target data block.
[0048] In this way, a maximum program suspend count threshold is set at the wordline level, and this maximum program suspend count threshold is determined based on real-time suspend conditions, making the maximum program suspend count threshold more flexible and accurate. Furthermore, using an appropriate maximum program suspend count threshold to determine whether to suspend an operation can reduce hardware damage and ensure timely completion of read requests.
[0049] In some optional embodiments, the storage controller's firmware may include a count field corresponding to each data block in the flash memory, used to record the number of programming-suspended times for each data block during each write operation. In step S201, upon receiving a write request and determining identification information of at least one data block corresponding to the write request, the storage controller may determine, in the firmware, a target count field corresponding to the identification information of the target data block based on the identification information of the target data block (which may be any of the at least one data block corresponding to the write request), and read the first programming-suspended times corresponding to the target data block from the target count field.
[0050] In this way, for each data block, the storage controller can use the corresponding programming suspended times to flexibly calculate the maximum programming suspended times threshold for the word line corresponding to the data block.
[0051] In some optional implementations, the storage controller firmware may include a count field corresponding to each stripe included in the storage device. Accordingly, in step S201, the storage controller may determine the target count field corresponding to the target data block and extract the first programming suspended count from the target count field. Specifically, the storage controller may perform the following steps: Step 1: Receive a write request.
[0052] The write request includes write address information.
[0053] Step 2: determining identification information of at least one stripe corresponding to the write address information according to the write address information; Step three: According to the identification information of the target stripe, a target count field corresponding to the identification information of the target stripe is determined in the firmware of the storage device.
[0054] The target stripe is a stripe including the target data block in at least one stripe.
[0055] Step 4: Read the target value from the target count field and determine the target value as the first programming suspension count.
[0056] Specifically, since the storage controller has limited storage space for storing firmware, a count field can be set in the stripe dimension to conserve storage resources. Accordingly, when the storage controller receives a write request, it can extract write address information from the write request and, based on the write address information, determine identification information for at least one stripe corresponding to the write address information. For each stripe's identification information, the storage controller can determine a target count field corresponding to the stripe's identification information from multiple count fields included in the storage device's firmware based on the stripe's identification information, and extract a target value from the target count field as the first programming suspended count.
[0057] During a programming operation, the storage controller performs programming operations on the same row of memory cells in all data blocks on the same stripe, but the number of suspended operations during the programming operation varies for different data blocks. Accordingly, after completing the current programming operation, the storage controller can update the value of the target count field based on the number of program suspended operations for the target word lines corresponding to all data blocks on the target stripe during the current programming operation. Specifically, the following steps may be performed: Step 1: After completing programming operations respectively corresponding to a plurality of data blocks in a target stripe using a target word line, obtaining the number of program suspensions respectively corresponding to the plurality of data blocks in the programming operations.
[0058] Step 2: determining a maximum programming suspended count from the programming suspended counts corresponding to the plurality of data blocks in the programming operation.
[0059] Step three, based on the maximum number of programming suspensions, update the value of the target count field to obtain an updated value, which is used to determine the maximum programming suspension number threshold for the next programming operation on any data block of the target stripe based on the updated value before performing the next programming operation on the data block using the target word line.
[0060] Specifically, after completing programming operations for multiple data blocks in the target stripe using the target word line, the storage controller can determine the number of programming suspensions for each data block in the target stripe during the programming operation, and determine the maximum programming suspension number from these programming suspension numbers. The storage controller then subtracts the maximum programming suspension number from the target value to obtain an updated value, and updates the target count field with the updated value. Thus, before executing the next programming operation for any data block in the target stripe, the storage controller can determine the maximum programming suspension number threshold for the next programming operation for the data block using the target word line based on the updated value.
[0061] For example, the initial value of the target count field is 100 (that is, the maximum total program suspend count for the target data block). The target stripe includes data block 1, data block 2, and data block 3. During the current programming operation, the program suspend count for the target word line in data block 1 is 3, the program suspend count for the target word line in data block 2 is 1, and the program suspend count for the target word line in data block 3 is 2. The maximum program suspend count is 3, and the updated value of the target count field is 100-3=97.
[0062] This can save storage resources and ensure that no data block will be damaged by hardware due to a large programming suspension threshold. In other words, it can ensure that all data blocks on the target stripe meet the hardware constraints of the flash memory.
[0063] In some optional embodiments, when it is determined that the programming operation is completed, the first programming suspension count can be updated based on the number of times the programming of the target data block has been suspended during the programming operation, so as to redetermine the maximum programming suspension count threshold the next time the target data block is programmed using other word lines.
[0064] In some optional embodiments, when the programming type is one of the fine programming type or the mixed programming type, when the programming completion information is obtained, the programming completion information is parsed. When it is determined that the programming type included in the programming completion information is one of the fine programming type or the mixed programming type, it means that the programming operation of the target word line has been completed, and the number of remaining word lines can be updated so that when other word lines are used to perform programming operations on the target data block, the maximum programming suspension count threshold of other word lines can be determined.
[0065] The following describes in detail the process of determining the threshold value of the number of programming suspend times of the storage controller using a specific example. The detailed process can be as follows: Figure 3 shown.
[0066] In step 1, the storage controller may store program suspend count thresholds corresponding to different programming types. For example, the program suspend count threshold corresponding to coarse programming may be X, and the program suspend count threshold corresponding to fine programming may be Y. Furthermore, the storage controller may store a maximum total program suspend count threshold for a data block. The maximum total program suspend count threshold may be the product of the number of word lines (n) and the average program suspend count threshold for a single word line (Z), i.e., n × Z.
[0067] In step 2, the storage controller may add a first count field and a second count field (referred to as "block_suspend_count") for the target word line in the firmware. The first count field is used to record the number of times programming has been suspended for the target word line during the current programming operation, and the second count field is used to record the number of times programming has been suspended for the target data block (the number of times programming has been suspended for other word lines in the target data block during programming operations prior to the current programming operation).
[0068] Step 3: Before initiating a programming request, the storage controller first determines whether the number of programming suspensions is less than the maximum total programming suspension threshold, i.e., block_suspend_count <n×Z。
[0069] (1) When it is determined that the value recorded in the programming suspended times count field is equal to the maximum total programming suspended times threshold, the suspend allow flag is set to 0 (second preset indication information) and the process goes to step 5.
[0070] (2) When it is determined that the value recorded in the programming suspend count field is less than the maximum total programming suspend count threshold, the suspend allow flag is set to 1 (first preset indication information), and the value of the maximum total programming suspend count threshold minus the programming suspend count of the data block is determined as the remaining programming suspend count (which can be called "suspend_remain_count"), that is, suspend_remain_count = n × Z-block_suspend_count, and then go to step 4.
[0071] Step 4: The storage controller determines the programming type of the currently initiated programming operation, and determines a maximum programming suspend count threshold for the target word line according to different programming types.
[0072] (1) The programming type is coarse programming. The minimum value between the remaining programming suspend count and X is determined as the maximum programming suspend count threshold (which can be called "suspend_allow_count") of the target field, that is, suspend_allow_count = min(suspend_remain_count, X).
[0073] (2) The programming type is fine programming. The minimum value between the remaining programming suspend count and Y is determined as the maximum programming suspend count threshold of the target field, that is, suspend_allow_count = min(suspend_remain_count, Y).
[0074] (3) The programming type is SLC word line programming or TLC word line programming. The minimum value between the sum of X and Y and the remaining program suspend count is determined as the maximum program suspend count threshold of the target field, that is, suspend_allow_count = min(suspend_remain_count, X + Y).
[0075] Step 5: When it is determined that the suspend flag is 1, the storage controller sets the initial value of the first count field to 0, and increases the value of the first count field by 1 each time a suspend operation is performed.
[0076] In step 6, when the storage controller obtains a target read request of high priority (for example, a request included in a preset queue) for the target data block, it obtains the number of programming suspension times of the target word line (which can be called "suspend_count", that is, the second programming suspension times mentioned above) from the first count field, and determines whether the number of programming suspension times of the target word line is less than the maximum programming suspension times threshold. If so, it proceeds to step 7; if not, it waits for the current programming operation to be completed before performing the read operation.
[0077] Step 7: The memory controller suspends the target word line and performs a read operation corresponding to the target read request, and increases the value of the first count field by 1.
[0078] In addition, after completing the current programming operation, the storage controller obtains the latest value of the first count field and updates the value of the second count field based on the latest value for determining the maximum value when performing the next programming operation on the target data block.
[0079] The storage controller may include a large core and a small core, which work together to complete the aforementioned operations. For example, the small core may be called a Flash Channel Controller (FCC) or a NAND Flash Controller (NFC). For example, the large core may be used to perform steps 1 through 4 and 8 above. In step 4, the large core may send a programming request to the small core, which then completes the programming and suspend operations. The small core may be used to perform steps 5 through 7 above. After completing step 7, it may send a programming completion message to the large core, which may carry the latest value of the first count field.
[0080] The method for determining the programming suspension count threshold of an embodiment of the present application is to first obtain the programming type of the current programming operation and the first programming suspension count corresponding to the target data block before using any word line of the target data block to perform a programming operation. If it is determined that the first programming suspension count is less than the first preset threshold, it means that the number of suspension operations on the target data block has not reached the limit, and the target word line is allowed to be suspended during this programming operation. Further, in this case, the remaining programming suspension count corresponding to the target data block can be determined based on the first preset threshold and the first programming suspension count. In addition, considering that the degree of damage to the target data block caused by the suspension operation on the word line varies under programming operations of different programming types, when determining the maximum programming suspension count threshold corresponding to the target word line, the minimum value between the remaining programming suspension count and the first programming suspension count threshold can be determined as the maximum programming suspension count threshold. In this way, when the remaining number of program suspend times is less than the first program suspend times threshold, a smaller number of remaining program suspend times is selected as the maximum program suspend times threshold, so that the current programming operation is executed with the maximum number of program suspend times that the data block can support as the upper limit. Regardless of the programming type, the problem of data block damage caused by setting the first program suspend times threshold too high can be avoided. When the remaining number of program suspend times is greater than the first program suspend times threshold, the data block can accept a larger number of suspend operations. In this case, a smaller first program suspend times threshold is selected as the maximum program suspend times threshold. The first program suspend times threshold allowed by the current programming type is used as the maximum program suspend times threshold, so that the suspend operation can be executed in a timely manner in the current programming operation and the read request can be completed in a timely manner.
[0081] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0082] The embodiment of the present application also provides a device for determining a programming suspension number threshold, such as Figure 4 As shown, including: an acquisition module 410 configured to acquire a programming type of a programming operation corresponding to a target word line and a first programming suspended count corresponding to a target data block, wherein the target data block is a data block in a data block included in a storage device, and the target word line is any one of a plurality of word lines corresponding to the target data block; Determination module 420 is used to determine the remaining programming suspension times corresponding to the target data block based on the first preset threshold and the first programming suspension times after determining that the first programming suspension times are less than the first preset threshold, wherein the first preset threshold is used to indicate the maximum total programming suspension times of all word lines of the target data block; and determine the maximum programming suspension times threshold in the process of programming the target data block using the target word line based on the programming type and the remaining programming suspension times.
[0083] In some optional implementations, the determination module 420 is specifically configured to: According to the programming type, obtaining a first programming suspension times threshold value corresponding to the programming type; Obtaining the number of remaining word lines of an uncompleted programming operation corresponding to a target data block; determining an average number of program suspend times according to the remaining number of program suspend times and the number of remaining word lines; The minimum value between the remaining program suspend times and the first program suspend times threshold is used as the second program suspend times threshold; A maximum program suspend number threshold is determined according to the average program suspend number and the second program suspend number threshold.
[0084] In some optional implementations, the programming type is one of a coarse programming type, a fine programming type, and a mixed programming type; the determination module 420 is specifically configured to: When the programming type is determined to be the coarse programming type, a minimum value between a programming suspend count threshold corresponding to the coarse programming type and a remaining programming suspend count is determined as a maximum programming suspend count threshold; Alternatively, when the programming type is determined to be a fine programming type, a minimum value between a programming suspend count threshold corresponding to the fine programming type and a remaining programming suspend count is determined as a maximum programming suspend count threshold; Alternatively, when the programming type is determined to be a mixed programming type, the minimum value between the programming suspension count threshold corresponding to the mixed programming type and the remaining programming suspension count is determined as the maximum programming suspension count threshold, wherein the programming suspension count threshold corresponding to the mixed programming type is the sum of the programming suspension count thresholds corresponding to the coarse programming type and the fine programming type, respectively.
[0085] In some optional implementations, the maximum programming suspend times threshold is determined based on the average programming suspend times and the second programming suspend times threshold, using the expression:
[0086] Wherein, M is the maximum programming suspend times threshold, A is the second programming suspend times threshold, and B is the average programming suspend times.
[0087] In some optional embodiments, the apparatus further includes a setting module 430, configured to: When it is determined that the number of times the first program has been suspended is less than a first preset threshold, setting the state information of the suspension mark to first preset state information, wherein the first preset state information is used to indicate that a program suspension operation is allowed during a process of performing a program operation on a target data block using a target word line; or, When it is determined that the first programming has been suspended a number of times greater than or equal to a first preset threshold, the state of the suspension mark is set to second preset state information, wherein the second preset state information is used to indicate that a programming suspension operation is not allowed during the process of performing a programming operation on a target data block using a target word line.
[0088] In some optional implementations, the apparatus further includes a suspend module 440 and a read operation module 450: The suspension module 440 is configured to, upon receiving a target read request corresponding to a target data block and determining that the state of the suspension mark is the first preset state information, obtain a second programming suspension count during a process of performing a programming operation on the target data block using the target word line; and upon determining that the second programming suspension count is less than a maximum programming suspension count threshold, suspend the programming operation on the target word line in the target data block. The read operation module 450 is configured to perform a read operation corresponding to the target read request on the target data block using the target word line according to the target read request.
[0089] In some optional implementations, the suspend module 440 is further configured to: When it is determined that the second program has been suspended for a number of times equal to the maximum program suspension number threshold, determining not to suspend the program operation of the target word line in the target data block; And, after completing the programming operation on the target data block using the target word line, performing a read operation corresponding to the target read request on the target data block using the target word line according to the target read request.
[0090] In some optional implementations, the acquisition module 410 is specifically configured to: receiving a write request, wherein the write request includes write address information; determining, according to the write address information, identification information of at least one stripe corresponding to the write address information; determining, in firmware of the storage device, a target count field corresponding to the identification information of the target stripe according to the identification information of the target stripe, wherein the target stripe is a stripe in at least one stripe that includes the target data block; A target value is read from the target count field and is determined as the first program suspended number of times.
[0091] In some optional implementations, the apparatus further includes an updating module 460, configured to: After completing programming operations respectively corresponding to the plurality of data blocks in the target stripe using the target word line, obtaining programming suspended times respectively corresponding to the plurality of data blocks in the programming operations; Determining a maximum programming suspended count among the programming suspended counts corresponding to the plurality of data blocks in the programming operation; Based on the maximum number of programming suspensions, the value of the target count field is updated to obtain an updated value, which is used to determine the maximum programming suspension number threshold for the next programming operation on any data block of the target stripe using the target word line based on the updated value before the next programming operation is performed on the data block.
[0092] The description of the features in the embodiment corresponding to the device for determining the programming suspension number threshold can be found in the relevant description of the embodiment corresponding to the method for determining the programming suspension number threshold, and will not be repeated here.
[0093] The embodiment of the present application also provides an electronic device, such as Figure 5 As shown, the electronic device includes a memory 10 and a processor 20. The memory 10 stores a computer program, and the processor 20 is configured to run the computer program to perform the steps of any of the above-mentioned methods for determining the programming suspension threshold. The electronic device can be the above-mentioned storage controller or storage device.
[0094] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps of any of the above-mentioned methods for determining a programming suspension count threshold when running.
[0095] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0096] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above-mentioned methods for determining a programming suspension count threshold are implemented.
[0097] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps in any of the above-mentioned methods for determining the programming suspension number threshold.
[0098] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0099] The above is a detailed introduction to the method, device, electronic device, storage medium, and program product for determining a programming suspension count threshold provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only intended to help understand the method and core ideas of the present application. It should be pointed out that, for those skilled in the art, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the present application.
Claims
1. A method for determining a programming suspension count threshold, characterized in that: The method comprises: Obtaining a programming type of a programming operation corresponding to a target word line and a first programming suspended count corresponding to a target data block, wherein the target data block is a data block in data blocks included in a storage device, and the target word line is any one of a plurality of word lines corresponding to the target data block; When it is determined that the first program suspended count is less than a first preset threshold, determining a remaining program suspended count corresponding to the target data block according to the first preset threshold and the first program suspended count, wherein the first preset threshold is used to indicate a maximum total program suspended count for all word lines of the target data block; A maximum program suspend count threshold value in a process of performing a program operation on the target data block using the target word line is determined according to the program type and the remaining program suspend count.
2. The method for determining the programming suspension number threshold according to claim 1, wherein: The determining, according to the programming type and the remaining program suspension times, a maximum program suspension times threshold in a process of using the target word line to program the target data block includes: According to the programming type, obtaining a first programming suspension times threshold value corresponding to the programming type; Obtaining the number of remaining word lines of an uncompleted programming operation corresponding to the target data block; determining an average program suspend count according to the remaining program suspend count and the number of remaining word lines; using a minimum value between the remaining program suspend times and the first program suspend times threshold as a second program suspend times threshold; The maximum program suspend times threshold is determined according to the average program suspend times and the second program suspend times threshold.
3. The method for determining the programming suspension number threshold according to claim 1, wherein: The programming type is one of a coarse programming type, a fine programming type, and a mixed programming type; and determining, according to the programming type and the remaining program suspension times, a maximum program suspension times threshold in a process of performing a programming operation on the target data block using the target word line includes: When it is determined that the programming type is the coarse programming type, determining a minimum value between a programming suspend count threshold corresponding to the coarse programming type and the remaining programming suspend count as the maximum programming suspend count threshold; Alternatively, when the programming type is determined to be the fine programming type, a minimum value between a programming suspend count threshold corresponding to the fine programming type and the remaining programming suspend count is determined as the maximum programming suspend count threshold; Alternatively, when the programming type is determined to be the hybrid programming type, the minimum value of the programming suspension count threshold corresponding to the hybrid programming type and the remaining programming suspension count is determined as the maximum programming suspension count threshold, wherein the programming suspension count threshold corresponding to the hybrid programming type is the sum of the programming suspension count thresholds corresponding to the coarse programming type and the fine programming type respectively.
4. The method for determining the programming suspension number threshold according to claim 2, wherein: The maximum programming suspend times threshold is determined according to the average programming suspend times and the second programming suspend times threshold, using the expression: Wherein, M is the maximum programming suspend times threshold, A is the second programming suspend times threshold, and B is the average programming suspend times threshold.
5. The method for determining the programming suspension times threshold according to any one of claims 1 to 4, characterized in that: The method further comprises: When it is determined that the number of times the first program has been suspended is less than a first preset threshold, setting the state information of the suspension mark to first preset state information, wherein the first preset state information is used to indicate that a program suspension operation is allowed during the process of performing a program operation on the target data block using the target word line; or, When it is determined that the first programming has been suspended a number of times greater than or equal to the first preset threshold, the state of the suspension mark is set to second preset state information, wherein the second preset state information is used to indicate that a programming suspension operation is not allowed during the process of performing a programming operation on the target data block using the target word line.
6. The method for determining the programming suspension times threshold according to claim 5, wherein: After determining, based on the programming type and the remaining program suspend times, a maximum program suspend times threshold in a process of programming the target data block using the target word line, the method further includes: When a target read request corresponding to the target data block is obtained and it is determined that the state of the suspension mark is the first preset state information, a second programming suspension count in a process of performing a programming operation on the target data block using the target word line is obtained; When it is determined that the second program has been suspended for a number of times less than the maximum program suspension number threshold, suspending the program operation of the target word line in the target data block; According to the target read request, a read operation corresponding to the target read request is performed on the target data block using the target word line.
7. The method for determining the programming suspension times threshold according to claim 6, wherein: The method further comprises: When it is determined that the second program has been suspended for a number of times equal to the maximum program suspension number threshold, determining not to suspend the program operation of the target word line in the target data block; And, after completing the programming operation on the target data block using the target word line, performing a read operation corresponding to the target read request on the target data block using the target word line according to the target read request.
8. The method for determining a programming suspension times threshold according to any one of claims 1 to 4, characterized in that: Obtaining a first programming suspension count corresponding to the target data block includes: receiving a write request, wherein the write request includes write address information; determining, according to the write address information, identification information of at least one stripe corresponding to the write address information; determining, in the firmware of the storage device, a target count field corresponding to the identification information of the target stripe according to identification information of the target stripe, wherein the target stripe is a stripe including the target data block in at least one of the stripes; A target value is read from the target count field and is determined as the first programming suspended number of times.
9. The method for determining the programming suspension times threshold according to claim 8, wherein: The method further comprises: After completing programming operations respectively corresponding to a plurality of data blocks in the target stripe using the target word line, obtaining programming suspended times respectively corresponding to the plurality of data blocks in the programming operations; Determining a maximum programming suspended count among the programming suspended counts respectively corresponding to the plurality of data blocks in the programming operation; Based on the maximum number of programming suspensions, the value of the target count field is updated to obtain an updated value, which is used to determine the maximum programming suspension number threshold for performing the next programming operation on any data block of the target stripe using the target word line based on the updated value before performing the next programming operation on the data block.
10. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the method for determining the programming suspension count threshold as claimed in any one of claims 1 to 9 when executing the computer program.
Citation Information
Patent Citations
Data storage device, operation method thereof, and storage system
CN110727394A
Flash memory programming suspension characteristic test method, test device and test equipment
CN112466384A
Memory system, memory controller and operating method of memory system
CN113806255A
Read operation execution method and device, electronic equipment and storage medium
CN116069255A
Multi-thread management and control method and related equipment
CN119861976A