CN117215503A - Method for reading flash memory data - Google Patents

Method for reading flash memory data Download PDF

Info

Publication number
CN117215503A
CN117215503A CN202311484659.4A CN202311484659A CN117215503A CN 117215503 A CN117215503 A CN 117215503A CN 202311484659 A CN202311484659 A CN 202311484659A CN 117215503 A CN117215503 A CN 117215503A
Authority
CN
China
Prior art keywords
read
flash memory
reading
data
threshold voltage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311484659.4A
Other languages
Chinese (zh)
Inventor
陈运松
聂建强
陈建佑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Spark Semiconductor Technology Co ltd
Original Assignee
Shenzhen Spark Semiconductor Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Spark Semiconductor Technology Co ltd filed Critical Shenzhen Spark Semiconductor Technology Co ltd
Priority to CN202311484659.4A priority Critical patent/CN117215503A/en
Publication of CN117215503A publication Critical patent/CN117215503A/en
Pending legal-status Critical Current

Links

Abstract

The invention provides a method for reading flash memory data, which comprises the following steps: the storage equipment responds to the received reading command to acquire a flash memory physical address corresponding to the reading task; when the storage equipment detects that uncorrectable errors exist in the data corresponding to the physical addresses of the flash memories corresponding to the read task, judging whether the optimal threshold voltage generated by the physical addresses corresponding to the uncorrectable errors exists or not; the optimal threshold voltage is generated based on the obtained flash memory physical address corresponding to the read task when the storage device is idle; if the storage device detects that the optimal threshold voltage which is generated by the physical address corresponding to the uncorrectable error data exists, the data in the flash memory is read by using the generated optimal threshold voltage. The processing speed of errors in the process of reading the flash memory data can be increased under the condition of reducing the risk of Read Disturb.

Description

Method for reading flash memory data
Technical Field
The present invention relates to the field of storage devices, and in particular, to a method for reading flash memory data.
Background
Nand Flash is a nonvolatile storage medium and is widely applied to storage products such as SD, eMMC, UFS, SSD. The basic memory Cell (Cell) of Nand Flash is an NMOS-like MOS transistor with Floating Gate (Floating Gate). When data is read, a read voltage is applied to the gate, and when the read voltage is greater than a threshold voltage, the transistor is turned on. When Nand Flash data is read, the Nand Flash data can be correctly read by using a default voltage. However, with the number of wear (P/E), the temperature changes, and the threshold voltage changes, and the default voltage cannot be read correctly. When the default voltage cannot read data correctly, other voltages are needed to read data, so that a common manufacturer will give tens of groups of read voltages (i.e. the rereading voltage Table) to cope with the situation that the default voltage cannot read data correctly. The Retry Table is used for coping with various application scenarios, such as high temperature writing and low temperature reading, low temperature writing and high temperature reading, less wear times, more wear times, read Disturb (Read Disturb), and the like. The manufacturer of the memory main control chip generally reads the data of Nand Flash in a firmware algorithm by traversing the voltage in the Retry Table.
The manufacturer of the storage main control chip generally directly uses the Retry Table provided by the Nand Flash stock. The number, sequence and voltage value of the read voltage in the Retry Table are directly related to the efficiency and accuracy of reading Nand Flash data. In the method of traversing the Retry Table, if the current data needs to use the last set of voltages, traversing the previous voltages is invalid, which results in slow reading speed and low efficiency. Thus traversing the Retry Table may result in a decrease in read performance.
In search, patent document 1 discloses a method of reading flash memory data that uses an already recorded optimum threshold voltage to accelerate an error handling process, and in handling uncorrectable errors, without searching for all available threshold voltages, directly uses the recorded optimum threshold voltage, and in most cases can reduce the time required for the error handling process. The scheme provided in patent document 1 solves the problem of the decrease in reading performance caused by the method of traversing the Retry Table in the prior art to a certain extent. In the scheme provided in patent document 1, it is necessary to record in advance the optimal threshold voltages corresponding to the respective physical addresses in the flash memory. In order to obtain the optimal threshold voltage corresponding to each physical address of the flash memory, the step of searching for the optimal threshold voltage is required for each physical address: traversing the Retry Table in advance, applying a plurality of read redo commands to the same physical page, and identifying the bit error rate of the read result of each read redo command to search for the optimal threshold voltage or an identification/index indicating the optimal threshold voltage.
However, the scheme provided in patent document 1 still faces the following difficulties in implementation: if the corresponding optimal threshold voltages are recorded in advance for all physical addresses in the flash memory, the step of searching the optimal threshold voltages for each physical address is required to be executed for all physical addresses of the flash memory, which causes a lot of unnecessary reading times of the flash memory, increases the risk of Read Disturb and may cause problems such as data loss. If the corresponding optimal threshold voltage is not recorded in advance for all physical addresses in the flash memory, a lot of unnecessary reading times of the flash memory can be reduced, but if an uncorrectable error exists in a physical address in the process of reading data of the physical address, the time required for an error processing process is increased and the error processing process is slowed down because the physical address does not record the corresponding optimal threshold voltage in advance.
Patent document 1: patent name, method and device for reading flash memory data and solid state drive, grant bulletin number, CN106448737B, first publication date, 2017-02-22.
Disclosure of Invention
The invention aims to provide a method and a device for reading flash memory data, which can accelerate the processing speed of errors in the process of reading the flash memory data under the condition of reducing the risk of Read Disturb.
The invention is characterized in that the invention only records the corresponding optimal threshold voltage in advance on the flash memory physical address corresponding to the data which is Read by the host (host), and does not record the corresponding optimal threshold voltage in advance on the flash memory physical address corresponding to the data which is not Read by the host (host), thereby not causing a lot of unnecessary reading times on the flash memory, reducing the risk of Read Disturb, and recording the corresponding optimal threshold voltage in advance on the flash memory physical address corresponding to the data which is Read by the host (host), and accelerating the processing speed of error in the process of reading the flash memory data.
In order to achieve the above object, the following technical scheme is provided:
in a first aspect, there is provided a method of reading flash data, the method comprising:
the storage equipment responds to the received reading command to acquire a flash memory physical address corresponding to the reading task;
when the storage equipment detects that uncorrectable errors exist in the data corresponding to the physical addresses of the flash memories corresponding to the read task, judging whether the optimal threshold voltage generated by the physical addresses corresponding to the uncorrectable errors exists or not; the optimal threshold voltage is generated based on the obtained flash memory physical address corresponding to the read task when the storage device is idle;
If the storage device detects that the optimal threshold voltage which is generated by the physical address corresponding to the uncorrectable error data exists, the data in the flash memory is read by using the generated optimal threshold voltage.
As a further improvement, the storage device responds to the received read command to obtain the flash memory physical address corresponding to the read task, which specifically includes:
when receiving a new command processing notice sent by a host, a storage device preferentially selects a commit queue with highest priority from a plurality of commit queues provided by the host as a target queue, and executes the operation of reading a read command on the target queue; the target queue is only used for placing a read command corresponding to the read task;
the storage device responds to a first read command received from the target queue, and adds the read command to the command buffer queue;
when the storage device detects that the target queue is not empty, continuously adding the rest read commands in the target queue into the command buffer queue;
when the storage device detects that the target queue is empty, the flash memory physical address corresponding to the current reading task is determined according to all the reading commands in the command buffer queue.
In a second aspect, there is provided a method of reading flash data, the method comprising:
The storage equipment responds to a received read command to acquire a flash memory physical address to be accessed so as to read data corresponding to the flash memory physical address;
when the storage equipment detects that uncorrectable errors exist in the data corresponding to the read flash memory physical addresses, judging whether optimal threshold voltages generated by the physical addresses corresponding to the uncorrectable errors exist or not; wherein the optimal threshold voltage is generated based on flash memory physical addresses that are read more than a preset number of times in a period of time when the memory device is idle;
if the storage device detects that the optimal threshold voltage which is generated by the physical address corresponding to the uncorrectable error data exists, the data in the flash memory is read by using the generated optimal threshold voltage.
As a further improvement, when the storage device is idle, the optimal threshold voltage is generated based on the flash memory physical address with the read times greater than the preset times in a period of time, which specifically includes:
the storage device sorts the flash memory physical addresses which are read for times greater than a preset times in a period of time according to the read times from high to low to obtain a read times sorting result;
And when the storage equipment is idle, according to the reading times sequencing result, generating an optimal threshold voltage for the physical addresses of the flash memories which are sequenced in the front preferentially.
As a further improvement, the method further comprises:
the storage device obtains the data storage time of the flash memory;
and when the storage device is idle, performing a read operation on the flash memory physical address of which the difference between the data storage time and the data storage life is smaller than the duration threshold.
As a further improvement, when the storage device is idle, performing a read operation on a flash memory physical address having a difference between a data retention time and a data retention period less than a duration threshold, specifically including:
the storage device sorts the flash memory physical addresses of which the difference value between the data storage time and the data storage time is smaller than the time length threshold value according to the time length of the data storage time from long to short to obtain a time length sorting result;
and when the storage equipment is idle, according to the time length sequencing result, preferentially executing the reading operation on the flash memory physical addresses which are sequenced to the front.
In a third aspect, there is provided a method of reading flash data, the method comprising:
the storage equipment responds to the received reading command to acquire a flash memory physical address corresponding to the reading task;
The storage device generates an optimal threshold voltage corresponding to a flash memory physical address corresponding to the current reading task and stores the optimal threshold voltage in an optimal threshold voltage table; the optimal threshold voltage is the threshold voltage of the lowest bit error rate corresponding to the corresponding physical address in the flash memory;
the memory device reads data in the flash memory using the acquired optimal threshold voltage.
As a further improvement, the storage device responds to the received read command to obtain the flash memory physical address corresponding to the read task, which specifically includes:
when receiving a new command processing notice sent by a host, a storage device preferentially selects a commit queue with highest priority from a plurality of commit queues provided by the host as a target queue, and executes the operation of reading a read command on the target queue; the target queue is only used for placing a read command corresponding to the read task;
the storage device responds to a first read command received from the target queue, and adds the read command to the command buffer queue;
when the storage device detects that the target queue is not empty, continuously adding the rest read commands in the target queue into the command buffer queue;
when the storage device detects that the target queue is empty, the flash memory physical address corresponding to the current reading task is determined according to all the reading commands in the command buffer queue.
As a further improvement, the method further comprises: in the process of executing the read command by the storage device, the host continuously adds the rest read commands corresponding to the current read task to the target queue.
As a further improvement, the method further comprises: in the process that the host continuously adds the rest read commands corresponding to the current read task to the target queue, the host continuously adds the read commands of all files with the same source partition descriptors in the current read task to the target queue.
Compared with the prior art, the method for reading the flash memory data has the following advantages:
because the optimal threshold voltage corresponding to the flash memory physical address corresponding to the data which is Read by the host (host) is recorded in advance, the optimal threshold voltage corresponding to the flash memory physical address corresponding to the data which is not Read by the host (host) is not recorded in advance, so that a plurality of unnecessary reading times of the flash memory are not caused, the risk of Read Disturb is reduced, and the optimal threshold voltage corresponding to the flash memory physical address corresponding to the data which is Read by the host (host) is recorded in advance, and the processing speed of errors occurring in the process of reading the flash memory data can be accelerated.
Drawings
FIG. 1 is an application environment diagram of a method for reading flash memory data according to the present invention;
FIG. 2 is a flowchart illustrating a method for reading flash memory data according to embodiment 1 of the present invention;
FIG. 3 is a flowchart illustrating a method for reading flash memory data according to embodiment 2 of the present invention;
FIG. 4 is a flowchart illustrating a method for reading flash memory data according to embodiment 2 of the present invention;
FIG. 5 is a flowchart illustrating a method for reading flash memory data according to embodiment 3 of the present invention;
FIG. 6 is a schematic diagram of a prior art method for forming a commit queue (NVMe SQ) by a host;
fig. 7 is a schematic diagram of a method for reading flash memory data according to embodiment 1 of the present invention;
FIG. 8 is a schematic diagram of a method for reading flash memory data according to embodiment 3 of the present invention;
the achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
Reference will now be made in detail to the present embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein the accompanying drawings are used to supplement the description of the written description so that one can intuitively and intuitively understand each technical feature and overall technical scheme of the present invention, but not to limit the scope of the present invention.
Before describing in detail the embodiments provided by the present invention, it is necessary to emphasize the inventive concepts of the present invention again in order for those skilled in the art to understand the technical contributions of the present invention compared to the prior art. The invention is characterized in that the invention only records the corresponding optimal threshold voltage in advance on the flash memory physical address corresponding to the data which is Read by the host (host), and does not record the corresponding optimal threshold voltage in advance on the flash memory physical address corresponding to the data which is not Read by the host (host), thereby not causing a lot of unnecessary reading times on the flash memory, reducing the risk of Read Disturb, and recording the corresponding optimal threshold voltage in advance on the flash memory physical address corresponding to the data which is Read by the host (host), and accelerating the processing speed of error in the process of reading the flash memory data.
In order to acquire the flash physical address corresponding to the data to be read by the host (host) in advance, the invention provides two technical ideas, the first is based on the characteristic of the NVMe specification, and the flash physical address corresponding to the data to be read by the host (host) is acquired in advance from the commit Queue (SQ) by adjusting the arbitration rule in the prior art. I.e. for the first technical path, the idea is to improve the arbitration rules of the read command queue between the host and the storage device. To facilitate understanding of the prior art arbitration rules for read command queues between a host and a storage device, a brief description will be given of a method for I/O optimization in a multi-queue environment provided in patent document 2 (patent name, system and method for I/O optimization in a multi-queued environment, grant bulletin number, US9317204B2, bulletin day, 2016-04-19). As shown in fig. 6, the Host (Host) maintains a Host queue (i.e., host Queues) for each process, each Host queue length is 10 as shown in fig. 6, the Host (Host) also maintains a plurality of commit Queues (i.e., NVMe SQs) for committing commands to the storage device, each commit queue length is 8 as shown in fig. 6, the Host (Host) adds commands in the Host queue (i.e., host Queues) of the corresponding process to the corresponding type of commit queue (i.e., NVMe SQ), the Host (Host) write DB (Doorbell) register informs the storage device that new commands are pending, and an Arbitration rule (i.e., arbitration) preset by the storage device determines which commands in the commit Queues (i.e., NVMe SQs) are read into the storage device in order for the command processing module of the storage device to execute the commands, which may be read commands, for example. The second is to predict the probability that each physical address will be accessed according to the number of times that each physical address is read-accessed in a period of time, and for the physical addresses with a large number of times that each physical address is read-accessed in a period of time, the probability that each physical address is read-accessed is also large, so that only the optimal threshold voltages corresponding to the physical addresses can be generated when the flash memory is idle, the step of generating the optimal threshold voltages is not required to be executed for all storage units of the flash memory, and a plurality of unnecessary read times can be reduced. Examples 1 and 2 provided below pertain to the first concept and example 3 pertains to the second concept.
Referring to fig. 1, a method for reading flash memory data according to the present invention is applied to a system shown in fig. 1, and the system includes a host 110 and a storage device 100. Host 110 includes an interface 111, a processor 112, and a DRAM (Dynamic Random Access Memory ) 113, and memory device 100 includes an interface 101, a control unit 102, one or more NVM chips 103, and a DRAM (Dynamic Random Access Memory ) 104. Host 110 is connected to interface 101 of storage device 100 via interface 111. Wherein the host queue and commit queue are located on the DRAM113 of the host 110, the control unit 102 includes an arbitration module 105, a voltage optimization module 107, and a command processing module 109, and the command buffer queue 106 and the optimal threshold voltage table 108 are located on the DRAM 104.
Example 1
Referring to fig. 1, 2 and 7, the present embodiment provides a method for reading flash memory data, the method including:
in step S202, the storage device 100 responds to the received read command to obtain the flash memory physical address corresponding to the current read task.
In step S204, when detecting that there is an uncorrectable error in the data corresponding to the physical address of the flash memory corresponding to the current reading task, the storage device 100 determines whether there is an optimal threshold voltage that has been generated by the physical address corresponding to the uncorrectable error data. The optimal threshold voltage is generated based on the obtained flash memory physical address corresponding to the current reading task when the storage device 100 is idle.
The best threshold voltage is the threshold voltage of the lowest bit error rate corresponding to the corresponding physical address in the flash memory, and how the voltage optimization module 107 determines the best threshold voltage belongs to the prior art, and specifically, refer to patent document 1, which is not repeated here.
It should be noted that, idle refers to an Idle state, which refers to a state in which the host 110 does not perform any write-read operation on the storage device 100, and at this time, the storage device 100 may perform internal initialization, such as garbage collection (garbage collection), wear leveling (wear leveling), data verification, and so on.
In step S204, the optimal threshold voltage is generated by the storage device 100 based on the obtained flash physical address corresponding to the current reading task, and the host 110 does not perform any write-read operation on the storage device 100 when the storage device 100 is Idle, i.e. when the Idle state is reached, and the voltage optimization module 107 of the storage device 100 generates the corresponding optimal threshold voltage based on the obtained flash physical address corresponding to the current reading task, so that the speed of reading data by the host 110 is not interfered. When the Idle state is exited, the memory device 100 may execute step S206 by using the obtained optimal threshold voltage, so as to speed up the processing of errors occurring in the process of reading the flash memory data.
In step S206, if the storage device 100 detects that the physical address corresponding to the uncorrectable error exists, the data in the flash memory is read using the generated optimal threshold voltage.
In one scenario, as shown in fig. 7, if the number of read commands corresponding to the current read task is 14, the 14 read commands are sequentially marked as F1 to F14, and the 14 read commands are all fetched from the commit queue 115 by the arbitration module 105 and added to the command buffer queue 106 first, and when all the commands of the current read task are fetched, the command processing module 109 sequentially fetches the 14 read commands from the command buffer queue 106 to execute. It will be appreciated that, based on consideration of faster response, in this embodiment, when the command processing module 109 executes a 14-stroke read command, the default read voltage is preferentially used to read data from the corresponding physical address, and only when the storage device 100 detects that there is an uncorrectable error in reading the data corresponding to the flash physical address corresponding to the current read task, the data in the flash is considered to be read using the optimal threshold voltage that has been generated. In this embodiment, the optimal threshold voltage is generated based on the obtained flash memory physical address corresponding to the current reading task when the memory device 100 is idle.
As shown in fig. 7, the specific generation process is: in the process of executing the read command in the command buffer queue 106 by the command processing module 109, after F3 is executed, the Idle state is entered, at this time, the voltage optimizing module 107 sequentially generates the corresponding optimal threshold voltages for the remaining unexecuted commands in the command buffer queue according to the order, and adds the generated optimal threshold voltages to the optimal threshold voltage table 108. For example, the current Idle state generates the optimal threshold voltage set V4 corresponding to the flash physical address corresponding to F4, and then exits the Idle state, and the optimal threshold voltage set V4 corresponding to the flash physical address corresponding to F4 is stored in the optimal threshold voltage table 108. If the physical address corresponding to F4 includes three blocks (blocks), i.e., three blocks B1, B2, and B3, the optimal threshold voltage set V4 corresponding to the flash physical address corresponding to F4 includes the optimal threshold voltages corresponding to the three blocks B1, B2, and B3. Nand Flash is composed of a plurality of blocks (blocks), each Block contains a plurality of layers (layers), each Layer is composed of a plurality of Word Lines (WL), and all WL read voltages in each Layer are substantially the same. And when Idle, reading the first WL of each layer in the Block, and acquiring the read voltage of the read WL to find the threshold voltage with the lowest bit error rate, thereby finally generating the optimal threshold voltage of the current Block.
When the Idle state is exited, the storage device 100 determines that the generated optimal threshold voltage exists in the optimal threshold voltage table 108, that is, the optimal threshold voltage set V4, when detecting that an uncorrectable error exists in the data corresponding to the flash memory physical address corresponding to the F4 command in the read task. The data in the flash memory is then read using the optimal set of threshold voltages V4.
The above embodiment has at least the following advantages:
1. in this embodiment, only when determining to Read the data in the flash memory and before reading the data in the flash memory, the optimal threshold voltage corresponding to the flash memory physical address corresponding to the Read task is required to be generated, that is, only the optimal threshold voltage corresponding to the flash memory physical address corresponding to the data to be Read by the host 110 (host) is recorded in advance, and the optimal threshold voltage corresponding to the flash memory physical address corresponding to the data not to be Read by the host 110 (host) is not recorded in advance, so that many unnecessary Read times of the flash memory are not caused, the risk of Read disk is reduced, and the optimal threshold voltage corresponding to the flash memory physical address corresponding to the data to be Read by the host 110 (host) is recorded in advance, so that the processing speed of error occurring in the process of reading the flash memory data can be accelerated.
2. In this embodiment, the generated optimal threshold voltage may also be used in other reading tasks, and if the subsequent reading task involves accessing the flash memory physical address corresponding to the current reading task, the processing efficiency of the subsequent reading task may be improved.
3. In this embodiment, the storage device 100 generates the optimal threshold voltage only when Idle, and in Idle state, the host 110 does not perform any write-read operation on the storage device 100, and does not interfere with the speed of reading data by the host 110.
Further, in this embodiment, the obtaining, by the storage device 100, the flash memory physical address corresponding to the current reading task in response to the received reading command specifically includes:
step S2021, when the storage apparatus 100 receives a new command processing notification sent by the host 110, preferentially selects, from among the plurality of commit queues 115 provided by the host 110, a commit queue 115 with the highest priority as a target queue, and performs an operation of reading a read command on the target queue; the target queue is only used for placing the read command corresponding to the read task.
Specifically, in this embodiment, the arbitration rule is: the highest priority commit queue 115 is preferentially selected from among the plurality of commit queues 115 provided by the host 110 as a target queue on which to execute an operation of reading a read command. While the priority of the commit queue 115 is preset by the host 110, as in fig. 7, the priority of SQ1 is highest, and SQ2, SQ3, and SQ4 are sequentially reduced in order of priority. The host 110 sequentially adds the read command corresponding to the current read Task from the host queue 114Task1 to the SQ 1.
In step S2022, the storage apparatus 100 adds the read command to the command buffer queue 106 in response to the first read command received from the target queue.
In step S2022, the arbitration module 105 first receives the first read command F1 from SQ1, and then adds F1 to the command buffer queue 106.
In step S2023, when the storage apparatus 100 detects that the target queue is not empty, the remaining read commands in the target queue are continuously added to the command buffer queue 106.
Specifically, assuming that the current reading task needs to read 14 files from the storage device 100, after F1 is fetched, when the storage device 100 detects that the target queue is not empty, the remaining read commands in the target queue SQ1 are continuously added to the command buffer queue 106, and then F2 to F14 are sequentially performed, where each file corresponds to one read command.
In step S2024, when the storage device 100 detects that the target queue is empty, the flash physical address corresponding to the current read task is determined according to all the read commands in the command buffer queue 106.
In this embodiment, in a scenario where a user uses a network disk to download, a one-time reading task is a one-time downloading task, the user selects 14 files on a file browsing interface of the network disk program, then triggers a downloading option to generate a downloading request and sends the downloading request to a cloud server, a host 110 (host) serving as the cloud server responds to the downloading request, includes 14 files corresponding to the downloading request in the current reading task, and sequentially adds a read command corresponding to the 14 files to a submission queue 115SQ1 with the highest priority. Next, step S2021 to step S2024 are performed so that the storage device 100 can determine in advance the flash physical address corresponding to the current read task, which is necessarily required to be read next, so that the optimal threshold voltage can be generated in advance for the physical block (block) to be read when idle, so that the optimal threshold voltage can be directly used to accelerate the processing time of the error when the uncorrectable error occurs.
Further, the method further comprises:
in step S601, the host 110 determines the tail position of the target queue based on the number of files corresponding to the current reading task.
As shown in fig. 7, in an example, the depth of the target queue is greater than 200, and the host 110 as the cloud server receives the download request sent by the client, and confirms that the number of files corresponding to the current reading task is 200, it may further be determined that the number of elements in the target queue allocated to the current reading task next should be 200, that is, the tail position (tail) of the target queue SQ1 should be 200, and the head position (head) is 1.
In step S602, after adding the corresponding read command of the partial file corresponding to the current read task to the target queue, the host 110 writes the tail position of the target queue into the tail gate bell register corresponding to the target queue on the storage device 100.
Specifically, after adding the read commands corresponding to the first 20 files corresponding to the current read task to the target queue SQ1, the host 110 writes 200 into a tail Doorbell register (i.e., tail Doorbell, abbreviated as tail DB) corresponding to the target queue SQ1 on the storage device 100, so that the tail db=200. Also included in storage device 100 is a head Doorbell register (i.e., head Doorbell, head DB), maintained by storage device 100, and a tail DB maintained by host 110, when storage device 100 detects head db=200, it may be determined that the target queue is empty.
In step S603, after the host 110 writes the tail position of the target queue into the tail gate bell register corresponding to the target queue on the storage device 100, the host 110 continuously adds the rest of the read commands corresponding to the current read task into the target queue during the process of executing the read command from the target queue by the storage device 100.
Specifically, the host 110 updates the tail gate register corresponding to SQ1 so that tail db=200, and also notifies the control unit 102 of the storage device 100 that a new command needs to be processed, and based on the arbitration rule in this embodiment, when the storage device 100 receives the notification of the new command processing sent by the host 110, the arbitration module 105 preferentially reads the command from the SQ1 with the highest priority into the command buffer queue 106. Since the host 110 adds only the read commands corresponding to the first 20 files corresponding to the current read task to the target queue SQ1 and 180 read commands are not added in step S602, in the process of the storage device 100 performing the operation of reading the read commands from the target queue SQ1 in step S603, the host 110 continues to add the remaining 180 read commands corresponding to the current read task to the target queue SQ 1. It can be understood that in this embodiment, the host 110 does not need to wait for all the read commands corresponding to the current read task to be added to the target queue before determining the value of the tail DB, but directly determines the value of the tail DB according to the number of files corresponding to the current read task, so that the tail gate bell register corresponding to SQ1 can be written without adding all the read commands corresponding to the current read task to the target queue, thereby accelerating the speed of reading the files with larger number from the storage device 100 to the host 110, and further accelerating the downloading speed of the user. In the prior art, all commands are generally added to the queue to know the number of the commands so as to determine the value of the tail DB, and the method takes a downloading task as a unit, so that the value of the tail DB can be determined in advance. Assuming that the time taken for the host 110 to add 200 read commands to the target queue is t1 and the time taken for 20 read commands to the target queue is t2, the time saved is Δt= (t 1-t 2).
It should be noted that, when there are multiple commit queues 115 with the same highest priority, for example, there are also SQ0 and SQ1 with the same highest priority, when there are read commands with both SQ0 and SQ1, the arbitration module 105 may take out the read commands from both SQ0 and SQ1 into the intermediate temporary queue in the storage device 100 in a polling manner, after both SQ0 and SQ1 are empty, the arbitration module 105 divides the read commands corresponding to both SQ0 and SQ1 stored in the intermediate temporary queue into two groups, writes the two groups of read commands into the corresponding command buffer queues P1 and P2 in units of groups, and then the voltage optimization module 107 and the command processing module 109 process the read commands in the command buffer queues P1 and P2 sequentially, where the processing manners may be steps S202-S206 and steps S2021-S4. It will be appreciated that the processing is similar when the highest priority commit queue 115 is a greater number.
Further, the method further comprises: while the host 110 continues to add the remaining read commands corresponding to the current read task to the target queue, the host 110 continuously adds the read commands of all the files having the same partition descriptor in the current read task to the target queue.
In one scenario, when a file is split into multiple compression packets, each split compression packet has a homologous splitting descriptor, where the splitting descriptor may specifically be composed of a file format and a file name, for example, when the host 110 recognizes that the multiple files are in a rack compression packet format, and the file names only differ in that the last character between the files is a number arranged in sequence, the host 110 determines that the compression packets belong to the same file, and the host 110 continuously adds a read command corresponding to the compression packets to the target queue, so that all the compression packets belonging to the same file may be downloaded to the client in a concentrated time, so that the user may merge the multiple compression packets into one file as soon as possible, and the processing flow of the file at the client is quickened.
Example 2
Referring to fig. 1, 3 and 4, the present embodiment provides a method for reading flash memory data, the method including:
in step S302, the storage device 100 obtains the flash physical address to be accessed in response to the received read command, so as to read the data corresponding to the flash physical address.
Step S304, when the storage device 100 detects that there is an uncorrectable error in the data corresponding to the read flash memory physical address, determining whether there is an optimal threshold voltage generated by the physical address corresponding to the uncorrectable error data; wherein the optimal threshold voltage is generated based on the flash physical address being read more than a preset number of times in one period of time while being idle by the memory device 100.
The best threshold voltage is the threshold voltage of the lowest bit error rate corresponding to the corresponding physical address in the flash memory, and how the voltage optimization module 107 determines the best threshold voltage belongs to the prior art, and specifically, refer to patent document 1, which is not repeated here.
It should be noted that, idle refers to an Idle state, which refers to a state in which the host 110 does not perform any write-read operation on the storage device 100, and at this time, the storage device 100 may perform internal initialization, such as garbage collection (garbage collection), wear leveling (wear leveling), data verification, and so on.
For example, in step S304, the optimal threshold voltage is generated based on the flash physical address that is read more than the preset number of times in one period of time while the memory device 100 is idle. Taking 24 hours as a period of time, the preset times are 100 times as an example, when the host 110 is Idle, i.e. in Idle state, no writing and reading operations are performed on the storage device 100, at this time, the voltage optimizing module 107 of the storage device 100 generates a corresponding optimal threshold voltage for a physical block (block) with the read times greater than 100 times within 24 hours, so that the speed of reading data by the host 110 is not interfered. When the Idle state is exited, the memory device 100 may execute step S306 by using the obtained optimal threshold voltage, so as to speed up the processing of errors occurring in the process of reading the flash memory data.
In step S306, if the storage device 100 detects that the physical address corresponding to the uncorrectable error exists, the data in the flash memory is read using the generated optimal threshold voltage.
The above embodiment has at least the following advantages:
1. in this embodiment, only the optimal threshold voltage is generated in advance for the flash memory physical addresses with the Read times greater than the preset times in one period of time, instead of generating the optimal threshold voltage in advance for all the flash memory physical blocks (blocks), so that many unnecessary Read times of the flash memory are not caused, the risk of Read Disturb is reduced, and the optimal threshold voltage corresponding to the flash memory physical addresses corresponding to the data to be Read by the host 110 (host) in advance is recorded, so that the processing speed of errors occurring in the process of reading the flash memory data can be increased.
2. In this embodiment, the generated optimal threshold voltage may also be used in other reading tasks, and if the subsequent reading task involves accessing the flash memory physical address corresponding to the current reading task, the processing efficiency of the subsequent reading task may be improved.
3. In this embodiment, the storage device 100 generates the optimal threshold voltage only when Idle, and in Idle state, the host 110 does not perform any write-read operation on the storage device 100, and does not interfere with the speed of reading data by the host 110.
Further, when the memory device 100 is idle, the generating the optimal threshold voltage based on the flash physical address with the read times greater than the preset times in a period of time specifically includes:
in step S3041, the storage device 100 sorts the flash memory physical addresses read for a time period greater than the preset time from high to low according to the read times, so as to obtain the read times sorting result.
In step S3042, when the storage device 100 is idle, the storage device generates an optimal threshold voltage for the flash memory physical addresses ranked earlier preferentially according to the result of the ranking of the read times.
In one example, the number of reads per physical block (block) is determined by converting the number of reads per logical address to the number of reads per physical address over a period of time, thereby generating a read number table. When idle, the storage device 100 acquires physical blocks (blocks) with the number of times of reading greater than 100 in 24 hours according to the number of times of reading table, and then generates the optimal threshold voltage with the highest priority of the physical blocks with the number of times of reading. It can be understood that the higher the probability of the subsequent read access continued with the highest number of times of reading in the physical blocks meeting the conditions, the best threshold voltage corresponding to the flash memory physical address with the highest number of times of reading should be preferentially generated, so as to speed up the processing time of the read error.
In one example, the method further comprises:
in step S402, the storage device 100 obtains the data retention time of the flash memory.
In step S404, the storage device 100 performs a read operation on the flash physical address when idle, where the difference between the data retention time and the data retention period is less than the duration threshold.
In this example, the data retention time (i.e., data extension) is 11 months, and the data retention time is 12 months and the duration threshold is 2 months from the parameters provided by the manufacturer of the storage device 100. The data retention time can be calculated by recording the last read time (or write time) of the data and according to the difference value between the last read time and the last read time. By performing a read operation on the flash physical address when idle where the difference between the data retention time and the data retention time is less than the duration threshold, the problem of data loss due to too long a data retention time can be effectively reduced without affecting the operation of the host 110 on the storage device 100.
Further, when the storage device 100 is idle, the method specifically includes performing a read operation on a flash physical address having a difference between a data retention time and a data retention period less than a duration threshold, where the read operation specifically includes:
Step S4041, the storage device 100 sorts the flash physical addresses with the difference between the data storage time and the data storage time smaller than the time threshold according to the time length of the data storage time from long to short, to obtain a time length sorting result;
in step S4042, when the storage device 100 is idle, the read operation is preferentially performed on the flash physical addresses ranked earlier according to the time length ranking result.
In this example, when idle, the storage device 100 preferentially performs a read operation on a physical block whose data retention time is closer to the data retention period, so that the problem of data loss caused by too long data retention time can be effectively reduced, and the operation of the host 110 on the storage device 100 is not affected.
Example 3
Referring to fig. 1, 5 and 8, the present embodiment provides a method for reading flash memory data, the method including:
in step S502, the storage device 100 responds to the received read command to obtain the flash memory physical address corresponding to the current read task.
In the scenario where the user uses a network disk, the one-time read task is the one-time download task for initiation. Specifically, referring to fig. 8, a user selects 14 files on a file browsing interface of a web disc program, then triggers a download option to generate a download request and sends the download request to a cloud server, and a host 110 (host) serving as the cloud server responds to the download request to include the 14 files corresponding to the download request in the current reading task, and sequentially adds the read commands corresponding to the 14 files to a submission queue 115SQ1 with the highest priority.
Step S504, the storage device 100 generates an optimal threshold voltage corresponding to the flash memory physical address corresponding to the current reading task, and stores the optimal threshold voltage in the optimal threshold voltage table 108; the optimal threshold voltage is the threshold voltage of the lowest bit error rate corresponding to the corresponding physical address in the flash memory.
The best threshold voltage is the threshold voltage of the lowest bit error rate corresponding to the corresponding physical address in the flash memory, and how the voltage optimization module 107 determines the best threshold voltage belongs to the prior art, and specifically, refer to patent document 1, which is not repeated here.
In step S506, the storage device 100 reads the data in the flash memory using the acquired optimal threshold voltage.
In one scenario, as shown in fig. 8, if the number of read commands corresponding to the current read task is 14, the 14 read commands are sequentially denoted as F1 to F14 (only 8 of them are shown in fig. 8), the 14 read commands are all fetched from the commit queue 115 by the arbitration module 105 and then added to the command buffer queue 106, and when all the commands of the current read task are fetched, the command processing module 109 sequentially fetches the 14 read commands from the command buffer queue 106 to execute. It will be appreciated that since the optimal threshold voltages for the physical blocks corresponding to the 14 read commands have been obtained, the command processing module 109 directly uses the optimal threshold voltages in the optimal threshold voltage table 108 to read data from the corresponding physical addresses when executing the 14 read commands.
As shown in fig. 8, the specific generation process is: after the arbitration module 105 adds all the read commands in SQ1 to the command buffer queue 106, the voltage optimization module 107 sequentially generates the corresponding optimal threshold voltages for the physical blocks (blocks) corresponding to all the read commands in the command buffer queue 106, and adds the generated optimal threshold voltages to the optimal threshold voltage table 108. For example, the optimal threshold voltage set V1 corresponding to the flash physical address corresponding to F1 is stored in the optimal threshold voltage table 108, and the optimal threshold voltage set V1 corresponding to the flash physical address corresponding to F4 is stored in the optimal threshold voltage table 108. If the physical address corresponding to F1 includes two blocks (blocks), i.e., two blocks B1 and B2, the optimal threshold voltage set V4 corresponding to the flash physical address corresponding to F1 includes the optimal threshold voltages corresponding to the two blocks B1 and B2. Nand Flash is composed of a plurality of blocks (blocks), each Block contains a plurality of layers (layers), each Layer is composed of a plurality of Word Lines (WL), and all WL read voltages in each Layer are substantially the same. And when Idle, reading the first WL of each layer in the Block, and acquiring the read voltage of the read WL to find the threshold voltage with the lowest bit error rate, thereby finally generating the optimal threshold voltage of the current Block.
Compared with the prior art, the method for reading the flash memory data provided by the embodiment has at least the following beneficial effects:
1. the invention only needs to generate the optimal threshold voltage corresponding to the flash memory physical address corresponding to the Read task when determining to Read the data in the flash memory and before reading the data in the flash memory, namely only records the optimal threshold voltage corresponding to the flash memory physical address corresponding to the data to be Read by the host 110 (host) in advance, and does not record the optimal threshold voltage corresponding to the flash memory physical address corresponding to the data not to be Read by the host 110 (host) in advance, thereby not causing a lot of unnecessary reading times to the flash memory, reducing the risk of Read Disturb, and accelerating the processing speed of error in the process of reading the flash memory data by recording the optimal threshold voltage corresponding to the flash memory physical address corresponding to the data to be Read by the host 110 (host) in advance.
2. Before reading the data in the flash memory, the optimal threshold voltage corresponding to the physical address of the flash memory corresponding to the current reading task is generated, so that when the data in the flash memory corresponding to the current reading task is read, the obtained optimal threshold voltage is directly used for reading the data in the flash memory, and the optimal threshold voltage is the corrected read voltage, so that the process of correcting errors in the process of reading the data can be saved.
3. The optimal threshold voltage generated in the invention can also be used in other reading tasks, and if the subsequent reading task involves accessing the flash memory physical address corresponding to the current reading task, the processing efficiency of the subsequent reading task can be improved.
Further, the storage device 100 responds to the received read command to obtain the flash memory physical address corresponding to the current read task, which specifically includes:
step S5021, when the storage device 100 receives a new command processing notification sent by the host 110, the highest priority commit queue 115 is preferentially selected from the multiple commit queues 115 provided by the host 110 as a target queue, and an operation of reading a read command is performed on the target queue; the target queue is only used for placing the read command corresponding to the read task.
Specifically, in this embodiment, the arbitration rule is: the highest priority commit queue 115 is preferentially selected from among the plurality of commit queues 115 provided by the host 110 as a target queue on which to execute an operation of reading a read command. While the priority of the commit queue 115 is preset by the host 110, as in fig. 8, the priority of SQ1 is highest, and SQ2, SQ3, and SQ4 are sequentially reduced in order of priority. The host 110 sequentially adds the read command corresponding to the current read Task from the host queue 114Task1 to the SQ 1.
In step S5022, the storage device 100 adds the read command to the command buffer queue 106 in response to the first read command received from the target queue.
In step S2022, the arbitration module 105 first receives the first read command F1 from SQ1, and then adds F1 to the command buffer queue 106.
In step S5023, when the storage device 100 detects that the target queue is not empty, the remaining read commands in the target queue are continuously added to the command buffer queue 106.
Specifically, assuming that the current reading task needs to read 14 files from the storage device 100, after F1 is fetched, when the storage device 100 detects that the target queue is not empty, the remaining read commands in the target queue SQ1 are continuously added to the command buffer queue 106, and then F2 to F14 are sequentially performed, where each file corresponds to one read command.
In step S5024, when the storage device 100 detects that the target queue is empty, the flash memory physical address corresponding to the current reading task is determined according to all the read commands in the command buffer queue 106.
In this embodiment, in a scenario where a user uses a network disk to download, a one-time reading task is a one-time downloading task, the user selects 14 files on a file browsing interface of the network disk program, then triggers a downloading option to generate a downloading request and sends the downloading request to a cloud server, a host 110 (host) serving as the cloud server responds to the downloading request, includes 14 files corresponding to the downloading request in the current reading task, and sequentially adds a read command corresponding to the 14 files to a submission queue 115SQ1 with the highest priority. Next, step S5021 to step S5024 are performed, so that the storage device 100 can determine the flash physical address corresponding to the current reading task in advance, and the flash physical address corresponding to the current reading task is necessarily required to be read next, so that the generation of the optimal threshold voltage for the physical block (block) to be read in advance can be achieved, so that the optimal threshold voltage can be directly used to accelerate the processing time of the error when the uncorrectable error occurs.
Further, the method further comprises:
in step S601, the host 110 determines the tail position of the target queue based on the number of files corresponding to the current reading task.
As shown in fig. 8, in an example, the depth of the target queue is greater than 200, and the host 110 as the cloud server receives the download request sent by the client, and confirms that the number of files corresponding to the current reading task is 200, it may further be determined that the number of elements in the target queue allocated to the current reading task next should be 200, that is, the tail position (tail) of the target queue SQ1 should be 200, and the head position (head) is 1.
In step S602, after adding the corresponding read command of the partial file corresponding to the current read task to the target queue, the host 110 writes the tail position of the target queue into the tail gate bell register corresponding to the target queue on the storage device 100.
Specifically, after adding the read commands corresponding to the first 20 files corresponding to the current read task to the target queue SQ1, the host 110 writes 200 into a tail Doorbell register (i.e., tail Doorbell, abbreviated as tail DB) corresponding to the target queue SQ1 on the storage device 100, so that the tail db=200. Also included in storage device 100 is a head Doorbell register (i.e., head Doorbell, head DB), maintained by storage device 100, and a tail DB maintained by host 110, when storage device 100 detects head db=200, it may be determined that the target queue is empty.
In step S603, after the host 110 writes the tail position of the target queue into the tail gate bell register corresponding to the target queue on the storage device 100, the host 110 continuously adds the rest of the read commands corresponding to the current read task into the target queue during the process of executing the read command from the target queue by the storage device 100.
Specifically, the host 110 updates the tail gate register corresponding to SQ1 so that tail db=200, and also notifies the control unit 102 of the storage device 100 that a new command needs to be processed, and based on the arbitration rule in this embodiment, when the storage device 100 receives the notification of the new command processing sent by the host 110, the arbitration module 105 preferentially reads the command from the SQ1 with the highest priority into the command buffer queue 106. Since the host 110 adds only the read commands corresponding to the first 20 files corresponding to the current read task to the target queue SQ1 and 180 read commands are not added in step S602, in the process of the storage device 100 performing the operation of reading the read commands from the target queue SQ1 in step S603, the host 110 continues to add the remaining 180 read commands corresponding to the current read task to the target queue SQ 1. It can be understood that in this embodiment, the host 110 does not need to wait for all the read commands corresponding to the current read task to be added to the target queue before determining the value of the tail DB, but directly determines the value of the tail DB according to the number of files corresponding to the current read task, so that the tail gate bell register corresponding to SQ1 can be written without adding all the read commands corresponding to the current read task to the target queue, thereby accelerating the speed of reading the files with larger number from the storage device 100 to the host 110, and further accelerating the downloading speed of the user. In the prior art, all commands are generally added to the queue to know the number of the commands so as to determine the value of the tail DB, and the method takes a downloading task as a unit, so that the value of the tail DB can be determined in advance. Assuming that the time taken for the host 110 to add 200 read commands to the target queue is t1 and the time taken for 20 read commands to the target queue is t2, the time saved is Δt= (t 1-t 2).
It should be noted that, when there are multiple commit queues 115 with the same highest priority, for example, there are also SQ0 and SQ1 with the same highest priority, when there are read commands with both SQ0 and SQ1, the arbitration module 105 may take out the read commands from the SQ0 and SQ1 to the intermediate temporary queue in the storage device 100 in a polling manner, after both SQ0 and SQ1 are empty, the arbitration module 105 divides the read commands corresponding to the SQ0 and SQ1 stored in the intermediate temporary queue into two groups, writes the two groups of read commands into the corresponding command buffer queues P1 and P2 in units of groups, and then the voltage optimization module 107 and the command processing module 109 process the read commands in the command buffer queues P1 and P2 sequentially, which may be steps S502-S506 and steps S5021-S4. It will be appreciated that the processing is similar when the highest priority commit queue 115 is a greater number.
Further, the method further comprises: while the host 110 continues to add the remaining read commands corresponding to the current read task to the target queue, the host 110 continuously adds the read commands of all the files having the same partition descriptor in the current read task to the target queue.
In one scenario, when a file is split into multiple compression packets, each split compression packet has a homologous splitting descriptor, where the splitting descriptor may specifically be composed of a file format and a file name, for example, when the host 110 recognizes that the multiple files are in a rack compression packet format, and the file names only differ in that the last character between the files is a number arranged in sequence, the host 110 determines that the compression packets belong to the same file, and the host 110 continuously adds a read command corresponding to the compression packets to the target queue, so that all the compression packets belonging to the same file may be downloaded to the client in a concentrated time, so that the user may merge the multiple compression packets into one file as soon as possible, and the processing flow of the file at the client is quickened.
In one embodiment, the method further comprises:
step S701, after the first time node receives the first command processing notification for the target queue sent by the host 110, the storage device 100 calculates a time difference between the second time node and the first time node when the second time node receives the second command processing notification for the same target queue sent by the host 110;
Step S702, when the storage device 100 detects that the time difference is less than a preset duration, determining whether the target queue is in an executing state; the executing state is a state that all read commands corresponding to the target queue are read but not executed.
In step S703, when the storage device 100 detects that the target queue is in the executing state, the read command corresponding to the second command processing notification is divided into the same execution priority as the read command corresponding to the first command processing notification.
In step S704, the storage device 100 controls the execution order of the corresponding read commands according to the execution priority of the second command processing notification corresponding to the read commands.
For example, if there are 3 groups of commands in the memory device 100 to be executed, after the voltage optimization module 107 processes, all 3 groups of commands are written into the corresponding command buffer queues 106 from the corresponding scratch queues, the execution order (i.e. the execution priority) is 1, 2, and 3, respectively, and if the 4 th group of commands are executed (i.e. the second command processing notifies the corresponding read command) according to the prior art, the execution order should be ranked at 4, i.e. written into the 4 th group of command buffer queues 106. However, if the 4 th group command is part of the 1 st group, then for the concentrated time download, the 4 th group command should be divided into the 1 st group, i.e., the 4 th group command is written into the 1 st group command buffer queue 106, with the concentrated time download being implemented in preference to the 2, 3 group execution. From the perspective of the user, the 1 st group of commands are read commands corresponding to the download requests sent by the user A after triggering the download button, then the user A feels that some files are missed, then immediately selects new files and triggers the download button to send the new download requests, at this time, the 4 th group of commands obviously belong to two download tasks triggered by the same user in a very short time, and the files corresponding to the two download tasks should be provided for the user in concentrated time so that the user can finish processing the files. In order to achieve the objective, in this embodiment, a preset duration is designed, and the host 110 as the cloud server determines whether the files corresponding to the two download requests should be provided to the user in a concentrated time according to whether the time of the two download requests of the same user is less than the preset duration, if the host 110 detects that the same user sends the two download requests within the preset duration, the doorbell register corresponding to the same target queue is updated within the preset duration, so as to notify the storage device 100 that the target queue has a new command to be processed within the preset duration. In view of the fact that the storage device 100 cannot determine whether the two read commands in the same target queue belong to the same user, the present embodiment improves the arbitration rule, i.e., steps S702 to S703, and if steps S702 to S703 are satisfied, it is explained that the two read commands in the same target queue belong to the same user, and then the storage device 100 classifies the read command corresponding to the second command processing notification as the same execution priority as the read command corresponding to the first command processing notification. It will be appreciated that for download requests belonging to other users, the host 110 will not write corresponding read commands to the target queue for a predetermined period of time. For example, if the current download task of the user a uses the SQ1 queue, and the preset duration is 10 seconds, the download tasks of other users are not allowed to use the SQ1 queue within 20.
Assuming that there are 100 commit queues 115 that are the highest priority, the number of uses of the 100 commit queues 115 is counted, and each time a new download task needs to allocate a commit queue 115, the least frequently used commit queue 115 is preferentially selected for use. The purpose of this is to ensure that the commit queue 115 being used is as little disturbed as possible. For example, once the SQ1 queue is used, the number of times it is used is increased by 1, so that the number of times the other commit queues 115 are used is relatively small, and the commit queue 115 with the least number of times is preferentially selected for use, so that other commands added during the use of the SQ1 queue can be avoided, and interference is avoided.
In one embodiment, there is provided an electronic device including: memory, a processor and a computer program stored on the memory and executable on the processor, which when executing the program performs the steps of one of the methods of reading flash data described above. The steps of a method for reading flash data herein may be the steps of a method for reading flash data in the above-described embodiments.
In one embodiment, a computer-readable storage medium is provided, the computer-readable storage medium storing computer-executable instructions for causing a computer to perform the steps of a method of reading flash data as described above. The steps of a method for reading flash data herein may be the steps of a method for reading flash data in the above-described embodiments.
Those skilled in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a non-volatile computer readable storage medium, and where the program, when executed, may include processes in the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRA), memory bus direct RAM (RDRA), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.

Claims (10)

1. A method of reading flash data, the method comprising:
the storage equipment responds to the received reading command to acquire a flash memory physical address corresponding to the reading task;
when the storage equipment detects that uncorrectable errors exist in the data corresponding to the physical addresses of the flash memories corresponding to the read task, judging whether the optimal threshold voltage generated by the physical addresses corresponding to the uncorrectable errors exists or not; the optimal threshold voltage is generated based on the obtained flash memory physical address corresponding to the read task when the storage device is idle;
if the storage device detects that the optimal threshold voltage which is generated by the physical address corresponding to the uncorrectable error data exists, the data in the flash memory is read by using the generated optimal threshold voltage.
2. The method for reading flash memory data according to claim 1, wherein the memory device, in response to the received read command, obtains a flash memory physical address corresponding to the current read task, specifically comprising:
When receiving a new command processing notice sent by a host, a storage device preferentially selects a commit queue with highest priority from a plurality of commit queues provided by the host as a target queue, and executes the operation of reading a read command on the target queue; the target queue is only used for placing a read command corresponding to the read task;
the storage device responds to a first read command received from the target queue, and adds the read command to the command buffer queue;
when the storage device detects that the target queue is not empty, continuously adding the rest read commands in the target queue into the command buffer queue;
when the storage device detects that the target queue is empty, the flash memory physical address corresponding to the current reading task is determined according to all the reading commands in the command buffer queue.
3. A method of reading flash data, the method comprising:
the storage equipment responds to a received read command to acquire a flash memory physical address to be accessed so as to read data corresponding to the flash memory physical address;
when the storage equipment detects that uncorrectable errors exist in the data corresponding to the read flash memory physical addresses, judging whether optimal threshold voltages generated by the physical addresses corresponding to the uncorrectable errors exist or not; wherein the optimal threshold voltage is generated based on flash memory physical addresses that are read more than a preset number of times in a period of time when the memory device is idle;
If the storage device detects that the optimal threshold voltage which is generated by the physical address corresponding to the uncorrectable error data exists, the data in the flash memory is read by using the generated optimal threshold voltage.
4. A method of reading flash memory data according to claim 3, wherein the generating the optimal threshold voltage based on the flash memory physical address being read more than a predetermined number of times in a period of time when the memory device is idle, comprises:
the storage device sorts the flash memory physical addresses which are read for times greater than a preset times in a period of time according to the read times from high to low to obtain a read times sorting result;
and when the storage equipment is idle, according to the reading times sequencing result, generating an optimal threshold voltage for the physical addresses of the flash memories which are sequenced in the front preferentially.
5. A method of reading flash data according to claim 3, further comprising:
the storage device obtains the data storage time of the flash memory;
and when the storage device is idle, performing a read operation on the flash memory physical address of which the difference between the data storage time and the data storage life is smaller than the duration threshold.
6. The method of claim 5, wherein the memory device performs a read operation on the flash physical address having a data retention time that differs from the data retention time by less than a time duration threshold when idle, and comprising:
The storage device sorts the flash memory physical addresses of which the difference value between the data storage time and the data storage time is smaller than the time length threshold value according to the time length of the data storage time from long to short to obtain a time length sorting result;
and when the storage equipment is idle, according to the time length sequencing result, preferentially executing the reading operation on the flash memory physical addresses which are sequenced to the front.
7. A method of reading flash data, the method comprising:
the storage equipment responds to the received reading command to acquire a flash memory physical address corresponding to the reading task;
the storage device generates an optimal threshold voltage corresponding to a flash memory physical address corresponding to the current reading task and stores the optimal threshold voltage in an optimal threshold voltage table; the optimal threshold voltage is the threshold voltage of the lowest bit error rate corresponding to the corresponding physical address in the flash memory;
the memory device reads data in the flash memory using the acquired optimal threshold voltage.
8. The method for reading flash memory data according to claim 7, wherein the memory device, in response to the received read command, obtains the flash memory physical address corresponding to the current read task, specifically comprising:
when receiving a new command processing notice sent by a host, a storage device preferentially selects a commit queue with highest priority from a plurality of commit queues provided by the host as a target queue, and executes the operation of reading a read command on the target queue; the target queue is only used for placing a read command corresponding to the read task;
The storage device responds to a first read command received from the target queue, and adds the read command to the command buffer queue;
when the storage device detects that the target queue is not empty, continuously adding the rest read commands in the target queue into the command buffer queue;
when the storage device detects that the target queue is empty, the flash memory physical address corresponding to the current reading task is determined according to all the reading commands in the command buffer queue.
9. The method of reading flash memory data of claim 8, further comprising: in the process of executing the read command by the storage device, the host continuously adds the rest read commands corresponding to the current read task to the target queue.
10. The method of reading flash memory data of claim 9, further comprising: in the process that the host continuously adds the rest read commands corresponding to the current read task to the target queue, the host continuously adds the read commands of all files with the same source partition descriptors in the current read task to the target queue.
CN202311484659.4A 2023-11-09 2023-11-09 Method for reading flash memory data Pending CN117215503A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311484659.4A CN117215503A (en) 2023-11-09 2023-11-09 Method for reading flash memory data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311484659.4A CN117215503A (en) 2023-11-09 2023-11-09 Method for reading flash memory data

Publications (1)

Publication Number Publication Date
CN117215503A true CN117215503A (en) 2023-12-12

Family

ID=89046653

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311484659.4A Pending CN117215503A (en) 2023-11-09 2023-11-09 Method for reading flash memory data

Country Status (1)

Country Link
CN (1) CN117215503A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150134857A1 (en) * 2013-11-14 2015-05-14 Sandisk Technologies Inc. System and Method for I/O Optimization in a Multi-Queued Environment
US9236147B1 (en) * 2013-12-12 2016-01-12 SK Hynix Inc. Threshold carrying for solid state storage
CN106448737A (en) * 2016-09-30 2017-02-22 北京忆芯科技有限公司 Flash memory data reading method and device and solid disk drive
CN109065092A (en) * 2017-02-21 2018-12-21 北京忆恒创源科技有限公司 The reading threshold setting method and its device of NVM chip
CN112599177A (en) * 2020-12-23 2021-04-02 深圳大普微电子科技有限公司 Threshold voltage management method and method for reading flash memory data
CN113076218A (en) * 2020-07-03 2021-07-06 北京忆芯科技有限公司 Method for rapidly processing data reading errors of NVM (non-volatile memory) chip and controller thereof
CN113096711A (en) * 2019-12-23 2021-07-09 北京忆恒创源科技有限公司 Read threshold tracking method and device based on Kalman filtering
CN113409854A (en) * 2020-03-16 2021-09-17 爱思开海力士有限公司 Data storage device and operation method thereof

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150134857A1 (en) * 2013-11-14 2015-05-14 Sandisk Technologies Inc. System and Method for I/O Optimization in a Multi-Queued Environment
US9236147B1 (en) * 2013-12-12 2016-01-12 SK Hynix Inc. Threshold carrying for solid state storage
CN106448737A (en) * 2016-09-30 2017-02-22 北京忆芯科技有限公司 Flash memory data reading method and device and solid disk drive
CN109065092A (en) * 2017-02-21 2018-12-21 北京忆恒创源科技有限公司 The reading threshold setting method and its device of NVM chip
CN113096711A (en) * 2019-12-23 2021-07-09 北京忆恒创源科技有限公司 Read threshold tracking method and device based on Kalman filtering
CN113409854A (en) * 2020-03-16 2021-09-17 爱思开海力士有限公司 Data storage device and operation method thereof
CN113076218A (en) * 2020-07-03 2021-07-06 北京忆芯科技有限公司 Method for rapidly processing data reading errors of NVM (non-volatile memory) chip and controller thereof
CN112599177A (en) * 2020-12-23 2021-04-02 深圳大普微电子科技有限公司 Threshold voltage management method and method for reading flash memory data

Similar Documents

Publication Publication Date Title
US10776263B2 (en) Non-deterministic window scheduling for data storage systems
US11150836B2 (en) Deterministic optimization via performance tracking in a data storage system
US11704239B2 (en) Garbage collection method for storage medium, storage medium, and program product
US8990480B2 (en) Semiconductor memory device and computer program product
CN108733306B (en) File merging method and device
US8397017B2 (en) Controller and data storage device
US9772790B2 (en) Controller, flash memory apparatus, method for identifying data block stability, and method for storing data in flash memory apparatus
US11853599B2 (en) Memory system and information processing system
US20180276123A1 (en) Memory system and control method
TWI703566B (en) Flash memory controller and associated accessing method and electronic device
JP6167646B2 (en) Information processing apparatus, control circuit, control program, and control method
WO2016101145A1 (en) Controller, method for identifying data block stability and storage system
US10776265B2 (en) Data storage devices and data processing methods
CN111694806B (en) Method, device, equipment and storage medium for caching transaction log
CN115470157A (en) Prefetching method, electronic device, storage medium, and program product
US10872015B2 (en) Data storage system with strategic contention avoidance
EP4198745A1 (en) Automatic deletion in a persistent storage device
CN117215503A (en) Method for reading flash memory data
CN114974365A (en) SSD (solid State disk) limited window data deduplication identification method and device and computer equipment
US8503241B2 (en) Electronic apparatus and data reading method
US20200057570A1 (en) Method and flash memory controller capable of avoiding inefficient memory block swap or inefficient garbage collection
CN111026678A (en) Cache design method and device based on solid state disk and computer equipment
CN107436726B (en) Data writing method, storage controller, computing device and storage device
CN110888588A (en) Flash memory controller and related access method and electronic device
US11886335B2 (en) Memory system and controlling method of performing rewrite operation at maximum rewrite speed

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination