A method for executing read retry operation of solid state hard disk and its application
By building the RCL of the retry count list of flash blocks, the read retry operation of the solid state drive is optimized, and the threshold is set to reduce invalid checks and corrections are solved, and the read delay problem is improved.
Patent Information
- Application Number
- CN202111490392.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-08
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2041-12-08
AI Technical Summary
The read retry operation of existing solid-state drives leads to an increase in read delay, affecting read performance, mainly due to the inefficiency of the error checking and correction process of multiple rereading data and error checking and correction of errors.
By pre-constructing the retry count list RCL, recording the correspondence between the status information of the flash block and the reread count range, setting the direct reread threshold THrr and stop reread threshold THstop, reducing invalid error checking and correction operations, and optimizing read retry operations process.
It effectively reduces the delay of read retry operations, improves the overall read performance of the solid-state drive, and reduces storage overhead and search efficiency.
Smart Images

Figure CN114185710B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of memory, and more specifically, relates to a method for executing a read retry operation of a solid state hard disk and an application thereof. Background Art
[0002] NAND flash-based SSDs are a popular technology for building storage devices in modern computer systems to meet the requirements of high storage capacity and high I / O performance.
[0003] There are three steps to read data from a solid-state drive: applying a threshold voltage of a specific size to read data from a NAND flash page; transferring the read data from the flash page to a controller; and the error correction code (ECC) in the controller checking and correcting errors in the data. If the bit errors in the read data are successfully corrected or there are uncorrectable bit errors, the read is considered a failure.
[0004] In order to ensure the reliability of stored data, when a bit error that cannot be corrected by the error correction code occurs in the read data, the solid-state drive controller will perform a read retry operation to reread the data. Each time the data is reread in the read retry operation, it will try to use a different read reference voltage to reread the same data, and each time the data is reread, the error correction code will be used to re-check and correct the error until no uncorrectable bit errors occur or the correct data cannot be obtained after trying all read reference voltages. The former corresponds to a successful read, and the latter corresponds to a read failure.
[0005] The read retry operation can effectively ensure the reliability of data, but the process of re-reading data multiple times and using error correction codes to check and correct errors will increase the read latency and deteriorate the read performance of the SSD. Summary of the invention
[0006] In view of the defects of the prior art and the need for improvement, the present invention provides a method for executing a read retry operation of a solid-state hard disk and a method for processing a read request, the purpose of which is to reduce the read retry delay to improve the overall read performance of the solid-state hard disk.
[0007] To achieve the above object, according to one aspect of the present invention, a method for executing a read retry operation of a solid state drive is provided, comprising:
[0008] Obtain the status information of the accessed flash memory block, and obtain the corresponding re-reading number range from the pre-created retry number list RCL, and use its lower and upper bounds as the direct rereading threshold TH respectively. rr and stop rereading threshold TH stop ;
[0009] After each re-reading of data, if the current re-reading times RR n <TH rr , then directly read the data again next time; if TH rr ≤RR n <TH stop , the error correction code is used to check and correct the read data for errors. If there are uncorrectable errors in the corrected data, the next re-reading is performed. If there are no uncorrectable errors in the corrected data, the corrected data is returned, and the read retry operation ends;
[0010] Among them, the status information includes one or more factors that affect the durability of the flash memory block; the retry count list RCL is used to record the correspondence between the flash memory status information and the number of re-read times required to obtain the correct data, which is obtained by the historical data statistics of the flash memory block in the corresponding state.
[0011] When a flash memory page performs a read retry operation due to a read failure, it is necessary to repeatedly read the data and perform error checking and correction multiple times before the correct data can be read through the read retry operation. In the read retry operation, the number of re-reads required to obtain the correct data is often within a specific range, which is related to the state of the flash memory. In addition, at the beginning of the read retry operation, that is, when the number of re-reads is small, even if the error correction code is used for error checking and correction, there will still be uncorrectable bit errors in the data.
[0012] The present invention records the corresponding relationship between the state information of the flash memory block and the re-reading number range in the retry number list RCL in advance by means of statistics. In the read retry operation, the corresponding re-reading number range is first obtained from the retry number list RCL according to the state information of the flash memory block, and the lower limit of the range is used as the direct rereading threshold TH. rr When the number of re-read times is less than the threshold, only re-reading is performed without error checking and correction of the read data. When the number of re-read times is within the acquired range, error checking and correction are performed to obtain correct data. Due to the initial stage, that is, when the current number of re-read times does not exceed the direct re-read threshold, even if error checking and correction are performed, there will still be uncorrectable bit errors in the data, and subsequent re-reading is still performed. Therefore, the present invention reduces the time required for error checking and correction in the initial stage while ensuring that correct data can be obtained through the read retry operation, thereby effectively reducing the read delay introduced by the read retry operation and improving the overall read performance of the solid-state hard disk.
[0013] Furthermore, the method for executing a read retry operation of a solid state drive provided by the present invention further includes:
[0014] If RRn ≥TH stop , the data read is determined to have failed and the read retry operation ends.
[0015] For a specific flash memory block, when the number of re-reads of the flash memory page in the read retry operation exceeds the upper limit of the range of the number of re-reads it should perform, the probability of obtaining correct data by re-reading and performing error checking and correction is small; the present invention uses the upper limit of the range of the number of re-reads as the stop re-reading threshold, and uses the number of re-reads exceeding the threshold as a prediction condition for read failure. Compared with the existing read retry operation that requires continuous re-reading until all read reference voltages are tried, the present invention can avoid performing invalid re-reading and error checking and correction, thereby reducing read latency when a read fails, and further improving the overall read performance of the solid-state hard disk.
[0016] Furthermore, the status information includes: the number of erase and write times and the data retention time of the flash memory block.
[0017] The number of re-read times in a read retry operation is closely related to the number of Program / Erase (P / E) times of the flash memory block in the solid-state drive and the data retention time from the last erase to the current state. The present invention utilizes a combination of the number of flash memory block erases and the data retention time as state information, which can more accurately reflect the true state of the flash memory block, and further accurately obtain the range of the number of re-read times corresponding to the current state of the flash memory block.
[0018] Furthermore, the retry count list RCL is constructed in the following manner:
[0019] Dividing the number of erase / write times into different erase / write number categories according to a preset first granularity, and dividing the data retention time into different time nodes according to a preset second granularity;
[0020] From the historical data of the flash memory block, the number of re-reads required to read the correct data through each read retry operation is obtained, and the corresponding number of erase and write times and data retention time are recorded to determine the corresponding erase and write number category and time node;
[0021] The set of re-read times under each (erase number category, time node) combination is counted to determine the re-read number range corresponding to each (erase number category, time node) combination, and recorded in the retry number list RCL.
[0022] Since the flash memory blocks with similar status have similar corresponding re-reading number ranges, the present invention divides the erasure number and data retention time in the status information into multiple erasure number categories and time nodes, and records the corresponding re-reading number ranges according to the erasure number categories and time nodes. This can effectively reduce the storage overhead required to store the corresponding relationship while ensuring the accurate recording of the correspondence between the status information and the re-reading number range, and ensure the search efficiency of the retry number list RCL.
[0023] Furthermore, the retry count list RCL is stored in the built-in DRAM of the solid state disk.
[0024] The present invention stores the retry count list RCL in the built-in DRAM of the solid state disk, so that the RCL has a higher search efficiency.
[0025] According to another aspect of the present invention, a method for processing a read request of a solid state drive is provided, comprising the following steps:
[0026] (S1) reading data from the requested flash memory page for the first time, and performing error checking and correction on the read data using an error correction code, and if uncorrectable errors exist in the corrected data, proceeding to step (S2); if uncorrectable errors do not exist in the corrected data, proceeding to step (S3);
[0027] (S2) performing a read retry operation using the read retry operation execution method of the solid state drive provided by the present invention, and if correct data is obtained, proceeding to step (S3); if correct data is not obtained, proceeding to step (S4);
[0028] (S3) determining that the data is read successfully, and outputting the correct data, and the read request processing ends;
[0029] (S4) It is determined that data reading has failed, and the read request processing ends.
[0030] According to another aspect of the present invention, there is provided an electronic device, comprising:
[0031] A computer-readable storage medium for storing a computer program;
[0032] And a processor, used to read the computer program stored in the computer-readable storage medium, execute the read retry operation execution method of the solid-state hard disk provided by the present invention, and / or the read request processing method of the solid-state hard disk provided by the present invention.
[0033] According to another aspect of the present invention, a solid state drive is provided, comprising: a flash memory, a built-in DRAM, and the electronic device provided by the present invention.
[0034] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects:
[0035] (1) The present invention records the corresponding relationship between the state information of the flash memory block and the re-reading number range in the retry number list RCL in advance by means of statistics. In the read retry operation, the corresponding re-reading number range is first obtained from the retry number list RCL according to the state information of the flash memory block, and the lower limit of the range is used as the direct rereading threshold TH. rr When the number of re-reads is less than the threshold, only re-reading is performed without error checking and correction of the read data. When the number of re-reads is within the acquired range, error checking and correction are performed to obtain correct data. Therefore, the present invention reduces the time required for error checking and correction in the initial stage while ensuring that correct data can be obtained through the read retry operation, thereby effectively reducing the read delay introduced by the read retry operation and improving the overall read performance of the solid-state drive.
[0036] (2) The present invention uses the upper limit of the re-read times range as the stop re-read threshold, and uses the re-read times exceeding the threshold as a prediction condition for read failure, which can avoid performing invalid re-reads and error checking and correction. Therefore, when a read fails, the read delay can be reduced, further improving the overall read performance of the solid-state drive.
[0037] (3) The present invention utilizes a combination of the number of erase and write times and the data retention time of the flash memory block as status information, which can more accurately reflect the real status of the flash memory block and further accurately obtain the range of the number of re-read times corresponding to the current status of the flash memory block.
[0038] (4) When the present invention collects statistics on the historical data generated by the read-retry mechanism of a real solid-state hard disk, the number of erase and write times and the data retention time in the status information are divided into a plurality of erase and write number categories and time nodes, and the corresponding re-read number range is recorded according to the erase and write number categories and time nodes. This can effectively reduce the storage overhead required to store the corresponding relationship while ensuring the accurate recording of the corresponding relationship between the status information and the re-read number range, and ensure the search efficiency of the retry number list RCL. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 A flow chart of a read retry operation execution method provided by an embodiment of the present invention;
[0040] Figure 2 A schematic diagram of a retry count list RCL provided in an embodiment of the present invention;
[0041] Figure 3 A flow chart of a read request processing method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0043] In the present invention, the terms "first", "second", etc. (if any) in the present invention and the accompanying drawings are used to distinguish similar objects but not necessarily to describe a specific order or sequence.
[0044] In order to solve the technical problem that multiple re-reading and error checking and correction operations introduced by the existing solid-state hard disk read retry mechanism will increase the read delay and deteriorate the read performance, the present invention provides a read retry operation execution method for a solid-state hard disk and its application, and its overall idea is to analyze the differences in read retry operations under different states of the flash memory in the solid-state hard disk to dig out the correspondence between the state information of the flash memory block and the range of the number of re-reading times, as well as the execution status of the read retry operation at different stages, and based on the analysis results, reduce invalid operations without affecting the reading of correct data, so as to reduce the time required for the read retry operation, reduce the read delay, and improve the overall read performance of the solid-state hard disk.
[0045] Before explaining the technical solution of the present invention in detail, the relevant principles on which the present invention is based are briefly introduced as follows:
[0046] When a flash memory page performs a read retry operation due to a read failure, it is necessary to repeatedly read the data and perform error checking and correction multiple times before the correct data can be read through the read retry operation. In the read retry operation, the number of re-reads required to obtain the correct data is often within a specific range, which is related to the state of the flash memory.
[0047] Since the number of re-reads in the read retry operation is accumulated from 0, and for flash memory blocks with the same erase and write times and retention time, the corresponding number of re-reads will be a range value due to process variations, the entire read retry operation can be divided into three stages; rr and TH stop Respectively represent the lower and upper bounds of the re-reading times range, with RR n Indicates the current number of re-reads. In the three stages, the execution of the read retry operation is as follows:
[0048] In the first stage, RR n <TH rr,At this time, even if the error correction code is used to perform error checking and correction on the re-read data, there will still be uncorrectable bit errors in the data;
[0049] In the second stage, TH rr ≤RR n <TH stop At this time, the error correction code is used to check and correct the errors of the re-read data, and the correct data can be read with a high probability;
[0050] In the third stage, RR n ≥TH stop , at this time, the probability of obtaining correct data by re-reading and performing error checking and correction is small.
[0051] In order to quickly obtain the corresponding re-reading number range in the read retry operation, the present invention selects appropriate state information to measure the state of the flash memory block, and pre-statistics the historical data generated by the read retry mechanism of the real solid-state hard disk to obtain the reading number range corresponding to different states, and establishes a retry number list RCL to record the corresponding relationship. The state information includes one or more factors that affect the durability of the flash memory block.
[0052] The following are examples.
[0053] Embodiment 1:
[0054] A method for executing a read retry operation of a solid state drive, such as Figure 1 As shown, including:
[0055] Obtain the status information of the accessed flash memory block, and obtain the corresponding re-reading number range from the pre-created retry number list RCL, and use its lower and upper bounds as the direct rereading threshold TH respectively. rr and stop rereading threshold TH stop ;
[0056] After each re-reading of data, if the current re-reading times RR n <TH rr , then directly read the data again next time; due to RR n <TH rr Even if the error correction code is used to perform error checking and correction on the re-read data, there will still be uncorrectable bit errors in the data, and a subsequent re-read operation is still required. Therefore, the present embodiment does not perform error checking and correction on the re-read data at this stage, which will not affect the acquisition of correct data, but can avoid performing invalid error checking and correction operations, thereby reducing the time required for the read retry operation and reducing the read delay;
[0057] If THrr ≤RR n <TH stop , the error correction code is used to check and correct the read data for errors. If there are uncorrectable errors in the corrected data, the next re-reading is performed. If there are no uncorrectable errors in the corrected data, the corrected data is returned, and the read retry operation ends;
[0058] In order to further reduce the time required for the read retry operation and lower the read latency, this embodiment further includes:
[0059] If RR n ≥TH stop , the data read is determined to have failed, and the read retry operation ends; due to RR n ≥TH stop When the error is checked and corrected, the probability of obtaining the correct data by re-reading and performing error checking and correction is small, and the invention converts RR n ≥TH stop As a prediction condition for read failure, compared to the existing read retry operation which requires continuous re-reading until all read reference voltages are tried, this embodiment can avoid performing invalid re-reading and error checking and correction, thereby reducing read latency when a read fails, and further improving the overall read performance of the solid-state drive.
[0060] Considering that the number of re-read times in a read retry operation is closely related to the number of flash memory block erases (Program / Erase, P / E) in the solid-state hard disk and the data retention time from the last erase to the current state, as an optional implementation method, in this embodiment, the erase time and data retention time of the flash memory block are used to jointly reflect the state information of the flash memory block; in addition, considering that the flash memory blocks with similar states have similar corresponding re-read times, in order to reduce the storage overhead of the RCL and ensure the efficiency of the table lookup while ensuring the accurate recording of the corresponding relationship between the state information and the re-read times, in this embodiment, Instead of directly recording the correspondence between (erase and write times, data retention time) and the range of re-read times point by point, the erase and write times and data retention time are further divided. Specifically, the erase and write times are divided into multiple erase and write times categories with 1K times as one category, and the data retention time is divided into multiple time nodes with three months as one time node. The erase and write times categories obtained by division include 0, 1K, 2K, etc., and the time nodes obtained by division are 0, 3, 6, 9 and 12 months. The correspondence recorded in the RCL is specifically the correspondence between the combination of (erase and write times category, time node) and the range of re-read times:
[0061] Specifically, in this embodiment, the retry count list RCL is constructed in the following manner:
[0062] The erase times are divided into different erase times categories according to a preset first granularity (i.e., 1K), and the data retention time is divided into different time nodes according to a preset second granularity (i.e., three months);
[0063] From the historical data of the flash memory block, the number of re-reads required to read the correct data through each read retry operation is obtained, and the corresponding number of erase and write times and data retention time are recorded to determine the corresponding erase and write number category and time node;
[0064] Count the set of re-read times under each (erase and write times category, time node) combination to determine the re-read times range corresponding to each (erase and write times category, time node) combination; the minimum value and maximum value in the set of re-read times under the (erase and write times category, time node) combination are the lower bound and upper bound of the read times range corresponding to the corresponding (erase and write times category, time node) combination;
[0065] The statistically obtained (erase count category, time node) combination and the corresponding re-read count range are recorded in the retry count list RCL;
[0066] In this embodiment, the established RCL is as follows: Figure 2 As shown in the figure, in the actual table lookup process, the corresponding (erase count category, time node) combination is first determined according to the current erase count and data retention time of the flash memory block, and the corresponding re-read count range can be obtained from the established RCL; for example, for a flash memory block with an erase count of PE = 2000 and a data retention time of RT = 11 months, the corresponding erase count category is 2000 and the time node is 12 months. By searching the RCL, it can be seen that the corresponding re-read count range is [17,25]. Accordingly, TH rr =17,TH stop =25;
[0067] As a preferred implementation, when storing the corresponding relationship in the RCL, the present embodiment will store it in an orderly manner according to the erasure number categories, and in an orderly manner according to the time nodes when the erasure number categories are the same, so that the corresponding re-reading number range can be quickly obtained through the search algorithm; for example, after sequentially matching the erasure number, the binary search method is used to match the data retention time, and the direct re-reading threshold TH can be obtained after the match is successful. rr and stop rereading threshold TH stop ;
[0068] It should be noted that the division granularity of the number of erase and write times and the data retention time here is only an exemplary description and should not be understood as the sole limitation of the present invention. In some other embodiments of the present invention, the corresponding division granularity can also be adjusted to other values. The selection of the division granularity ensures that the number of re-read times of the flash memory block is similar when (erase and write number category, time node) are the same.
[0069] It should also be noted that in addition to the erase and write times and data retention time used in this embodiment, other factors that affect the durability of the flash memory, such as the read times and flash memory process variations, can also be used to measure the status of the flash memory.
[0070] Optionally, in this embodiment, the retry count list RCL is stored in a built-in DRAM of the solid state disk.
[0071] Embodiment 2:
[0072] A method for processing a read request of a solid state drive, such as Figure 3 As shown, the following steps are included:
[0073] (S1) reading data from the requested flash memory page for the first time, and performing error checking and correction on the read data using an error correction code, and if uncorrectable errors exist in the corrected data, proceeding to step (S2); if uncorrectable errors do not exist in the corrected data, proceeding to step (S3);
[0074] (S2) performing a read retry operation using the read retry operation execution method for a solid state drive provided in the first embodiment above. If correct data is obtained, proceed to step (S3); if correct data is not obtained, proceed to step (S4);
[0075] (S3) determining that the data is read successfully, and outputting the correct data, and the read request processing ends;
[0076] (S4) It is determined that data reading has failed, and the read request processing ends.
[0077] Since the read retry operation execution method of the solid-state hard disk provided in the above-mentioned embodiment 1 requires a shorter time than the traditional solid-state hard disk read retry mechanism, the read request processing method provided in this embodiment can quickly obtain the correct data or quickly determine the read failure after the first data read failure triggers the read retry operation, and the read delay is low.
[0078] Embodiment 3:
[0079] An electronic device, comprising:
[0080] A computer-readable storage medium for storing a computer program;
[0081] And a processor, used to read the computer program stored in the computer-readable storage medium, execute the read retry operation execution method of the solid-state hard disk provided in the above-mentioned embodiment 1, and / or the read request processing method of the solid-state hard disk provided in the above-mentioned embodiment 2.
[0082] Embodiment 4:
[0083] A solid state hard disk comprises: a flash memory, a built-in DRAM and the electronic device provided in the above-mentioned embodiment 3.
[0084] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for executing a read retry operation of a solid state drive, It is characterized in that include: Obtain the status information of the accessed flash memory block, and obtain the corresponding re-reading number range from the pre-created retry number list RCL, and use its lower and upper bounds as the direct rereading threshold TH respectively. rr and stop rereading threshold TH stop ; After each re-reading of data, if the current re-reading times RR n <TH rr , then directly read the data again next time; if TH rr ≤RR n <TH stop , the error correction code is used to check and correct the read data for errors. If there are uncorrectable errors in the corrected data, the next re-reading is performed. If there are no uncorrectable errors in the corrected data, the corrected data is returned, and the read retry operation ends; The state information includes one or more factors that affect the durability of the flash memory block; the retry count list RCL is used to record the correspondence between the flash memory state information and the range of the number of re-reads required to obtain correct data, which is obtained by statistics of historical data of the flash memory block in the corresponding state; the construction method of the retry count list RCL includes: Dividing the number of erase / write times into different erase / write number categories according to a preset first granularity, and dividing the data retention time into different time nodes according to a preset second granularity; From the historical data of the flash memory block, the number of re-reads required to read the correct data through each read retry operation is obtained, and the corresponding number of erase and write times and data retention time are recorded to determine the corresponding erase and write number category and time node; The set of re-read times under each erase count category and time node combination is counted to determine the re-read times range corresponding to each erase count category and time node combination, and is recorded in the retry times list RCL.
2. The method for executing a read retry operation of a solid state drive according to claim 1, It is characterized in that Also includes: If RR n ≥TH stop , the data read is determined to have failed and the read retry operation ends.
3. The method for executing a read retry operation of a solid state drive according to claim 1 or 2, It is characterized in that The state information includes: the number of erase and write times and data retention time of the flash memory block.
4. The method for executing a read retry operation of a solid state drive according to claim 1 or 2, It is characterized in that The retry count list RCL is stored in the built-in DRAM of the solid state disk.
5. A method for processing a read request of a solid state drive, It is characterized in that The steps include: (S1) reading data from the requested flash memory page for the first time, and performing error checking and correction on the read data using an error correction code, and if uncorrectable errors exist in the corrected data, proceeding to step (S2); if uncorrectable errors do not exist in the corrected data, proceeding to step (S3); (S2) performing a read retry operation using the read retry operation execution method of a solid state drive according to any one of claims 1 to 4, and if correct data is obtained, proceeding to step (S3); if correct data is not obtained, proceeding to step (S4); (S3) determining that the data is read successfully, and outputting the correct data, and the read request processing ends; (S4) It is determined that data reading has failed, and the read request processing ends.
6. An electronic device, It is characterized in that include: A computer-readable storage medium for storing a computer program; And a processor, used to read the computer program stored in the computer-readable storage medium, and execute the read retry operation execution method of the solid-state hard disk as described in any one of claims 1 to 4, and / or the read request processing method of the solid-state hard disk as described in claim 5.
7. A solid state hard disk, It is characterized in that include: A flash memory, a built-in DRAM, and the electronic device as claimed in claim 6.
