Method, device and equipment for determining programming suspension times threshold, and medium
By dynamically determining the threshold for the number of programming suspensions, and combining the programming type and the number of suspensions, the problem of a fixed threshold for the number of programming suspensions in existing technologies is solved, achieving more flexible and accurate suspension operations and avoiding data block corruption and read request delays.
Patent Information
- Application Number
- CN202511188819.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-08-25
AI Technical Summary
In existing storage technologies, the threshold for the number of programming hangs is set too rigidly, resulting in low flexibility and accuracy, which may lead to data block corruption or read requests not being completed in a timely manner.
By obtaining the programming type and the number of times the target word line has been suspended, and combining the first preset threshold and the remaining number of programming suspensions, the maximum number of programming suspensions threshold is dynamically determined. Taking into account the programming type and the overall situation of the data block, the number of suspension operations threshold is flexibly adjusted.
It improves the flexibility and accuracy of the programming suspension threshold, avoids data block corruption, and ensures timely completion of read requests.
Smart Images

Figure CN120690265B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of storage, and in particular, to a method and device for determining a programming suspension number threshold, an electronic device, a storage medium, and a program product. BACKGROUND
[0002] In the technical field of storage, a storage device can include a plurality of data blocks, each data block being composed of a plurality of stacked storage cells, and the read / write operation of a row of storage cells can be controlled by a word line, that is, a voltage is applied to the storage cells through the word line, thereby activating or changing the charge state in the storage cells to complete the reading or writing of data. When a write request is received by a storage controller, one or more data blocks can be programmed according to the write request.
[0003] During the programming operation of a data block by the storage controller, a read request for the data block can be received. Since the programming operation takes more time, if the read request is executed after the programming operation is completed, the waiting time of the read request will be long. Moreover, the read request can be for a storage cell in the data block that is currently being programmed, for example, it can be for a storage cell in the row corresponding to the current word line, or it can be for a storage cell in another row. For the former, the current word line must be suspended, the current programming state is saved, and then the read operation is executed using the current word line. For the latter, although the word lines are different, the storage cells in the data block are close to each other, and if voltages are applied to the two word lines at the same time, mutual interference between the storage cells can occur, resulting in data errors. Therefore, the programming operation of the current word line also needs to be suspended, and then the read operation is executed using the current word line. Further, if the number of programming suspensions is large during a programming operation, the programming progress will be affected. Therefore, a fixed programming suspension number threshold is generally set for a single word line, that is, the maximum number of suspensions of the currently used word line is set when the current write request is processed. In this way, the suspension operation is executed using the fixed programming suspension number threshold as the upper limit, which has poor flexibility and low accuracy. For example, if the fixed programming suspension number threshold is set to be large, the number of programming suspensions can be large, which can cause damage to the data block. If the fixed programming suspension number threshold is set to be small, some read requests can not be completed in time during the current programming operation. SUMMARY
[0004] The present application provides a method and device for determining a programming suspension number threshold, an electronic device, a storage medium, and a program product, to solve the problem of low flexibility and accuracy of the programming suspension number threshold.
[0005] The present application provides a method for determining a programming suspension number threshold, which comprises:
[0006] obtain a program type of a program operation corresponding to a target word line, and a first program suspension number corresponding to a target data block, wherein the target data block is one of 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;
[0007] when it is determined that the first program suspension number is less than a first preset threshold, determine a remaining program suspension number corresponding to the target data block according to the first preset threshold and the first program suspension number, wherein the first preset threshold is used to indicate a maximum total program suspension number of all word lines of the target data block;
[0008] determine a maximum program suspension number threshold in a process of performing the program operation on the target data block using the target word line according to the program type and the remaining program suspension number.
[0009] The application further provides a determination device of a program suspension number threshold.
[0010] The obtaining module is used to obtain a program type of a program operation corresponding to a target word line, and a first program suspension number corresponding to a target data block, wherein the target data block is one of 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;
[0011] The determining module is used to, when it is determined that the first program suspension number is less than a first preset threshold, determine a remaining program suspension number corresponding to the target data block according to the first preset threshold and the first program suspension number, wherein the first preset threshold is used to indicate a maximum total program suspension number of all word lines of the target data block; and determine a maximum program suspension number threshold in a process of performing the program operation on the target data block using the target word line according to the program type and the remaining program suspension number.
[0012] The application further provides an electronic device, which comprises a memory for storing a computer program, and a processor for executing the computer program to implement the steps of the determination method of the program suspension number threshold.
[0013] The application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the determination method of the program suspension number threshold.
[0014] The application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps of the determination method of the program suspension number threshold.
[0015] Through the present application, before programming operation is performed on any word line of a target data block, the programming type of the current programming operation and the first programming suspension times corresponding to the target data block are obtained. If it is determined that the first programming suspension times is less than a first preset threshold, it indicates that the suspension operation times of the target data block does not reach the limit, and the suspension operation is allowed to be performed on the target word line during the programming operation. Further, in this case, the remaining programming suspension times corresponding to the target data block can be determined according to the first preset threshold and the first programming suspension times. Moreover, considering that the damage degree of the target data block caused by the suspension operation on the word line is different under programming operations of different programming types, when determining the maximum programming suspension times threshold corresponding to the target word line, the programming type and the remaining programming suspension times threshold can be combined to determine the maximum programming suspension times threshold of the target word line. In this way, during each programming operation, the maximum programming suspension times threshold of the word line considers both the overall situation of the data block where it is located (the remaining programming suspension times threshold) and the individual situation of the current programming operation (the programming type), so that the finally determined maximum programming suspension times threshold is more accurate and has higher flexibility, which can avoid the problem that the large programming suspension times threshold causes damage to the data block, and can also avoid the problem that the small programming suspension times threshold causes the read request to be unable to be completed in time. BRIEF DESCRIPTION OF DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0017] Figure 1 A schematic diagram of the architecture of a storage device is provided for the embodiments of the present application.
[0018] Figure 2 A flowchart of a method for determining a programming suspension times threshold is provided for the embodiments of the present application.
[0019] Figure 3 A flowchart of a method for performing a suspension operation is provided for the embodiments of the present application.
[0020] Figure 4 A schematic diagram of the structure of a programming suspension times threshold determination apparatus is provided for the embodiments of the present application.
[0021] Figure 5 A schematic diagram of the structure of an electronic device is provided for the embodiments of the present application. DETAILED DESCRIPTION
[0022] With reference to the drawings of the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described, obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the protection scope of the present application.
[0023] It should be noted that in the description of the present application, the terms "comprising", "containing" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or equipment. The terms "first", "second" and the like in the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence.
[0024] In order for those skilled in the art to better understand the technical solutions of the present application, the present application will be further described in detail below with reference to the drawings and specific embodiments.
[0025] The method for determining the programming suspension times threshold provided by the present application can be implemented by a storage device, such as Figure 1 As shown, the storage device can include a storage controller and a plurality of data blocks. The flash memory can include a plurality of data blocks. Each data block can include a plurality of rows of storage cells, and the storage controller uses a word line for the storage cells in the same row when performing programming or reading operations on the storage cells. A storage cell is used to store 1-bit or multi-bit data. The storage cell storing 1-bit data can be a single-level cell (SLC), and the storage cell storing multi-bit data can be a multi-level cell (MLC) developing to a triple-level cell (TLC), a quad-level cell (QLC), etc. For example, the storage device can be a flash memory type storage device, and accordingly, the data block can be a flash memory block.
[0026] The embodiment of the present application provides a method for determining a programming suspension times threshold, 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 times threshold can include:
[0027] In step S201, the programming type of the programming operation corresponding to the target word line and the first programming suspension times corresponding to the target data block are obtained.
[0028] The target data block is any one of data blocks included in the flash memory, and the target word line is any one of a plurality of word lines corresponding to the target data block.
[0029] Specifically, during the programming operation on the target data block, the storage controller can perform the programming operation on the storage unit in the target data block using the word line corresponding to the target data block. The storage controller can perform programming operations of different programming types. Accordingly, each time the 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 can be one of a plurality of programming operations involved in a write request process, that is, before the current programming operation, the storage controller can have performed programming operations on other storage units in the target data block, and during these programming operations, a suspend operation (Suspend) can have been performed. Therefore, the storage controller can obtain the number of suspend operations performed by the storage controller on the word line in the target data block, that is, the first programming suspended number.
[0030] Step S202, when it is determined that the first programming suspended number is less than the first preset threshold, determining a remaining programming suspend number corresponding to the target data block according to the first preset threshold and the first programming suspended number.
[0031] The first preset threshold can be used to indicate the maximum total programming suspend number of all word lines of the target data block.
[0032] Specifically, in order to avoid physical damage to the data block caused by the suspend operation, the storage controller can pre-set the maximum total programming suspend number of the target data block. Accordingly, when the programming operation is performed using the target word line, it can be determined in advance whether the first programming suspended number of the target data block is less than the first preset threshold. If so, it means that the number of suspend operations on the target data block has not reached the limit, and the suspend operation is allowed on the target word line during this programming operation. Further, the storage controller can determine the absolute value of the difference between the first preset threshold and the first programming suspended number as the remaining programming suspend number of the target data block.
[0033] Step S203, determining a maximum programming suspend number threshold in the process of performing the programming operation on the target data block using the target word line according to the programming type and the remaining programming suspend number.
[0034] Specifically, since the working voltages adopted by the programming operations of different programming types are different, and further, the damage degrees of the target data block caused by the suspend operations of the word line under the programming operations of different programming types are inconsistent, the storage controller can determine the maximum programming suspend number threshold of the target word line in this programming operation in combination with the programming type and the remaining programming suspend number of the target data block.
[0035] The method for determining the programming suspend number threshold of the embodiments of the present application, before using any word line of the target data block to perform the programming operation, first acquires the programming type of the current programming operation and the first programming suspend number corresponding to the target data block. If it is determined that the first programming suspend number is less than the first preset threshold, it indicates that the suspend operation number of the target data block has not reached the limit, and the suspend operation of the target word line is allowed during the programming operation. Further, in this case, the remaining programming suspend number corresponding to the target data block can be determined according to the first programming suspend number and the first preset threshold. Moreover, considering that the damage degrees of the target data block caused by the suspend operations of the word line under the programming operations of different programming types are inconsistent, when determining the maximum programming suspend number threshold corresponding to the target word line, the programming type and the remaining programming suspend number threshold can be combined to jointly determine the maximum programming suspend number threshold of the target word line. In this way, during each programming operation, the maximum programming suspend number threshold of the word line not only considers the overall situation of the data block where it is located (the remaining programming suspend number threshold), but also considers the individual situation of the current programming operation (the programming type), so that the finally determined maximum programming suspend number threshold is more accurate and has higher flexibility, which can not only avoid the problem that the large programming suspend number threshold causes the damage of the data block, but also avoid the problem that the small programming suspend number threshold causes the read request to be unable to be completed in time.
[0036] In some optional embodiments, in the step S203 described above, the storage controller can specifically determine the maximum programming suspend number threshold of the target word line in the following two ways:
[0037] The programming type can be one of a course program type, a fine program type, a mixed program type, and the like. The mixed program type can be an SLC programming type or a TLC programming type, or the like. That is, the programming operation of the mixed program type includes course programming and fine programming. Accordingly, when the storage controller determines that the programming type is the course program type, the storage controller determines the minimum value of the programming suspension threshold value corresponding to the course program type and the remaining programming suspension number as the maximum programming suspension threshold value. When the storage controller determines that the programming type is the fine program type, the storage controller determines the minimum value of the programming suspension threshold value corresponding to the fine program type and the remaining programming suspension number as the maximum programming suspension threshold value. When the storage controller determines that the programming type is the mixed program type, the storage controller determines the minimum value of the programming suspension threshold value corresponding to the mixed program type and the remaining programming suspension number as the maximum programming suspension threshold value.
[0038] The programming suspension threshold value corresponding to the mixed program type can be the sum of the programming suspension threshold values corresponding to the course program type and the fine program type.
[0039] Specifically, considering that the damage to the storage unit caused by the programming suspension under the programming operation of different programming types is different, the storage controller can determine the first programming suspension threshold value corresponding to the programming type of the target word line in the mapping relationship information of the programming type and the programming suspension threshold value according to the programming type, and determine the minimum value of the remaining programming suspension number and the first programming suspension threshold value as the maximum programming suspension threshold value. For example, when the storage controller determines that the programming type is the course program type, the storage controller determines the minimum value of the programming suspension threshold value corresponding to the course program type and the remaining programming suspension number as the maximum programming suspension threshold value. When the storage controller determines that the programming type is the fine program type, the storage controller determines the minimum value of the programming suspension threshold value corresponding to the fine program type and the remaining programming suspension number as the maximum programming suspension threshold value. When the storage controller determines that the programming type is the mixed program type, the storage controller determines the minimum value of the programming suspension threshold value corresponding to the mixed program type and the remaining programming suspension number as the maximum programming suspension threshold value.
[0040] In this way, in a case where the remaining program suspension times is less than the first program suspension times threshold, the smaller remaining program suspension times is selected as the maximum program suspension times threshold, so that the current program operation is executed with the maximum program suspension times of the data block as the upper limit, and no matter in which program type, the problem of the first program suspension times threshold being set too large to cause damage to the data block can be avoided. In a case where the remaining program suspension times is greater than the first program suspension times threshold, the data block can accept more suspension operation times, and in this case, the smaller first program suspension times threshold is selected as the maximum program suspension times threshold, so that the first program suspension times threshold allowed by the current program type is used as the maximum program suspension times threshold, which can enable the suspension operation to be executed in time in the current program operation, and the read request to be completed in time.
[0041] In a second mode, the storage controller obtains, according to the program type, a first program suspension times threshold corresponding to the program type; obtains a remaining word line quantity of an unfinished program operation corresponding to the target data block; and determines the maximum program suspension times threshold according to the first program suspension times threshold, the remaining word line quantity, and the remaining program suspension times.
[0042] Specifically, since there are still word lines that have not been programmed in the process of executing the current write operation, that is, the word lines may also need to be suspended during other program operations. Therefore, the storage controller can first obtain the remaining word line quantity of the unfinished program operation in the target data block. Similarly, considering that the damage to the storage unit caused by the program suspension in the program operation of different program types is different, the storage controller can determine, according to the program type, the first program suspension times threshold corresponding to the program type in the mapping relationship information of the program type and the program suspension times threshold. Further, the storage controller can determine the maximum program suspension times threshold according to the first program suspension times threshold, the remaining word line quantity, and the remaining program suspension times.
[0043] In this way, when determining the maximum program suspension times threshold, the latest suspension situation of the target data block as a whole, the demand for subsequent suspension operations, and the more accurate first program suspension times threshold are comprehensively considered, so that a more accurate maximum program suspension times threshold can be determined.
[0044] In some optional embodiments, in the above-mentioned second mode, the specific steps of the storage controller according to the first program suspension times threshold, the remaining word line quantity, and the remaining program suspension times can include:
[0045] Step one, determining an average program suspension times according to the remaining program suspension times and the remaining word line quantity.
[0046] Step two, taking the minimum of the remaining program suspension number and the first program suspension number threshold as the first program suspension number threshold.
[0047] Step three, determining the maximum program suspension number threshold according to the average program suspension number and the first program suspension number threshold.
[0048] Specifically, the storage controller can determine the average program suspension number as the ratio of the remaining program suspension number and the remaining word line number. As in the first mode, the storage controller can take the minimum of the remaining program suspension number and the first program suspension number threshold as the first program suspension number threshold. Since the average program suspension number can reflect the average program suspension number of the remaining word lines, and the first program suspension number threshold can accurately reflect the maximum program suspension number currently allowed by the target word line, the storage controller can determine the maximum program suspension number threshold of the target word line in this program operation according to the average program suspension number and the first program suspension number threshold, so that the finally obtained maximum program suspension number threshold takes into account both the limit case and the word line balancing case, and is more in line with the actual situation.
[0049] For example, the above step three can use the following expression:
[0050]
[0051] Wherein, M is the maximum program suspension number threshold, A is the first program suspension number threshold, and B is the average program suspension number.
[0052] In the above expression, the determination of A takes into account the overall situation of the target data block and the influence of the program type, and B takes into account the word line balancing situation, that is, the subsequent possible program suspension number, so that A and B can be averaged to ensure that both cases can be considered comprehensively. Further, by taking the integer part downward, the problem of determining a program suspension number threshold that is too large and exceeds the data block limit can be avoided. At the same time, in the case of taking the integer part downward, the purpose of adding 1 to the first program suspension number threshold is to cause the last program suspension number to be unable to be used in the case that the remaining program suspension number of the target data block is 1, for example, when A is 1 and B is 0, resulting in M calculated as 0, causing the suspension operation to be unable to be performed in the program operation, wasting the program suspension number, and by adding 1, the last program operation can be ensured to be executed in this special case.
[0053] In some optional embodiments, in order to improve the efficiency of the read operation and the program operation, the storage controller can further perform the following operations based on the comparison result after comparing the first program suspension number with the first preset threshold:
[0054] When it is determined that the first programming has been suspended for a number of times less than the first preset threshold, the state information of the suspension marker is set to first preset state information. Alternatively, when it is determined that the first programming has been suspended for a number of times greater than or equal to the first preset threshold, the state of the suspension marker is set to second preset state information, where the second preset state information is used to indicate that the programming suspension operation is not allowed to be performed in the process of performing the programming operation on the target data block using the target word line.
[0055] The first preset state information can be used to indicate that the programming suspension operation is allowed to be performed in the process of performing the programming operation on the target data block using the target word line, and the second preset state information can be used to indicate that the programming suspension operation is not allowed to be performed in the process of performing the programming operation on the target data block using the target word line.
[0056] Specifically, when the storage controller determines that the first programming has been suspended for a number of times less than the first preset threshold, it indicates that the number of suspension operations on the target data block has not reached the limit, and the suspension operation is allowed to be performed on the target word line during the programming operation. Correspondingly, in order to facilitate the storage controller to determine that the read operation can be performed in time when the read request is obtained during the programming operation using the target word line, the state information of the suspension marker can be set to the first preset state information in advance. Alternatively, when the storage controller determines that the first programming has been suspended for a number of times 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, and the suspension operation is not allowed to be performed on the target word line during the programming operation. Correspondingly, in order to facilitate the storage controller to determine that the read operation is not performed in time when the read request is obtained during the programming operation using the target word line, the state information of the suspension marker can be set to the second preset state information.
[0057] Therefore, by pre-setting the suspension marker, the storage controller can directly and simply make a decision on whether to perform the suspension operation based on the indication information of the suspension marker when receiving the read request for the target data block, without the need to perform a real-time judgment operation based on the first programming has been suspended for a number of times and the first preset threshold. Further, in the case where it is determined that the suspension operation can be performed, the read operation can be efficiently completed, so that the storage controller can continue the programming operation earlier, thereby improving the efficiency of the programming operation.
[0058] In some optional embodiments, after determining the maximum suspension word line threshold of the target word line and completing the setting operation of the suspension marker, the storage controller can further perform the following specific steps:
[0059] In step one, when a target read request corresponding to a target data block is acquired and it is determined that the state of the suspension flag is first preset state information, a second programming suspension times in a process of performing programming operation on the target data block using the target word line is acquired.
[0060] In step two, when it is determined that the second programming suspension times is less than the maximum programming suspension times threshold, the programming operation of the target word line in the target data block is suspended.
[0061] In step three, according to the target read request, the read operation corresponding to the target read request is performed on the target data block using the target word line.
[0062] Specifically, during the programming operation of the target data block using the target word line by the storage controller, a read request for the target data block can be acquired. Since both the programming operation and the read operation need to use the word line corresponding to the target data block, when the target read request for the target data block is acquired, the storage controller needs to determine whether the current target word line still allows suspension operation. Accordingly, when the storage controller determines that the state of the suspension flag is first preset state information, the suspension operation times of the target word line in the current programming operation process can be determined, that is, the second programming suspension times is acquired. In addition, in the foregoing step, the storage controller has calculated the maximum programming suspension times threshold allowed for the target word line in the programming operation process, so it can be determined whether the second programming suspension times is less than the maximum programming suspension times threshold. If the second programming suspension times is less than the maximum programming suspension times threshold, it means that the suspension operation can be performed on the target word line, and at this time, the storage controller can immediately suspend the target word line and perform the read operation corresponding to the target read request on the target data block according to the target read request, and after the read operation is completed, the programming operation using the target word line is continued. If the second programming suspension times is equal to the maximum programming suspension times threshold, it means that the suspension operation cannot be performed on the target word line, and at this time, the storage controller can wait until the programming operation of the target word line is completed, and then perform the read operation corresponding to the target read request on the target data block according to the target read request.
[0063] In this way, the maximum programming suspension times threshold is set in the word line dimension, and the maximum programming suspension times threshold is determined based on the real-time suspension situation, so that the maximum programming suspension times threshold is more flexible and more accurate. Furthermore, using the appropriate maximum programming suspension times threshold to determine whether to perform the suspension operation can reduce hardware damage and can complete the read request in time.
[0064] In some optional embodiments, the firmware of the storage controller can be configured with a count field corresponding to each data block in the flash memory, to record the number of times the programming of the data block has been suspended in each write operation. In step S201, upon receiving the write request and determining the identification information of at least one data block corresponding to the write request, the storage controller can determine the target count field corresponding to the identification information of the target data block (which can be any one of the at least one data block corresponding to the write request) in the firmware according to the identification information of the target data block, and read the first number of times the programming of the target data block has been suspended from the target count field.
[0065] In this way, for each data block, the storage controller can use the corresponding number of times the programming has been suspended to flexibly calculate the maximum number of times the programming of the word line corresponding to the data block has been suspended.
[0066] In some optional embodiments, the firmware of the storage controller can be configured with a count field corresponding to each data block in the flash memory, to record the number of times the programming of the data block has been suspended in each write operation. In step S201, upon receiving the write request and determining the identification information of at least one data block corresponding to the write request, the storage controller can determine the target count field corresponding to the identification information of the target data block (which can be any one of the at least one data block corresponding to the write request) in the firmware according to the identification information of the target data block, and read the first number of times the programming of the target data block has been suspended from the target count field.
[0067] Step one, receiving a write request.
[0068] The write request includes write address information.
[0069] Step two, determining the identification information of at least one stripe corresponding to the write address information according to the write address information.
[0070] Step three, determining the target count field corresponding to the identification information of the target stripe in the firmware of the storage device according to the identification information of the target stripe.
[0071] The target stripe is the stripe including the target data block in the at least one stripe.
[0072] Step four, reading the target value from the target count field, and determining the target value as the first number of times the programming has been suspended.
[0073] Specifically, since the storage space for storing the firmware of the storage controller is limited, in order to save storage resources, the count field can be set in the dimension of the stripe. Accordingly, when the storage controller receives a write request, the write address information can be extracted from the write request, and based on the write address information, the identification information of at least one stripe corresponding to the write address information is determined. For the identification information of each stripe, the storage controller can determine the target count field corresponding to the identification information of the stripe from the plurality of count fields included in the firmware of the storage device according to the identification information of the stripe, and extract the target value as the first number of programming suspensions from the target count field.
[0074] During the programming operation, the storage controller performs programming operation on the same row of storage cells of all data blocks on the same stripe, and only the number of suspension operations during the programming operation in different data blocks is different. Accordingly, after completing the current programming operation, the storage controller can update the value of the target count field in combination with the number of programming suspensions of the target word line corresponding to each data block on the target stripe during the current programming operation, which can specifically include the following steps:
[0075] Step one, after completing the programming operation corresponding to each data block in the target stripe using the target word line, obtaining the number of programming suspensions corresponding to each data block during the programming operation.
[0076] Step two, determining the maximum number of programming suspensions from the number of programming suspensions corresponding to each data block during the programming operation.
[0077] Step three, updating the value of the target count field based on the maximum number of programming suspensions to obtain an updated value, which is used to determine the maximum number of programming suspensions threshold for performing the next programming operation on any data block on the target stripe using the target word line based on the updated value.
[0078] Specifically, after completing the programming operation corresponding to each data block in the target stripe using the target word line, the storage controller can obtain the number of programming suspensions corresponding to each data block during the programming operation, and determine the maximum number of programming suspensions from these numbers of programming suspensions, and subtract the maximum number of programming suspensions from the target value to obtain an updated value, and update the target count field with the updated value. In this way, before performing the next programming operation on any data block on the target stripe, the maximum number of programming suspensions threshold for performing the next programming operation on the data block using the target word line can be determined based on the updated value.
[0079] For example, the initial value of the target count field is 100 (i.e. the maximum total program suspend times of the target data block), the target stripe includes data block 1, data block 2, data block 3, in the current programming operation, the program suspend times of the target word line in data block 1 is 3, the program suspend times of the target word line in data block 2 is 1, and the program suspend times of the target word line in data block 3 is 2. The maximum program suspend times is 3, and the value of the target count field is updated to 100-3=97.
[0080] In this way, the storage resources can be saved, and it can be ensured that any data block will not cause hardware damage due to a large program suspend times threshold, i.e. it can be ensured that all data blocks on the target stripe meet the hardware constraint condition of the flash memory.
[0081] In some optional embodiments, when it is determined that the programming operation is completed, the first program suspend times can be updated according to the program suspend times of the target data block in the programming operation, for re-determining the maximum program suspend times threshold when the target data block is programmed by using other word lines next time.
[0082] 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, and 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 indicates that the programming operation of the target word line is completed, and the remaining word line quantity can be updated, so as to determine the maximum program suspend times threshold of other word lines when the target data block is programmed by using other word lines.
[0083] The process of the method for determining the program suspend times threshold of the storage controller will be described in detail below with a specific example. The detailed flow can be as shown in Figure 3
[0084] Step 1: The storage controller can store the program suspend times threshold corresponding to different programming types. For example, the program suspend times threshold corresponding to the coarse programming can be X, and the program suspend times threshold corresponding to the fine programming can be Y. In addition, the storage controller can store the maximum total program suspend times threshold of the data block, and the maximum total program suspend times threshold can be the product of the word line quantity (n) and the average program suspend times threshold (Z) of a single word line, i.e. n×Z.
[0085] Step 2, the storage controller can add a first count field and a second count field (may be referred to as "block_suspend_count") of the target word line in the firmware. The first count field is used to record the number of programming suspensions of the target word line in the current programming operation, and the second count field is used to record the number of programming suspensions corresponding to the target data block (the number of programming suspensions is the number of programming suspensions of other word lines in the target data block in the programming operation before the current programming operation).
[0086] Step 3, before initiating a programming request, the storage controller first judges whether the number of programming suspensions is less than the maximum total programming suspension threshold, that is, block_suspend_count < n x Z.
[0087] (1) When the value recorded in the programming suspension count field is equal to the maximum total programming suspension threshold, the suspend flag (Suspend Allow flag) is set to 0 (the second preset indication information), and step 5 is entered.
[0088] (2) When the value recorded in the programming suspension count field is less than the maximum total programming suspension threshold, the suspend flag (Suspend Allow flag) is set to 1 (the first preset indication information), and the maximum total programming suspension threshold minus the number of programming suspensions of the data block is determined as the remaining programming suspension number (may be referred to as "suspend_remain_count"), that is, suspend_remain_count = n x Z - block_suspend_count, and step 4 is entered.
[0089] Step 4, the storage controller judges the programming type of the current initiated programming operation, and determines the maximum programming suspension threshold of the target word line according to different programming types.
[0090] (1) The programming type is coarse programming. The minimum value of the remaining programming suspension number and X is determined as the maximum programming suspension threshold of the target field (may be referred to as "suspend_allow_count"), that is, suspend_allow_count = min (suspend_remain_count, X).
[0091] (2) The programming type is fine programming. The minimum value of the remaining programming suspension number and Y is determined as the maximum programming suspension threshold of the target field, that is, suspend_allow_count = min (suspend_remain_count, Y).
[0092] (3) The programming type is SLC word line programming or TLC word line programming. The sum value between X and Y is determined as the maximum programming suspension count threshold of the target field, i.e., suspend_allow_count = min (suspend_remain_count, X+Y).
[0093] Step 5, when determining that the suspension flag is 1, the storage controller sets the initial value of the first count field as 0, and increases the value of the first count field by 1 each time the suspension operation is performed.
[0094] Step 6, when the storage controller obtains a target read request of a high priority (for example, a request included in a preset queue) to the target data block, obtains the programming suspension count (which can be referred to as “suspend_count”, i.e., the second programming suspension count mentioned above) of the target word line from the first count field, determines whether the programming suspension count of the target word line is less than the maximum programming suspension count threshold, if yes, enters step 7, and if no, waits for the current programming operation to be completed before performing the read operation.
[0095] Step 7, the storage controller suspends the target word line, and performs the read operation corresponding to the target read request. In addition, the value of the first count field is increased by 1.
[0096] 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 in the next programming operation to the target data block.
[0097] The storage controller can include a large core and a small core, and the large core and the small core cooperate to complete the above operations. For example, the small core can be referred to as a flash channel controller (FCC), a NAND flash controller (NFC), etc. For example, the large core can be used to perform steps 1 to 4 and step 8 mentioned above. In step 4, the large core can send a programming request to the small core, and the small core can complete the programming operation and the suspension operation. The small core can be used to perform steps 5 to 7 mentioned above. After completing step 7, the small core can send a programming completion information to the large core, where the programming completion information can carry the latest value of the first count field.
[0098] The method for determining the programming suspension times threshold of the embodiments of the present application, before performing programming operation on any word line of the target data block, first acquires the programming type of the current programming operation and the first programming suspended times corresponding to the target data block. If it is determined that the first programming suspended times is less than the first preset threshold, it indicates that the suspension operation times of the target data block does not reach the limit, and the suspension operation is allowed to be performed on the target word line during the programming operation. Further, in this case, the remaining programming suspension times corresponding to the target data block can be determined according to the first preset threshold and the first programming suspended times. Moreover, considering that the damage degree of the target data block caused by the suspension operation on the word line is different under the programming operation of different programming types, when determining the maximum programming suspension times threshold corresponding to the target word line, the minimum value of the remaining programming suspension times and the first programming suspended times threshold can be determined as the maximum programming suspension times threshold. In this way, in the case that the remaining programming suspension times is less than the first programming suspended times threshold, the smaller remaining programming suspension times is selected as the maximum programming suspension times threshold, so that the suspension operation is performed with the maximum programming suspension times supported by the data block as the upper limit, and no matter under which programming type, the problem that the data block is damaged due to the first programming suspended times threshold being set too large can be avoided. In the case that the remaining programming suspension times is greater than the first programming suspended times threshold, the suspension operation times accepted by the data block is more, at this time, the smaller first programming suspended times threshold is selected as the maximum programming suspension times threshold, and the first programming suspended times threshold allowed by the current programming type is selected as the maximum programming suspension times threshold, so that the suspension operation can be performed in time in the current programming operation, and the read request can be completed in time.
[0099] From the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software and the necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment.
[0100] The embodiments of the present application also provide a determination device for a programming suspension times threshold, as shown in Figure 4 The determination device comprises:
[0101] The acquisition module 410 is configured to acquire the programming type of the programming operation corresponding to the target word line and the first programming suspended times corresponding to the target data block, wherein the target data block is one of the data blocks included in the storage device, and the target word line is any word line of the plurality of word lines corresponding to the target data block.
[0102] The determining module 420 is configured to, when determining that the first programming suspended times is less than the first preset threshold, determine, according to the first preset threshold and the first programming suspended times, a remaining programming suspended times corresponding to the target data block, wherein the first preset threshold is used to indicate a maximum total programming suspended times of all word lines of the target data block; and determine, according to the programming type and the remaining programming suspended times, a maximum programming suspended times threshold in a process of performing a programming operation on the target data block using the target word line.
[0103] In some optional embodiments, the determining module 420 is specifically configured to:
[0104] According to the programming type, obtain a first programming suspended times threshold corresponding to the programming type;
[0105] Obtain a remaining word line number of an unfinished programming operation corresponding to the target data block;
[0106] Determine an average programming suspended times according to the remaining programming suspended times and the remaining word line number;
[0107] Determine a second programming suspended times threshold as a minimum value between the remaining programming suspended times and the first programming suspended times threshold;
[0108] Determine the maximum programming suspended times threshold according to the average programming suspended times and the second programming suspended times threshold.
[0109] In some optional embodiments, the programming type is one of a coarse programming type, a fine programming type and a mixed programming type; and the determining module 420 is specifically configured to:
[0110] When determining that the programming type is the coarse programming type, determine a minimum value between a programming suspended times threshold corresponding to the coarse programming type and the remaining programming suspended times as the maximum programming suspended times threshold;
[0111] Or, when determining that the programming type is the fine programming type, determine a minimum value between a programming suspended times threshold corresponding to the fine programming type and the remaining programming suspended times as the maximum programming suspended times threshold;
[0112] Or, when determining that the programming type is the mixed programming type, determine a minimum value between a programming suspended times threshold corresponding to the mixed programming type and the remaining programming suspended times as the maximum programming suspended times threshold, wherein the programming suspended times threshold corresponding to the mixed programming type is a sum of programming suspended times thresholds corresponding to the coarse programming type and the fine programming type respectively.
[0113] In some optional embodiments, the determining module 420 is specifically configured to:
[0114] Determine the maximum programming suspended times threshold according to the average programming suspended times and the second programming suspended times threshold, using an expression:
[0115] wherein M is a maximum program suspend times threshold, A is a second program suspend times threshold, and B is an average program suspend times.
[0116] In some optional embodiments, the apparatus further includes a setting module 430 configured to:
[0117] set the state information of the suspend flag to first preset state information when it is determined that the first program suspend times is less than the first preset threshold, wherein the first preset state information is used to indicate that the program suspend operation is allowed to be performed in the process of performing the program operation on the target data block using the target word line.
[0118] or
[0119] set the state information of the suspend flag to second preset state information when it is determined that the first program suspend times is greater than or equal to the first preset threshold, wherein the second preset state information is used to indicate that the program suspend operation is not allowed to be performed in the process of performing the program operation on the target data block using the target word line.
[0120] In some optional embodiments, the apparatus further includes a suspending module 440 and a read operation module 450:
[0121] the suspending module 440 is configured to, when the target read request corresponding to the target data block is acquired and it is determined that the state information of the suspend flag is the first preset state information, acquire a second program suspend times in the process of performing the program operation on the target data block using the target word line, and suspend the program operation of the target data block by the target word line when it is determined that the second program suspend times is less than the maximum program suspend times threshold.
[0122] 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.
[0123] In some optional embodiments, the suspending module 440 is further configured to:
[0124] determine not to suspend the program operation of the target data block by the target word line when it is determined that the second program suspend times is equal to the maximum program suspend times threshold.
[0125] and perform the read operation corresponding to the target read request on the target data block using the target word line according to the target read request after the program operation on the target data block using the target word line is completed.
[0126] In some optional embodiments, the acquiring module 410 is specifically configured to:
[0127] receiving a write request, wherein the write request comprises write address information;
[0128] determining, according to the write address information, identification information of at least one stripe corresponding to the write address information;
[0129] determining, according to the identification information of the target stripe, a target count field corresponding to the identification information of the target stripe in firmware of the storage device, wherein the target stripe is a stripe including the target data block in the at least one stripe;
[0130] reading a target value from the target count field, and determining the target value as the first programming suspension times.
[0131] In some optional embodiments, the apparatus further comprises an updating module 460 configured to:
[0132] after completing the programming operations corresponding to the plurality of data blocks in the target stripe using the target word line, obtaining programming suspension times corresponding to the plurality of data blocks in the programming operations respectively;
[0133] determining a maximum programming suspension time from the programming suspension times corresponding to the plurality of data blocks in the programming operations respectively;
[0134] updating the value of the target count field based on the maximum programming suspension time to obtain an updated value, and determining, before performing a next programming operation on any data block of the target stripe, a maximum programming suspension times threshold for performing the next programming operation on the data block using the target word line based on the updated value.
[0135] The features of the embodiments of the apparatus for determining the programming suspension times threshold can be understood in the light of the features of the embodiments of the method for determining the programming suspension times threshold, which will not be repeated here.
[0136] Embodiments of the present application further provide an electronic device, such as Figure 5 as shown, comprising a memory 10 and a processor 20, the memory 10 storing a computer program, and the processor 20 being configured to run the computer program to perform the steps in any of the embodiments of the method for determining the programming suspension times threshold. The electronic device can be the storage controller or the storage device described above.
[0137] Embodiments of the present application further provide a computer readable storage medium storing a computer program, wherein the computer program is configured to run to perform the steps in any of the embodiments of the method for determining the programming suspension times threshold.
[0138] In an example embodiment, the computer readable storage medium described above can include, but is not limited to, a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.
[0139] Embodiments of the present application also provide a computer program product, which comprises a computer program, and the computer program, when executed by a processor, implements the steps in any of the above-described programming suspension times threshold determination method embodiments.
[0140] Embodiments of the present application also provide another computer program product, which comprises a non-volatile computer readable storage medium, and the non-volatile computer readable storage medium stores a computer program, and the computer program, when executed by a processor, implements the steps in any of the above-described programming suspension times threshold determination method embodiments.
[0141] The skilled in the art can further realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in the above description in general terms. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0142] The above describes in detail a programming suspension times threshold determination method, device, electronic equipment, storage medium and program product provided by the present application. The principles and implementation modes of the present application are described in this paper by applying specific examples. The above description of the examples is only applicable to help understand the method and core idea of the present application. It should be noted that for those skilled in the art, without departing from the principles of the present application, some 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 of determining a threshold of program suspend times, the method comprising: determining a number of program suspend times; and comparing the number of program suspend times to the threshold of program suspend times. The method comprises: obtaining a programming type of a programming operation corresponding to a target word line, and a first programming suspension times corresponding to a target data block, wherein the target data block is one of data blocks included in a storage device, the target word line is any one of a plurality of word lines corresponding to the target data block, and the programming type is one of a coarse programming type, a fine programming type, and a mixed programming type, and the mixed programming type corresponds to a programming operation including a coarse programming operation and a fine programming operation; after determining that the first programming suspension times is less than a first preset threshold, determining a remaining programming suspension times corresponding to the target data block according to the first preset threshold and the first programming suspension times, and setting state information of a suspension flag to first preset state information, wherein the first preset state information is used to indicate that a programming suspension operation is allowed in a process of performing a programming operation on the target data block using the target word line, and the first preset threshold is used to indicate a maximum total programming suspension times of all word lines of the target data block; determining a maximum programming suspension times threshold in the process of performing the programming operation on the target data block using the target word line according to the programming type and the remaining programming suspension times.
2. The method of claim 1, wherein, The determining of the maximum programming suspension times threshold in the process of performing the programming operation on the target data block using the target word line according to the programming type and the remaining programming suspension times comprises: obtaining a first programming suspension times threshold corresponding to the programming type according to the programming type; obtaining a remaining word line number of an unfinished programming operation corresponding to the target data block; determining an average programming suspension times according to the remaining programming suspension times and the remaining word line number; taking a minimum value of the remaining programming suspension times and the first programming suspension times threshold as a second programming suspension times threshold; determining the maximum programming suspension times threshold according to the average programming suspension times and the second programming suspension times threshold.
3. The method of claim 1, wherein, The determining of the maximum programming suspension times threshold in the process of performing the programming operation on the target data block using the target word line according to the programming type and the remaining programming suspension times comprises: when it is determined that the programming type is the coarse programming type, taking a minimum value of a programming suspension times threshold corresponding to the coarse programming type and the remaining programming suspension times as the maximum programming suspension times threshold; or, when it is determined that the programming type is the fine programming type, taking a minimum value of a programming suspension times threshold corresponding to the fine programming type and the remaining programming suspension times as the maximum programming suspension times threshold; or, when it is determined that the programming type is the mixed programming type, taking a minimum value of a programming suspension times threshold corresponding to the mixed programming type and the remaining programming suspension times as the maximum programming suspension times threshold, wherein the programming suspension times threshold corresponding to the mixed programming type is a sum of programming suspension times thresholds corresponding to the coarse programming type and the fine programming type respectively.
4. The method of claim 2, wherein, The determining the maximum program suspension number threshold according to the average program suspension number and the second program suspension number threshold adopts an expression: Wherein, M is the maximum program suspension number threshold, A is the second program suspension number threshold, and B is the average program suspension number.
5. The method of determining a threshold of programming suspension times according to any one of claims 1 to 4, characterized in that, The method further comprises: When it is determined that the first program suspension number is greater than or equal to the first preset threshold, the state of the suspension flag is set to second preset state information, wherein the second preset state information is used to indicate that the program suspension operation is not allowed in the process of performing the program operation on the target data block using the target word line.
6. The method of claim 5, wherein, After the determining the maximum program suspension number threshold according to the program type and the remaining program suspension number, the method further comprises: When the target read request corresponding to the target data block is acquired, and it is determined that the state of the suspension flag is the first preset state information, the second program suspension number in the process of performing the program operation on the target data block using the target word line is acquired; When it is determined that the second program suspension number is less than the maximum program suspension number threshold, the program operation of the target word line in the target data block is suspended; According to the target read request, the read operation corresponding to the target read request is performed on the target data block using the target word line.
7. The method of claim 6, wherein, The method further comprises: When it is determined that the second program suspension number is equal to the maximum program suspension number threshold, it is determined that the program operation of the target word line in the target data block is not suspended; And after the program operation on the target data block using the target word line is completed, the read operation corresponding to the target read request is performed on the target data block using the target word line according to the target read request.
8. The method of determining a threshold of programming suspension times according to any one of claims 1 to 4, characterized in that, The acquiring the first program suspension number corresponding to the target data block comprises: Receiving a write request, wherein the write request comprises write address information; According to the write address information, the identification information of at least one strip corresponding to the write address information is determined; According to the identification information of the target strip, the target counting field corresponding to the identification information of the target strip is determined in the firmware of the storage device, wherein the target strip is a strip including the target data block in the at least one strip; The target value is read from the target counting field, and the target value is determined as the first program suspension number.
9. The method of claim 8, wherein, The method further comprises: After the program operation corresponding to a plurality of data blocks in the target strip is completed using the target word line, the program suspension number corresponding to the program operation of each of the plurality of data blocks is acquired; The maximum program suspension number is determined from the program suspension number corresponding to the program operation of each of the plurality of data blocks. Based on the maximum number of program suspend times, the value of the target count field is updated to obtain an updated value, and the maximum number of program suspend times threshold for performing the next program operation on any data block of the target strip using the target word line is determined based on the updated value before the next program operation is performed on the data block.
10. An electronic device, comprising: Comprising: a memory for storing a computer program; a processor for implementing the steps of the method for determining the program suspend times threshold as claimed in any one of claims 1 to 9 when executing the computer program.
Citation Information
Patent Citations
Memory system, memory controller and operating method of memory system
CN113806255A