Information processing device and memory management method
The information processing device and memory management method address data read delays in SSDs by optimizing read voltages and managing tasks to enhance stability and throughput in SSDs.
Patent Information
- Application Number
- PCT/JP2024/015140
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-05-08
- Filing Date
- 2024-04-16
- Publication Date
- 2024-11-14
AI Technical Summary
Solid State Drives (SSDs) using NAND flash memory face data read delays and instability due to changes in threshold voltage caused by factors like charge leakage and repeated read operations, leading to increased latency and reduced throughput.
An information processing device and memory management method that periodically optimizes the read voltage by measuring error rates across multiple pages in each block, determining an appropriate read voltage for subsequent data reads, and managing access requests and management processing through queue classification and phase-based processing to minimize delays.
This approach reduces data read delay times and stabilizes information processing by optimizing read voltages and balancing data processing with management tasks, ensuring high throughput and low latency.
Smart Images

Figure JP2024015140_14112024_PF_FP_ABST
Abstract
Description
Information processing device and memory management method
[0001] The present invention relates to an information processing device that accesses a flash memory and a memory management method.
[0002] As the capacity of NAND flash memory increases, solid-state drives (SSDs) are increasingly being used as storage devices to replace conventional hard disk drives (HDDs). While SSDs offer the advantage of faster data access speeds and lower power consumption than HDDs, they also have the disadvantage of lower durability against repeated data reads and rewrites. Therefore, when rewriting data to an SSD, a process is performed to distribute the areas to be rewritten. For example, when a rewrite request is made by a host CPU, the specified logical block address is replaced with a different physical address, thereby distributing the rewrite target across as many memory cells as possible (see, for example, Patent Document 1).
[0003] WO 2014 / 132346 A1 Publication
[0004] Data is written to flash memory by storing a charge corresponding to the write value in the floating gate of each memory cell. When reading data, the value is determined by the magnitude relationship between the threshold voltage corresponding to the stored charge and the read voltage applied to the control gate. Therefore, if the threshold voltage differs from the initial target value or changes due to various factors such as leakage of stored charge, it becomes difficult to read data at the set read voltage. If multiple read attempts are made by adjusting the read voltage, latency corresponding to the number of attempts occurs, which can affect information processing throughput. This problem has become more serious as flash memory becomes smaller and more multi-level.
[0005] The present invention has been made in view of these problems, and its purpose is to provide a technology that can reduce the delay time in reading data and perform stable information processing using an SSD.
[0006] One aspect of the present invention relates to an information processing device, which includes one or more processors having hardware, and which read data from a memory at a predetermined cycle, determine and record a read voltage based on the data read result, and read data to be used in information processing at the recorded read voltage.
[0007] Another aspect of the present invention also relates to an information processing device, comprising one or more processors having hardware and a flash memory for storing data used by the processors, wherein the one or more processors read data from the flash memory at a predetermined cycle, determine and record a read voltage based on the data read result, and read data used for information processing at the recorded read voltage.
[0008] Yet another aspect of the present invention relates to a memory management method, which is characterized by reading data from a memory at a predetermined cycle, determining and recording a read voltage based on the data read result, and reading data to be used for information processing at the recorded read voltage.
[0009] Any combination of the above components, and any transformation of the present invention into a method, device, system, computer program, or recording medium on which a computer program is recorded, are also valid aspects of the present invention.
[0010] According to the present invention, it is possible to reduce the delay time in reading data and to stably perform information processing using an SSD.
[0011] FIG. 1 is a diagram illustrating a circuit configuration of an information processing device in the present embodiment. FIG. 2 is a diagram for explaining the relationship between threshold voltage and read voltage. FIG. 3 is a diagram illustrating an example of the results of trial data reads with varying read voltages. FIG. 4 is a diagram illustrating the configuration of functional blocks of an information processing device in the present embodiment. FIG. 5 is a diagram illustrating an example of the configuration of queues in the present embodiment. FIG. 6 is a diagram illustrating an example of setting the types of queues to be processed in each phase in the present embodiment. FIG. 7 is a diagram illustrating a procedure in which a command processing unit processes commands stored in each queue while transitioning between phases in the present embodiment. FIG. 8 is a diagram illustrating an example of the progress of data read processing during a period when a scan read is being performed and during other periods in the present embodiment. FIG. 9 is a diagram illustrating an example of the data structure of a block management table referenced by a flash controller in the present embodiment. FIG. 10 is a flowchart illustrating a processing procedure in which a flash controller performs a scan read and determines an optimal read voltage in the present embodiment.
[0012] 1 shows the circuit configuration of an information processing device according to this embodiment. The information processing device exemplified here may be any common information device such as a portable game console, a personal computer, a mobile phone, a tablet terminal, or a PDA. The information processing device 10 includes a host unit 12 including a CPU, a system memory 14, a NAND flash memory 20 (hereinafter simply referred to as the flash memory 20), a flash controller 18, and a dynamic random access memory (DRAM) 132.
[0013] The host unit 12 loads programs and data stored in the flash memory 20 into the system memory 14 and uses them to process information. It also reads application programs and data from a recording medium driven by a recording medium drive unit (not shown) or downloads them from a server connected to the network via a communication unit and stores them in the flash memory 20. At this time, the host unit 12 issues an access request for the flash memory 20 to the flash controller 18, and the flash controller 18 performs read / write processing on the flash memory 20 in response.
[0014] A plurality of NAND flash memories are connected to the flash memory 20, and data is distributed and stored across a plurality of channels (four channels, "ch0" to "ch3" in the figure) as shown in the figure. The flash controller 18 includes a host controller 22 having an interface function with the host unit 12, a NAND controller 28 having an interface function with the flash memory 20, a DRAM controller 130 having an interface function with a DRAM 132, and an SRAM (Static Random Access Memory) 24.
[0015] The host unit 12 generates access requests to the flash memory 20 according to the progress of information processing, and stores these requests in the system memory 14. The access requests include the logical address (LBA: Logical Block Address) of the access destination. The host controller 22 of the flash controller 18 reads the access requests stored in the system memory 14 and converts the LBA into a physical address in the flash memory 20. At least a part of the address conversion table required for this purpose is originally stored in the flash memory 20, and the DRAM controller 130 loads it into the DRAM 132. Note that part of the address conversion table may also be stored in the SRAM 24.
[0016] The host controller 22 references the address conversion table and supplies the physical address obtained based on the LBA to the NAND controller 28. The NAND controller 28 reads or writes data by accessing the corresponding area of the flash memory 20 based on the physical address. At this time, the NAND controller 28 reads data stored by the host unit 12 from the system memory 14 and writes it to the flash memory 20. The NAND controller 28 also stores the data read from the flash memory 20 in the system memory 14 so that the host unit 12 can read it.
[0017] Data is written to the flash memory 20 by applying a voltage to the control gate of the memory cell and storing a charge corresponding to the data value in the floating gate. The threshold voltage is controlled by the stored charge, and the written value is identified by using the current generated when a predetermined read voltage is applied to the control gate.
[0018] 2 is a diagram illustrating the relationship between threshold voltage and read voltage. (a) to (d) all show the frequency distribution of threshold voltages Vth of memory cells. While the write / read operation of binary data is assumed here, this embodiment is not limited to this. If target values for threshold voltage Vth corresponding to the binary values are A and B, respectively, the actual threshold voltage varies somewhat from cell to cell, resulting in a distribution with a certain width centered around the target values A and B, as shown in the figure.
[0019] Therefore, as shown by the arrows in (a), the intermediate value between the target threshold voltage values A and B is usually set as the read voltage Vref. In the figure, this voltage is given the identification number "0." As a result, all cells with A as the target threshold voltage value will have a threshold voltage lower than the read voltage, and the current value between the source and drain will be large. All cells with B as the target threshold voltage value will have a threshold voltage higher than the read voltage, and the current value between the source and drain will be small. This allows the two values to be correctly distinguished.
[0020] (b) shows an example of the change in threshold voltage when the temperature is different between when data is written and when it is read, or when reading is repeated. At low temperatures, a memory cell must store more charge than at high temperatures to achieve the same potential, so a memory cell into which data is written at low temperatures stores more charge than usual. If the temperature subsequently rises, the threshold voltage rises due to the larger-than-normal stored charge.
[0021] Furthermore, when data is read, applying a read voltage to the control gate injects a small amount of charge into the floating gate. Repeating this process increases the accumulated charge, raising the threshold voltage. This effect is not limited to the memory cell being read, but extends to other pages and adjacent blocks that share the word line and bit line. This phenomenon is generally called read disturb. Temperature changes and read disturbance from the time of writing cause the threshold voltage to rise overall, as shown in (b).
[0022] (c) and (d) show examples of threshold voltage changes caused by leakage of accumulated charge. Charges stored in the floating gate gradually leak over time due to stress on the tunnel oxide film, etc. In this case, as shown in (c) to (d), the threshold voltage decreases overall and the variation between memory cells also increases.
[0023] When the threshold voltage of the memory cell changes as shown in (b) to (d), the data read with the read voltage for identification number "0" will contain many errors. Therefore, it is possible to use multiple voltage value candidates prepared in advance and try reading until the error rate falls within the range that can be corrected by the error correction code (ECC). For example, as shown in the figure, in addition to the read voltage for identification number "0," three read voltage values for identification numbers "1," "2," and "3" are prepared as candidates.
[0024] Figure 3 illustrates the results of data read attempts with different read voltages. (a) to (d) respectively show the number of read retries (Retry Steps) and the number of error bits (Error Bits) in the data read for a group of memory cells having the threshold voltage distributions shown in (a) to (d) of Figure 2. The read voltage in each read process is changed in the order of the read voltage identification numbers shown in Figure 2.
[0025] In the case of (a), the read voltage for identification number "0" is between the two distributions corresponding to the target threshold voltage values A and B, so the number of retries is 0, i.e., the first read results in a 20-bit error that can be corrected by ECC. In this case, no retries are necessary, so the figure shows "N.A." (Not Available) for the first and subsequent retries.
[0026] In the case of (b), part of the distribution corresponding to the target value A of the threshold voltage extends beyond the read voltage of identification number "0." As a result, the first read operation has an error rate that exceeds the allowable amount of the ECC, resulting in a read failure (labeled "Fail"). Therefore, the read voltage of identification number "1" is set and the first retry is performed, but in this case too, part of the distribution of the threshold voltage extends beyond that read voltage, resulting in a read failure. Next, the read voltage of identification number "2" is set and the second retry is performed, resulting in a 30-bit error, and data that can be corrected by the ECC is read.
[0027] In the case of (c), part of the distribution corresponding to the target value B of the threshold voltage extends beyond the read voltage of identification number "0." As a result, the first read operation results in an error rate exceeding the ECC tolerance, resulting in a read failure. Therefore, the read voltage of identification number "1" is set, and the first retry is performed, resulting in a 60-bit error, and data within the range that can be corrected by ECC is read. In the case of (d), the read operation also fails with the read voltage of identification number "0." In this case, the first and second retry attempts with read voltages of identification numbers "1" and "2" also fail, and the third retry attempt with the read voltage of identification number "3" results in a 95-bit error, and data within the range that can be corrected by ECC is read.
[0028] As such, whether or not a data read retry is necessary and the number of times it is required varies depending on various factors, such as the temperature at the time of data write, the time elapsed since writing, and the number of times the data has been read up to that point. This can result in unexpected read retries being required, resulting in irregular latency until the data is read, which can reduce the throughput and stability of information processing using that data. This problem becomes more serious when data reads are concentrated in the same block.
[0029] Therefore, in this embodiment, a process for optimizing the read voltage is periodically performed by reading several pages of data written to the flash memory 20 from each block and measuring the error rate. As a result, when reading data used for information processing, etc., an appropriate read voltage can be set from the beginning, eliminating the need to retry reading for a long period of time. Hereinafter, the read process for optimizing the read voltage will be referred to as a "scan read." The NAND controller 28 executes the scan read in the background along with other management processes related to the flash memory 20. Below, an example of the management process performed by the NAND controller 28 will be described.
[0030] Generally, data is read from and written to the flash memory 20 in access units of 4096 bytes, etc. When using a NAND flash memory, data cannot be overwritten, so when writing data, it is necessary to secure an area where nothing is written. As described above, if data is repeatedly updated by changing only the logical address in order to distribute the write area, the area storing the invalidated original data will increase, and eventually the area available for new writing will be depleted.
[0031] Data deletion is limited to a few MiB (1 MiB = 10 20Since erasure is performed in blocks of 1000 bytes, to secure an area where nothing is written, valid data stored in the block to be erased is copied to another block and then all data in the original block is erased. This process is generally called "garbage collection." In other words, the NAND controller 28 must perform garbage collection when the writable area in the flash memory 20 is exhausted or at an appropriate timing before that.
[0032] Furthermore, as described above, during a read operation, voltage is applied to areas other than the target data area, and repeated reads from the same block result in read disturb, which increases the data error rate for the entire block. Therefore, when the number of reads from the same block reaches a predetermined value, the NAND controller 28 must save the data for the entire block to another block.
[0033] NAND flash memory also includes triple-level cells (TLCs), which store three bits of data per memory cell by storing eight levels of charge. However, TLCs require a more complex write sequence than single-level cells (SLCs), which store one bit of data per memory cell by using two levels of charge. Therefore, a portion of the flash memory 20 is reserved as an SLC area and used as a cache to speed up write operations. At this time, the NAND controller 28 copies the data written to the SLC to the TLC at an appropriate time, separate from the execution of the write request.
[0034] Thus, the NAND controller 28 must perform management processing specific to NAND flash memory separately from requests from the host unit 12. Once the need for management processing arises, normal data read and write processing must wait for a relatively long period of time until the management processing is completed. This can result in significant delays in information processing and a significant decrease in overall processing throughput. In a configuration in which data stored in the flash memory 20 is frequently read to render display images, the frequency of management processing increases as the number of accesses increases, and this, combined with the strict time limit for image display, can easily cause problems to become apparent.
[0035] Therefore, in this embodiment, an appropriate balance is maintained between the frequency of data read and write processes required for information processing and management processes including scan reads, enabling both processes to be performed smoothly while minimizing delays in information processing. Specifically, the above-mentioned management processes and access requests from the host unit 12 are classified according to the processing content and stored in different queues. Then, by switching the target queue according to specific rules depending on the type of processing content, it is possible to ensure that processes that must be performed are completed on an absolute basis.
[0036] Furthermore, by determining the queue switching rules based on the causal relationship between the processing frequency of access requests from the host unit 12 and the frequency at which management processing is required, the balance between the two is optimized and the required time and bandwidth can be easily estimated. Hereinafter, processing requests for management processing and access requests from the host unit 12 may be collectively referred to as "commands."
[0037] Fig. 4 shows the functional block configuration of the information processing device according to this embodiment. Each function shown in Fig. 4 can be realized in terms of hardware by the circuit configuration shown in Fig. 1, and in terms of software by a program stored in an internal memory. Therefore, it will be understood by those skilled in the art that the functions can be realized in various forms by hardware alone, software alone, or a combination of both, and are not limited to any one of these.
[0038] The host unit 12 includes a command issuing unit 30 that issues commands for accessing the flash memory 20, an information processing unit 32 that processes application programs and the like, and a data input / output unit 34 that inputs and outputs data to be read from or written to the flash memory 20. The system memory 14 includes a plurality of queues 36 that store commands issued from the host unit 12, and a data storage unit 38 that stores data to be read from or written to the flash memory 20.
[0039] The flash controller 18 includes a command receiving unit 40 that receives notification from the host unit 12 that a command has been issued, a management command generating unit 42 that generates commands for managing the flash memory 20, a plurality of queues 44 that store each command including commands for management, a command processing unit 46 that sequentially processes the commands stored in the queues 44, a switching rule memory unit 48 that stores rules for switching the queue to be processed, and a command adjustment unit 50 that adjusts the rate at which management processing is performed using a predetermined method.
[0040] The information processing unit 32 of the host unit 12 processes a program such as an application selected by the user. If, during this process, it becomes necessary to read data stored in the flash memory 20 or write data to the flash memory 20, the information processing unit 32 notifies the command issuing unit 30 of this fact. In response, the command issuing unit 30 specifies the logical address of the access destination and issues a read or write command.
[0041] More specifically, the command issuing unit 30 stores the command in one of the multiple queues 36 in the system memory 14 and notifies the flash controller 18 of this fact. At this time, the command issuing unit 30 classifies the command based on the access content, such as whether it is a read request or a write request, as well as the level of urgency, and stores the command in the queue corresponding to the classification result. For this reason, command classification rules based on the access content, time limit, size of the data to be accessed, etc., and the address information of the corresponding queue are set in advance in a program processed by the information processing unit 32, etc.
[0042] If the command is a write request, the data input / output unit 34 obtains the data to be written from the information processing unit 32 and stores it in the data storage unit 38 of the system memory 14. The data input / output unit 34 also reads from the data storage unit 38 the data that the flash controller 18 reads from the flash memory 20 in response to a read request, and supplies the data to the information processing unit 32.
[0043] A command reception unit 40 of the flash controller 18 receives a notification from the host unit 12 that a command has been issued, reads the command from the relevant queue in the system memory 14, and stores it in a corresponding queue among a plurality of queues 44 held internally. Here, the queues 44 held by the flash controller 18 include a plurality of queues having the same configuration as the plurality of queues 36 in the system memory 14. Alternatively, the queues 36 in the system memory 14 may be made to be referenceable as part of the queues 44.
[0044] The management command generation unit 42 issues commands to request management processes such as the above-mentioned scan read, garbage collection, data copy to avoid read disturb, and data copy from SLC to TLC when these processes become necessary. More specifically, the management command generation unit 42 monitors the passage of time and the status of data being written to and read from the flash memory 20 to determine the timing for issuing a command for the management process. Determination rules are set in advance for each type of management process.
[0045] The management command generation unit 42 then stores commands specifying the processing content, the data read address, the write address, the block from which the data should be erased, etc. in a queue corresponding to the processing content among the queues for management processing in the queue 44. Note that in the figure, the queues in the queue 44 that store commands issued by the host unit 12 are shown in white, while the queues that store commands issued by the management command generation unit 42 are shown in shaded to distinguish them.
[0046] The command processing unit 46 processes the commands stored in the queue 44 in order. At this time, the command processing unit 46 processes the commands stored in one queue in the order in which they were stored. The command processing unit 46 also switches the queue to be processed to the next queue in accordance with the switching rules set for each queue. In other words, commands stored in another queue may be processed in an order different from the order in which they were issued. The queue switching rules are stored in the switching rule storage unit 48 and are referenced by the command processing unit 46.
[0047] If the command read from the queue is a write request, the command processing unit 46 reads the data to be written from the data storage unit 38 of the system memory 14 and writes the data to an area corresponding to the logical address included in the command. If the command is a read request, the command processing unit 46 stores the data read from the area corresponding to the logical address included in the command in the data storage unit 38 of the system memory 14.
[0048] If the command is a scan read, the command processing unit 46 performs a read process on some pages in the block specified by the command once, or multiple times by changing the read voltage. If the data is read with an error rate that allows correction by ECC, the read voltage used at that time is registered so that it can be used in subsequent read processes. This process can basically be the same as the procedure described with reference to Figure 3. If the command is to move data within the flash memory 20, the command processing unit 46 copies the data from the source address included in the command to the destination address. It also erases the data in the source block as necessary.
[0049] The command adjustment unit 50 adjusts the rate at which processing is performed so that management processing is not incomplete and memory access does not fail. For example, when the number of commands for management processing stored in the queue 44 exceeds a predetermined threshold, the command adjustment unit 50 temporarily changes at least one of the queue switching rules stored in the switching rule storage unit 48 and notifies the host unit 12 of this.
[0050] In the former case, the command adjustment unit 50 increases the time limit or the upper limit of the number of commands that can be processed, which are set as rules for switching from the queue storing the commands for the management process to the next queue, or decreases the upper limit of the number of commands that can be processed for other queues. This effectively increases the rate at which management processes are performed. When the number of commands for management processes stored in the queue 44 falls below the threshold, the command adjustment unit 50 restores the queue switching rules.
[0051] When the command adjustment unit 50 notifies the host unit 12, the command issuing unit 30 of the host unit 12 receives the notification and limits the issuance of commands. For example, it may temporarily suspend the issuance of low-urgency commands or limit the frequency of issuance to a predetermined value or less. Even in this way, the rate at which management processing is actually performed increases. Note that the timing for changing the queue switching rules and notifying the host unit 12 may be other than the above.
[0052] For example, the need for scan read, garbage collection, and processing to avoid read disturb can be predicted based on the elapsed time since the previous processing, the elapsed time since data was written, the memory access status up to that point, and other factors, so these countermeasures can be taken in advance. For example, the command adjustment unit 50 determines that a scan read command will be issued soon when the elapsed time since the last scan read exceeds a predetermined threshold. The command adjustment unit 50 also determines that a garbage collection command will be issued soon when the number of writable blocks falls below a predetermined threshold. The threshold used here is, of course, a value greater than the threshold used when actually issuing a garbage collection command.
[0053] Alternatively, when the scan read result satisfies a predetermined condition, such as the error rate of the read data exceeding a threshold even after adjusting the read voltage, the command adjustment unit 50 determines that a data copy command to avoid read disturb will soon be issued. If the queue switching rules are changed or the host unit 12 is notified at this timing, the amount of adjustment can be reduced by the amount of advance adjustment.
[0054] The number of writable blocks and the number of read operations for the same block may be periodically notified to the host unit 12, thereby gradually limiting the issuance of commands by the host unit 12. Furthermore, the change in the queue switching rule and the notification to the host unit 12 may be performed independently or simultaneously. This adjustment process makes it possible to maintain an appropriate balance between the processing of access requests from the host unit 12 and the management processing required by the flash memory 20 itself, and to ensure low latency for the processing of highly urgent commands.
[0055] FIG. 5 shows an example of the configuration of the queue 44. Here, each column represents a schematic representation of a queue, with the type of command stored in each queue indicated directly below, and an example of the maximum number of command entries indicated on the side of the column. The flash memory 20 is divided into logical partitions with different name spaces (NS) and are exclusively accessed. A queue is also provided for each partition, and the figure shows, from top to bottom, queues provided for name spaces with identification codes a, b, and c ("NSIDa," "NSIDb," and "NSIDc"). Furthermore, the bottom row also shows a queue provided for a "BG Job" (Background Job) representing management processing.
[0056] In this example, "NSIDa" is a partition accessed by a normal file system, and is provided with a queue 51 that contains a mixture of standard read and write commands. The upper limit of the number of command entries in queue 51 is set to, for example, 128. "NSIDb" is a partition that mainly handles read-only file archives, and after writing a file using queue 58 dedicated to write commands, the data is read using queues 52, 54, and 56 dedicated to read commands. As an example, the upper limit of the number of command entries in queues 52, 54, 56, 58, and 59 are set to 16, 256, 128, 32, and 128, respectively.
[0057] Here, the queue dedicated to read commands is composed of multiple queues according to the level of urgency. In the figure, there are three queues: an "urgent read" queue 52, which has the highest urgency, a "high priority read" queue 54, which has the next highest urgency, and a "normal priority read" queue 56, which has the lowest urgency. However, the number of queues is not limited to these. Furthermore, of the queues 58 and 59 dedicated to write commands, queue 58 is a "standard write" queue with a priority similar to that of the "NSIDa" queue 51, and queue 59 is a "high priority write" queue corresponding to high-speed writes. If there is free space in the SLC write cache, the processing of write commands stored in the "high priority write" queue 59 is scheduled in phases 1, 4, and 5, described below, similar to reads.
[0058] "NSIDc" is a partition configured with SLC, and is provided with a "high-speed write" queue 60 dedicated to high-speed write commands, and a queue 62 for a mixture of read and write commands. The latter is a standard queue with the same level of priority as the queue 51 of "NSIDa." As an example, the upper limit of the number of command entries in the queues 60 and 62 is set to 16 and 64, respectively.
[0059] The "BG Job" includes a queue 64 for read commands in data copy (migration), a queue 66 for write commands in data copy, a queue 68 for data erase commands, a queue 70 for garbage collection commands, a queue 72 for scan read commands, a queue 74 for metadata write-back commands, and a queue 76 for suspend commands. In addition to these queues, there may be a queue for storing commands for managing the system, separate from the above-mentioned management processes that should be executed in the background during operation.
[0060] As described above, the command processing unit 46 of the flash controller 18 processes the stored commands in order while switching between queues in accordance with the rules stored in the switching rule storage unit 48. More specifically, the queues 51 to 76 themselves are divided into multiple types, and a processing period is assigned to each type and circulated. When the number of processed commands reaches the upper limit during a period in which a queue of a certain type is being processed, or when the time limit expires, the system transitions to a period in which the next queue type is being processed. The processing upper limit and time limit can be set independently for each queue type. Hereinafter, the period assigned to each queue type will be referred to as a "phase."
[0061] 6 shows an example of setting the types of queues to be processed in each phase. In this example, the phase is divided into five periods, Phase 1 to Phase 5, and the phases are cyclically shifted from Phase 1 to Phase 2, 3, 4, 5, 1, 2, .... Phase 1 processes the queue of read commands for NSIDb and the queue of high-priority write commands. In the example of FIG. 5, these correspond to the four queues 52, 54, 56, and 59.
[0062] Of the read command queues 52, 54, and 56, queues containing commands with higher urgency are given priority for processing. After a predetermined number of read commands have been processed, high-priority write commands stored in queue 59 are processed, and so on, in a loop. Note that the number of commands is counted as one unit of access to data of a predetermined size. This also applies to the following explanations.
[0063] Phase 2 processes the queue of high-speed write commands for NSIDc, the queue of standard read / write commands for NSIDa and NSIDc, and the queue of standard write commands for NSIDb. In the example of Figure 5, these correspond to queues 60, 51, 62, and 58, respectively. Of these queues, if a command is stored in queue 60 for high-speed write commands, that command is given priority, thereby realizing high-speed writing to the SLC.
[0064] Phase 3 processes the queue 64 of read commands for data copy among the queues for BG Job, i.e., management processing. The commands stored in this queue 64 are read processes for transferring data already stored in the flash memory 20 to another area, and correspond to the data reading portion of a data copy from SLC to TLC, for example. The read data is temporarily stored in the SRAM 24 inside the flash controller 18.
[0065] In phase 4, like phase 1, the queue of read commands for NSIDb and the queue of high-priority write commands are processed. By dividing the processing of the same queue into two periods, commands issued immediately after the end of the previous period can be processed immediately in the next period, thereby reducing the maximum delay time. In phase 5, like phases 1 and 4, the queue of read commands for NSIDb and the queue of high-priority write commands are processed, and BG Job, i.e., queues for management processing, other than the queue of read commands processed in phase 3 are processed. In the example of Figure 5, these correspond to the six queues 66, 68, 70, 72, 74, and 76.
[0066] For example, when the queue 66 of write commands for data copying is the processing target, the data read in phase 3 is written to a destination area such as a TLC in the flash memory 20. When the queue 68 of data erase commands is the processing target, the data in the area that has become invalid due to the transfer of the data read in phase 3 is erased.
[0067] When a display image is drawn at a predetermined frame rate using the data stored in NSIDb, a delay in reading the data may cause the screen to freeze or drop frames. Because all commands stored in the management processing queue take a long time to complete, the two-stage processing, divided into Phase 3 and Phase 5, prevents interference with real-time processing such as the drawing of display images.
[0068] Furthermore, compared to reading data or writing to SLC, writing to TLC and erasing data takes several times longer. Writing and erasing to NAND flash memory is generally divided into multiple processes to reduce variations between memory cells, and the process is carried out while checking the state. Many recent NAND flash memories are capable of interrupting the erase or write process, performing a read or write process to SLC, and then returning to the erase or write process. The interruption and resumption of erasure is called erase suspend / resume, and the interruption and resumption of writing is called program suspend / resume.
[0069] By utilizing this mechanism, even if the erasure process requires 5 to 20 msec and the write process to the TLC requires 1 to 3 msec, it is possible to issue read and write commands to the SLC with a latency of 100 to 200 μsec. Therefore, the erasure process and the write process to the TLC are grouped together as Phase 5, and a time limit is set so that the process can be temporarily interrupted and moved to a command in another queue, even if it is in the middle of processing. Alternatively, the management process may be interrupted when a command is stored in a highly urgent queue, such as the "urgent read" queue 52 in FIG. 5. This minimizes the impact on the display image when a display image is drawn using data read from NSIDb as described above.
[0070] 7 illustrates a procedure in which the command processing unit 46 processes commands stored in each queue while transitioning between phases. As described above, the command processing unit 46 switches between queues, reading commands from each queue in order, starting with the command stored earliest, and accessing the corresponding memory. In the figure, the process is represented by a cylinder representing the target queue, and each queue corresponds to the one shown in FIG. 5. If no commands are stored in the queue, the process moves on to processing the next queue.
[0071] First, in phase 1, the command processing unit 46 reads and writes from and to NSIDb. In the illustrated example, commands stored in the queue 52 for emergency read commands, the queue 54 for high-priority read commands, and the queue 56 for normal-priority read commands are processed in this order. During this process, the command processing unit 46 continues processing commands stored in the queue 52 for emergency read commands until the queue 52 reaches a preset upper limit for the number of commands that can be processed (S10). Here, the upper limit for the number of commands that can be processed is set to, for example, two per channel.
[0072] When the number of commands stored in the queue 52 of emergency read commands to be processed reaches an upper limit or when there are no more commands to be processed, the command processing unit 46 then processes commands stored in the queue 54 of high priority read commands (S12). During this period, if commands remain in the queue 52 of emergency read commands or if new commands are stored, the command processing unit 46 will shift processing to the commands stored in the queue 52 of emergency read commands as soon as it completes the command being processed (S10).
[0073] In this case, too, when the number of commands stored in the queue 52 for emergency read commands reaches an upper limit or when there are no more commands to be processed, the command processing unit 46 returns processing to the commands stored in the queue 54 for high-priority read commands (S12). After completing processing of the commands stored in the queue 54 for high-priority read commands, the command processing unit 46 then processes the commands stored in the queue 56 for normal-priority read commands (S14). During this period, if commands remain in the queue 52 for emergency read commands or if a new command is stored, the command processing unit 46 shifts processing to the commands stored in the queue 52 for emergency read commands as soon as it completes the command currently being processed (S10).
[0074] In this case, too, when the number of commands stored in the queue 52 for emergency read commands reaches an upper limit, or when there are no more commands to be processed, the command processing unit 46 returns to processing the queue 54 for high-priority read commands and then the queue 56 for normal-priority read commands (S12, S14). In this cycle, after processing a predetermined number of read commands, the command processing unit 46 processes commands stored in the queue 59 for high-priority write commands (S16). Here, the number of read commands processed when transitioning to write commands is, for example, 32 for each channel.
[0075] When all commands stored in the queue 59 of high-priority write commands have been processed or when the upper limit of the number of commands to be processed that is preset for the queue 59 has been reached, the command processing unit 46 returns to processing of read commands in S10, S12, and S14. The command processing unit 46 repeats the above processing procedure until a preset condition for transitioning from Phase 1 to Phase 2 is met, and when the condition is met, the processing transitions to Phase 2. Here, the transition condition may be, for example, when the total number of processed commands reaches a preset upper limit, or when the time limit assigned to Phase 1 has expired.
[0076] This processing procedure allows for more frequent monitoring of command storage and priority processing for queues with higher urgency, minimizing the time from command issuance to completion of processing. For commands with relatively lower urgency, the upper limit on the number of commands that can be processed is set as a constraint, and processing is postponed, allowing transition to another phase, thereby controlling the time and bandwidth required for the entire phase.
[0077] In the following phase 2, the command processing unit 46 reads and writes data from and to NSIDs a to c. The command processing unit 46 first processes the commands stored in the high-speed write command queue 60 for NSID c (S18). After processing all the commands stored in the queue 60, the command processing unit 46 processes the commands stored in the standard read / write command queue 51 for NSID a, the standard write command queue 58 for NSID b, and the standard read / write command queue 62 for NSID c in round-robin order (S20).
[0078] The command processing unit 46 performs the processes of S18 and S20 until a preset condition for transitioning from Phase 2 to Phase 3 is met, and when the condition is met, transitions to Phase 3. Here, the transition condition may be, for example, when four write commands have been processed, when 16 read commands have been processed, when two write commands and eight read commands have been processed, when one write command and 12 read commands have been processed, or when three write commands and four read commands have been processed. Since writes to NSIDa and NSIDb are made via the SLC used as a write cache, latency can be maintained constant by respectively setting the number of write commands to the SLC and the number of read commands to be processed for the SLC and TLC.
[0079] In the following Phase 3, the command processing unit 46 performs reading for data copying as part of the management processing. That is, the command processing unit 46 processes the commands stored in the read command queue 64 for the BG job (S22). For example, the command processing unit 46 processes a predetermined number of commands, and once it has finished storing the data specified in each command from the flash memory 20 to the SRAM 24 inside the flash controller 18, it transitions from Phase 3 to Phase 4.
[0080] In the following phase 4, the command processing unit 46 again reads from and writes to NSIDb. This processing is the same as the procedure described in phase 1, so a description thereof will be omitted. The conditions for transitioning from phase 4 to phase 5 may be the same as the conditions for transitioning from phase 1 to phase 2. In the following phase 5, the command processing unit 46 reads from and writes to NSIDb, and also performs write processing, data erasure, garbage collection, scan read, and other management processing.
[0081] As described above, it is possible to reduce the latency of reading from NSIDb by dividing the management process into phase 3 and phase 5. Phase 5 targets processes that take several times longer than writing to an SLC, such as writing to a TLC or erasing block data, but by suspending these processes after a predetermined time has elapsed using a suspend command and performing SLC or TLC reading or writing to an SLC, it is possible to further reduce the latency of processes that require high speed.
[0082] In phase 5, the command processing unit 46 first reads from and writes to NSIDb. This process is basically the same as the procedure described in phase 1, so a detailed description will be omitted. However, in S16, once all commands stored in the high-priority write command queue 59 have been processed or the upper limit of the number of commands that can be processed in the high-priority write command queue 59 has been reached, the command processing unit 46 processes commands in the write command queue 66, data erase command queue 68, garbage collection command queue 70, scan read command queue 72, metadata write back command queue 74, and suspend command queue 76 for the BG job (S24).
[0083] If any of these commands have been previously suspended, the command processing unit 46 resumes processing from where it left off. This process is actually achieved by a program resume or erase resume command. If no suspended commands have been executed, the command processing unit 46 processes the commands stored in the BG Job queues 66, 68, 70, 72, 74, and 76 at the specified timing.
[0084] The command processing unit 46 continues the management process until all command processing is completed or a preset time limit has expired, at which point the process returns to the cycle of reading and writing data from and to NSIDb. The interruption of the process upon expiration of the time limit is realized by processing a command in the suspend command queue 76. The time limit for returning the process to the cycle of reading and writing data from NSIDb is set to, for example, 700 μsec.
[0085] The command processing unit 46 repeats the above processing procedure until a preset condition for transitioning from Phase 5 to Phase 1 is met, and when the condition is met, the command processing unit 46 transitions the processing to Phase 1. The transition condition may be, for example, when one unit of management processing, such as data write, data erase, or scan read, is completed, or when the time limit given to Phase 5 has expired. The time limit may be, for example, 10 msec.
[0086] In the illustrated processing procedure, by taking into consideration the causal relationship between the number of commands issued from the host unit 12 and the occurrence of management processing, and by setting the upper limit on the number of commands to be processed and the time limit for each phase in an appropriate balance, it is possible to process all of the management processing smoothly without causing a breakdown. In addition, by appropriately switching the queue to be processed in each phase according to the processing content and priority as described above, it is possible to control the time from the issuance of each command to the completion of processing.
[0087] Next, we will explain the process of performing a scan read as part of the management process and optimizing the read voltage during data read. Figure 8 illustrates the progress of the data read process during periods when a scan read is being performed and other periods. The horizontal axis of the diagram is the time axis, and rectangles represent one unit of data read time for the four channels "ch0" to "ch3" of the flash memory 20. The numbers 0, 1, and 2 shown inside each rectangle are read voltage identification numbers, and each read process is performed at the actual read voltage that is pre-assigned to that identification number.
[0088] Conventionally, techniques for scanning SSDs to detect defects are performed manually or automatically. In this case, the flash controller 18 scans each block, which is the unit of data erasure, and measures the error rate. When the error rate approaches the limit that can be corrected by ECC, a block copy is performed, in which the data written in that block is rewritten to another block.
[0089] In this embodiment, the scan read process extracts and reads a portion of the data from a block, which is the smallest unit. If the error rate exceeds the threshold corresponding to the ECC tolerance, a different read voltage is tried, ultimately obtaining a read voltage that allows data to be read within the ECC tolerance. The dashed ellipses in the scan read period in Figure 8 each indicate the read time for a group of blocks to be read (scanned) at one time. In other words, ellipses 150, 152, and 154 respectively enclose the read times for the first, second, and third scanned groups of blocks.
[0090] Writing to the TLC is performed by using the SLC as a cache and copying data from there, so it is performed simultaneously on all channels.As described above, the read voltage is determined by the temperature when the data is written, the temperature when the data is read, and the time and temperature elapsed since writing, so it is expected that the optimal read voltage will be approximately the same for corresponding blocks in each channel to which data was written at the same time.
[0091] Therefore, as shown in the figure, by scanning blocks of multiple channels (or all channels) in which data was written at the same time and determining the optimal read voltage for each block, efficient control becomes possible. As in the example shown in Figure 3, if the identification number of the read voltage in the initial setting is set to "0," in the illustrated example, the read operation for the first block group indicated by oval 150 is successful with that setting, and the error rate is below the threshold, so the read process ends at that point. In this case, the read voltage setting remains set to identification number "0."
[0092] In the read of the second block group indicated by oval 152, the read failed at the read voltage of identification number "0" or was successful but the error rate exceeded the threshold, so a retry was performed at the read voltage of identification number "1." However, in this case too, the read failed or was successful but the error rate exceeded the threshold, so a second retry was performed at the read voltage of identification number "2." As a result, the read was successful and the error rate was below the threshold, so the read process for that block group ended at that point, and the read voltage setting was updated to the value of identification number "2."
[0093] Even in the case of reading the third block group indicated by oval 154, the readout at the read voltage of identification number "0" either fails or is successful but the error rate exceeds the threshold, so a retry is made at the read voltage of identification number "1." Since the readout at this read voltage for this block group is successful and the error rate is below the threshold, the scanning process ends at that point, and the read voltage setting is updated to the value of identification number "1."
[0094] By periodically performing this type of scan read process during the management process, the read voltage can be kept close to the optimum value. During normal data reads, as shown on the right side of the diagram, random pages in each block group are read. By associating the read voltage obtained as a result of the scan read with the block group and appropriately switching the read voltage depending on the block being read, as shown in the diagram, the likelihood of reading correct data in the first read process increases. Even if a retry is necessary, adjusting the read voltage based on the read voltage obtained as a result of the scan read increases the probability of successful reading with fewer attempts.
[0095] 9 shows an example of the data structure of a block management table referenced by the flash controller 18. The block management table 160 is stored in the DRAM 132 or the like, and has a structure in which a block number 162, a read voltage (Vref) 164, a physical block list 166, and an erase count 168 are associated with each other. However, the data structure is not limited to that shown in the figure. Furthermore, each piece of data may be linked to another table.
[0096] The block numbers 162, "0," "1," "2," etc., are numbers that identify the block groups scanned first, second, third, etc. in Fig. 8, and may also be associated with LBAs. The physical block list 166 stores a list of the physical addresses of the blocks included in each block group. For example, the flash controller 18 converts the LBA to be accessed, which is included in a command issued by the host unit 12, into a physical address by referring to the physical block list 166, etc.
[0097] Furthermore, each time data in each block group is erased, the flash controller 18 reflects the number of times this has been done in the erase count 168, and performs wear leveling so that the erase count is distributed among all block groups. In this embodiment, a column for read voltage 164 is added to the block management table 160, and the latest optimum read voltage value obtained by scan read as shown in Fig. 8 is associated with each block group. In the figure, identification numbers "0", "1", "2", ... are shown as read voltages 164, but the notation is not limited to this.
[0098] The flash controller 18 refers to the block management table 160 and obtains the target physical address for a normal data read request. At the same time, the flash controller 18 refers to the read voltage 164 column and obtains the optimum read voltage. The flash controller 18 then issues a read voltage change command that specifies the voltage (or identification number) in association with the read command. This allows the command processing unit 46 to read data at the optimum read voltage for each read destination block.
[0099] 10 is a flowchart showing the processing steps for the flash controller 18 to perform a scan read and determine the optimum read voltage. This processing is realized by the management command generation unit 42 issuing a scan read command at a predetermined cycle and the command processing unit 46 processing the command during the management processing. First, the management command generation unit 42 extracts a page to be read from each block group and associates it with the block group (S50).
[0100] The page to be read is selected randomly for each block from a worst page list stored in advance in the DRAM 132 or the like. The worst page list is a list showing the results of extracting pages with error rates exceeding a threshold from each block through a prior NAND evaluation. Pages with high error rates are fixed to some extent by physical factors related to memory cells, so narrowing down the target of scan read to one of those pages makes it possible to perform data read attempts and measure error rates assuming the worst case.
[0101] For example, assuming that the channels are "0" to "3" and the LUNs (Logical Unit Numbers) are "0" and "1," the management command generation unit 42 determines the pages to be read in each of the eight regions (CH:LUN) = (0:0, 0:1, 1:0, 1:1, 2:0, 2:1, 3:0.3:1) for each block group. The pages to be read may be one page or multiple pages per block. Preferably, the read targets are distributed so that different pages are read in different block groups.
[0102] Next, the command processing unit 46 sets one block group to be read (S52) and sets a temporary read voltage Vref (S54). As shown in Figure 8, the first read uses the read voltage that has been used up to that point, such as an initial setting value. The command processing unit 46 then reads the data of the page associated with the target block group set in S52 at the read voltage set in S54 (S56).
[0103] If the read fails or the error rate of the read data exceeds a threshold value (Y in S58), the command processing unit 46 sets the read voltage and retries reading the data as long as the time limit given to the management process of phase 5 is not exceeded and as long as there is an untried read voltage (Y in S60, N in S62, S54, S56).The loop of S54 to S62 is repeated, and when the time limit given to the management process is exceeded (N in S60), the command processing unit 46 ends the scan read process.
[0104] On the other hand, if reading fails or the error rate of the read data exceeds the threshold value even after trying all read voltages (Y in S62), the command processing unit 46 adds information about the block group to be read to the data evacuation list (S64), so that the data of the entire block group can be copied to another area and reproduced at the timing of the subsequent management process.
[0105] If the data is successfully read and the error rate is below the threshold value after one or more attempts (N in S58), the command processing unit 46 stores the read voltage used at that time in the read voltage 164 column of the block management table 160, corresponding to the target block group (S66). As a result, data is subsequently read at the optimal read voltage. If, at this stage, the time limit for the phase 5 management process is exceeded (N in S68), the command processing unit 46 terminates the scan read process.
[0106] On the other hand, if the time limit is not exceeded (Y in S68), or if the information on the block group is added to the backup list in S64, the command processing unit 46 sets one block group to be read next (S52) and repeats the processes of S54 to S68. As a result, scan read is performed on multiple block groups within the time limit set for the management process, and the optimal read voltage is registered.
[0107] Because scan reads measure error rates, they may have a larger overhead than normal data read processes. However, because the time required for a single scan read is 200 μsec or less, it is possible to scan around three to four groups of blocks within the 700 μsec time limit given to management processing. If there is no other read / write traffic, management processing is scheduled repeatedly, so in an idle state, a scan of the entire flash memory 20, which has 300 to 400 blocks per plane, can be completed within 100 msec.
[0108] Changes in the optimal read voltage due to charge leakage caused by temperature or time lapse become apparent over a period of several hours to several days, even when operating at high temperatures. On the other hand, changes in the optimal read voltage due to temperature differences between write and read operations or read disturbance become apparent over a period of several tens of seconds at the shortest. As such, the time scale for changes in read voltage varies depending on the cause, so multiple ranges of blocks targeted by scan read and processing frequencies may be prepared depending on the cause.
[0109] For example, when considering both charge leakage and read disturb, the flash controller 18 creates a list of blocks covering the entire flash memory 20 for the former, and creates a list of recently accessed blocks for the latter. Then, it performs scan reads on the blocks covering the entire flash memory 20 at long intervals, about once an hour, and on the recently accessed blocks at short intervals, about once a minute.
[0110] When the latter group of blocks consists of 30 to 40 blocks, the time required for a scan read is about 10 msec, and the overhead is sufficiently small. In addition, because the cycle is sufficiently long, it is possible to control the scan read command so that it is issued only when there is no need to process other commands, that is, when the queue is empty.
[0111] According to the present embodiment described above, as a management process for the NAND flash memory, scan read is periodically performed to determine the optimum value of the read voltage, thereby reducing the possibility of read retries being required due to read failures or errors occurring at a rate that cannot be corrected by ECC when reading data required for information processing, resulting in significant latency.
[0112] Scan read is performed on blocks that are written to simultaneously, and on pages with high error rates in each block. The size of the blocks to be scanned and the frequency of scans are varied depending on the cause of the read voltage change. This allows for efficient determination of the optimal read voltage.
[0113] Furthermore, scan read commands, commands related to other management processes, and commands related to reading and writing data required for information processing are appropriately classified and stored in different queues. Then, according to the rules and phase settings set for each queue, the target queue is switched to read and process the command. This allows processing to be switched at the optimal timing depending on the characteristics, preventing situations where, for example, processing of a highly urgent access request from the host unit is delayed due to scan read. As a result, memory access latency is minimized, allowing information processing to proceed stably with high throughput.
[0114] The present invention has been described above based on the embodiments. The above embodiments are merely examples, and it will be understood by those skilled in the art that various modifications are possible in the combination of the respective components and treatment processes, and that such modifications are also within the scope of the present invention.
[0115] As described above, the present invention can be used in information processing devices such as game devices, personal computers, and mobile terminals.
[0116] 10 Information processing device, 12 Host unit, 14 System memory, 18 Flash controller, 20 Flash memory, 22 Host controller, 24 SRAM, 28 NAND controller, 30 Command issuing unit, 32 Information processing unit, 34 Data input / output unit, 36 Queue, 40 Command receiving unit, 42 Management command generating unit, 44 Queue, 46 Command processing unit, 48 Switching rule storage unit, 50 Command adjustment unit, 132 DRAM.
Claims
1. An information processing device comprising one or more processors having hardware, the one or more processors reading data from a memory at a predetermined period, determining and recording a read voltage based on the results of the data reading, and reading data to be used for information processing at the recorded read voltage.
2. The information processing device according to claim 1, wherein the one or more processors determine the read voltage for each of a plurality of blocks in the flash memory.
3. The information processing device according to claim 1, wherein the one or more processors determine the read voltage for each of a plurality of blocks to which data is written simultaneously in all channels of the flash memory.
4. The information processing device according to claim 2 or 3, wherein the one or more processors select a page in each of the plurality of blocks in which an error rate exceeds a threshold value, and perform the data read.
5. The information processing device according to claim 2 or 3, wherein the one or more processors perform the data readout for blocks selected according to different rules at different periods.
6. The information processing device according to claim 5, wherein the one or more processors perform the data read targeting a group of blocks covering the memory and the data read targeting a group of blocks that have been accessed most recently, the latter at a shorter cycle than the former.
7. An information processing device according to any one of claims 1 to 3, wherein the one or more processors attempt to read the data by changing a read voltage, and determine a read voltage at which data is read with an error rate equal to or lower than a threshold.
8. The information processing device according to claim 1, wherein the one or more processors terminate the data reading when a predetermined time limit expires.
9. An information processing device comprising one or more processors having hardware and a flash memory for storing data used by the processors, wherein the one or more processors read data from the flash memory at a predetermined period, determine and record a read voltage based on the results of the data read, and read data to be used for information processing at the recorded read voltage.
10. A memory management method comprising: reading data from a memory at a predetermined cycle; determining and recording a read voltage based on a result of the data reading; and reading data to be used for information processing at the recorded read voltage.
11. A recording medium having recorded thereon a program for causing a computer to realize the following functions: reading data from a memory at a predetermined cycle; determining and recording a read voltage based on the results of said data reading; and reading data to be used for information processing at the recorded read voltage.
Citation Information
Patent Citations
Semiconductor storage
WO2014132346A1
Memory system
JP2021047963A
Memory system
JP2022051399A
Device for selecting a level for at least one read voltage
US20150169468A1
System and method for data recovery in a solid state storage device using optimal reference voltage values of a related storage element
US8861272B1
