A storage system and method for reducing read disturbance

By setting up a cache unit between the flash controller and the memory, storing and prioritizing frequently accessed addresses and data, the read interference problem in flash memory is solved, reducing costs and improving the reliability of the storage system.

CN118897660BActive Publication Date: 2024-12-06MINDMOTION MICROELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411397051.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2024-12-06
Estimated Expiration
2044-10-09

AI Technical Summary

Technical Problem

In the prior art, read interference problems exist in flash memory, resulting in data being damaged due to frequent readings, and the existing solutions are costly.

Method used

A cache unit is set up between the flash controller and the flash memory to store frequently accessed access addresses and access data within the preset time period, and read data from the cache unit first, reducing the number of times to read the flash memory.

Benefits of technology

It effectively reduces the read interference problem caused by frequent reading of a certain address, and the increased cache unit storage space is small, hardware overhead is small, and cost savings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118897660B_ABST
    Figure CN118897660B_ABST
Patent Text Reader

Abstract

The present invention provides a storage system and method for reducing read interference, the storage system includes a flash controller and a flash memory, a cache unit is arranged between the flash controller and the flash memory, the cache unit is used to store cache data, the cache data includes a plurality of access addresses most frequently accessed in a preset time period and their corresponding access data; when the flash controller receives a read command issued by a host, it determines whether the cache unit stores a target address required for the read command according to the read command; if it is determined to be yes, the target data is determined from the cache unit according to the target address and sent to the host; if it is determined to be no, the target data is determined from the flash memory according to the target address and sent to the host, and the target address and the target data are written into the cache unit. By setting the cache unit, the number of times the data in the flash memory is read is reduced, and the read interference problem is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of solid state disk storage technology, and further to a storage system and method for reducing read disturbance. Background Art

[0002] Read disturb is a common phenomenon in flash memory. When the data in the memory is read too many times, it is easy to cause data errors or damage, which is called read disturb. For example, when you listen to a song on a mobile phone, the system will read the data of the song in a loop. After playing it for more than ten days, the song data may be damaged due to excessive reading.

[0003] In the prior art, the solution to read disturbance is usually to improve the flash process or control the number of reads of each block, but the application cost is high. Summary of the invention

[0004] The object of the present invention is to provide a storage system and method for reducing read interference, wherein a cache unit is set between a flash controller and a flash memory, and frequently accessed access addresses and access data within a preset time period are stored in the cache unit. When certain data needs to be read, it is read from the cache unit first, thereby effectively reducing the number of times the same address in the flash memory is read continuously, and avoiding the read interference problem caused by frequently reading a certain address.

[0005] The technical solution provided by the present invention is as follows:

[0006] The present invention provides a storage system for reducing read disturbance, the storage system comprising a flash controller and a flash memory, a cache unit being arranged between the flash controller and the flash memory, the cache unit being used to store cache data, the cache data comprising a plurality of most frequently accessed access addresses within a preset time period and their corresponding access data;

[0007] When the flash controller receives a read command issued by the host, it determines whether the target address required by the read command is stored in the cache unit according to the read command; if it is determined to be yes, the target data is determined from the cache unit according to the target address and sent to the host; if it is determined to be no, the target data is determined from the flash memory according to the target address and sent to the host, and the target address and the target data are written into the cache unit.

[0008] In some embodiments, the flash controller determines whether the size of the storage space occupied by the target address and the target data is smaller than the size of the remaining cache space of the cache unit before writing the target address and the target data into the cache unit;

[0009] If the judgment is yes, writing the target address and the target data into the cache unit;

[0010] If the judgment is no, the target address and the target data are used to replace the access address with the least number of accesses among the most frequently accessed access addresses and the access data corresponding thereto.

[0011] In some embodiments, the cache data includes an access count, where the access count is used to indicate the number of times the access address is hit within the preset time period;

[0012] When the access address in the cache unit is hit, the flash controller controls the access count corresponding to the hit access address to be increased by one.

[0013] In some embodiments, the cache data includes a number of consecutive misses, where the number of consecutive misses is used to indicate the number of times the access address is not hit consecutively within the preset time period;

[0014] When the access address in the cache unit is hit, the flash controller controls the number of consecutive misses corresponding to the hit access address to be changed to a preset value, and controls other consecutive misses corresponding to other access addresses to be increased by one.

[0015] In some implementations, the flash controller determines whether the number of consecutive misses is greater than a preset first threshold after writing the target address and the target data into the cache unit;

[0016] If the judgment is yes, the access address corresponding to the number of consecutive misses and the corresponding access data are deleted.

[0017] In some implementations, the cache data includes a valid bit, and the valid bit is used to indicate a valid state of the access address and its corresponding access data.

[0018] The present invention also provides a method for reducing read disturbance, which is applied to a storage system, wherein the storage system includes a flash controller and a flash memory, a cache unit is provided between the flash controller and the flash memory, and the cache unit is used to store cache data, wherein the cache data includes a plurality of most frequently accessed access addresses and their corresponding access data within a preset time period;

[0019] The method comprises:

[0020] Controlling the flash controller to receive a read command issued by a host, and determining whether the cache unit stores a target address required by the read command according to the read command;

[0021] If the judgment is yes, determine the target data from the cache unit according to the target address and send it to the host;

[0022] If the judgment is no, the target data is determined from the flash memory according to the target address and sent to the host, and the target address and the target data are written into the cache unit.

[0023] In some implementations, before writing the target address and the target data into the cache unit, the method further includes:

[0024] Determining whether the size of the storage space occupied by the target address and the target data is smaller than the size of the remaining cache space of the cache unit;

[0025] If the judgment is yes, writing the target address and the target data into the cache unit;

[0026] If the judgment is no, the target address and the target data are used to replace the access address with the least number of accesses among the most frequently accessed access addresses and the access data corresponding thereto.

[0027] In some embodiments, when the target address required by the read command is stored in the cache unit, the number of consecutive misses corresponding to the access address that is hit is controlled to be changed to a preset value, and the other number of consecutive misses corresponding to other access addresses is controlled to be increased by one; wherein the number of consecutive misses represents the number of times the access address is not hit consecutively within the preset time period.

[0028] In some implementations, after writing the target address and the target data into the cache unit, the method further includes:

[0029] Determining whether the number of consecutive misses is greater than a preset first threshold;

[0030] If the judgment is yes, the access address corresponding to the number of consecutive misses and the corresponding access data are deleted.

[0031] Compared with the prior art, the storage system and method for reducing read disturbance provided by the present invention have the following beneficial effects:

[0032] 1. By setting a cache unit between the flash controller and the flash memory, the access address and access data that are frequently accessed within a preset time period are stored in the cache unit. When the flash controller receives a read command, it can read data from the cache unit first, reducing the phenomenon of frequent reading of the same address in the flash memory and avoiding the read interference problem caused by frequent reading of a certain address.

[0033] 2. The additional cache unit requires less storage space and less hardware overhead, which is conducive to cost savings.

[0034] 3. The data replacement strategy in the cache unit in this application takes the access times into consideration. When new data needs to be written and the storage space of the cache unit is insufficient, the access address with the least access times and its corresponding access data are replaced, rather than just according to the most recent access time, so that the access address with the most access times in a preset time period and its corresponding access data are stored in the cache unit. In this way, the access address with the most recent access times and its corresponding access data are always stored in the cache unit. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Other features, objects and advantages of the present invention will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings. The drawings are only for the purpose of illustrating preferred embodiments and are not to be considered as limiting the present invention. Also, the same reference symbols are used throughout the drawings to represent the same parts.

[0036] Figure 1 It is a structural schematic diagram of a storage system for reducing read disturbance according to the present invention;

[0037] Figure 2 It is a structural schematic diagram of an embodiment of a cache unit in a storage system for reducing read disturbance according to the present invention;

[0038] Figure 3 The present invention is a flowchart of a method for reducing read disturbance. DETAILED DESCRIPTION

[0039] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0040] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections.

[0041] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0042] In addition, in the description of the present application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the specific implementation methods of the present invention will be described below with reference to the accompanying drawings. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings and other implementation methods can be obtained based on these drawings without creative work.

[0044] Flash memory is divided into NAND flash and NOR flash according to its structure.

[0045] NAND flash is accessed by page and is generally used for data storage functions such as USB flash drives and SSDs (solid-state drives). NAND flash has a serious read disturbance problem because when reading a certain bit, a conduction voltage must be applied to the adjacent bits. The accumulation of this voltage can easily cause serious read disturbance problems to the adjacent bits. In severe cases, this can cause errors in the read data or even data loss. On SLC flash (single-layer cell flash), read disturbance problems will only occur when a block is read 1KK times (one million times). On MLC flash (multi-layer cell flash), read disturbance problems can occur when a block is read 100K times (100,000 times) or even 20K times (20,000 times). For example, if you play a song on a mobile phone on repeat, you may find that the song data is corrupted after more than ten days.

[0046] NOR flash is used for instruction storage. Generally, it only reads the target bit and does not affect the adjacent bits. Therefore, the number of reads of NOR flash is much higher than that of NAND flash. However, when the data in NOR flash is read continuously or multiple times, it will also cause read interference problems. For example, when a small loop program needs to be executed, the data here or the data of the adjacent storage unit may be wrong after a period of time due to repeated reading of the address where the loop program is located, affecting the accuracy of the data.

[0047] In the prior art, the commonly used methods to reduce the read disturbance problem are usually the following. Method 1: Improve the flash process and increase the number of reads. Method 2: Control the number of reads of each block, transfer data when data anomalies are detected, and avoid frequent reads of a certain address. Method 3: Use a stronger error correction algorithm to automatically correct errors when errors in a limited number of bits are detected. Method 4: Use instruction cache to read from the cache when reading repeatedly, without having to read from the flash memory.

[0048] However, the cost of improving the flash process in method one is high. In method two, a controller is required to control the number of reads of the block and record the number of reads, which is costly. In method three, a stronger error correction algorithm is used, which also requires more bits to store the data for error correction, which is costly. The use of instruction cache in method four is generally used to match slow memory (internal memory) to speed up program execution, and requires a relatively large capacity, such as 4kb (kilobytes) to 64kb to meet the execution requirements of the program, otherwise it cannot cover the situation where the program jumps.

[0049] Therefore, the read disturbance problem existing in the flash memory needs to be further improved.

[0050] To solve the above technical problems, the present invention provides a storage system and method for reducing read interference. A cache unit is set between a flash controller and a flash memory, and access addresses and access data that are frequently accessed within a preset time period are stored in the cache unit. When a certain address needs to be accessed multiple times, the data can be read directly from the cache unit without frequently reading from the flash memory, which effectively reduces the number of times the same address in the flash memory is read, and avoids the read interference problem caused by frequent reading of a certain address.

[0051] In the prior art, a first-level cache or a second-level cache is usually set up to save the most recently read data. When it is necessary to access this data, it can be read directly from the fast cache instead of from the slow memory, reducing the access delay and thus improving the access speed. The first-level cache is usually built into the CPU and runs at the same speed as the CPU. Since the first-level cache is tightly integrated with the CPU, the first-level cache can provide the data and instructions required by the CPU very quickly, improving the access speed to the memory. The second-level cache is usually set between the memory and the first-level cache to coordinate the speed difference between the first-level cache and the memory. In short, both the first-level cache and the second-level cache are set between the controller and the CPU, and by reducing the physical distance of data transmission, the access delay is further reduced and the access speed is improved.

[0052] Below, this scheme will be described in detail with reference to the accompanying drawings.

[0053] like Figure 1 As shown, the present invention provides a storage system for reducing read disturbance, the storage system includes a flash controller 20 and a flash memory 40, a cache unit 30 is arranged between the flash controller 20 and the flash memory 40, the cache unit 30 is used to store cache data, and the cache data includes a plurality of most frequently accessed access addresses and their corresponding access data within a preset time period;

[0054] When the flash controller 20 receives a read command from the host 10, it determines whether the target address required by the read command is stored in the cache unit 30 according to the read command; if it is determined to be yes, the target data is determined from the cache unit 30 according to the target address and sent to the host 10; if it is determined to be no, the target data is determined from the flash memory 40 according to the target address and sent to the host 10, and the target address and target data are written into the cache unit 30.

[0055] In practice, the storage system includes a flash controller 20 and a flash memory 40, and a cache unit 30 is disposed between the flash controller 20 and the flash memory 40, and the cache unit 30 is located closer to the flash controller 20 than the flash memory 40. The cache unit 30 stores a plurality of most frequently accessed access addresses and their corresponding access data within a preset time period.

[0056] In practice, the cache unit 30 caches data in the flash memory 40 , and the cache unit 30 may be implemented by flipflop (a clock edge triggered storage unit) or SRAM (static random access memory).

[0057] During implementation, the most frequently visited access address is determined based on the number of accesses and the most recent access time.

[0058] It should be noted that the start and end time of the preset time period can be set according to the actual application scenario, and no limitation is made here. Preferably, the preset time period is a recent time period, for example, the last hour.

[0059] In implementation, the flash controller 20 is used to receive a read command from the host 10 , and determine target data from the cache unit 30 or the flash memory 40 to send to the host 10 .

[0060] In practice, when the host 10 needs to obtain data, the host 10 sends a read instruction including a target address to the flash controller 20. When the flash controller 20 receives the read command from the host 10, it preferentially searches for the target data from the cache unit 30. Specifically, the flash controller 20 matches the target address in the read command with the access address in the cache unit 30 in sequence. If the match is successful, it is determined that the cache unit 30 stores the target address required by the read command, and the flash controller 20 determines the target data corresponding to the target address and sends it to the host 10.

[0061] In practice, the flash controller 20 matches the target address in the read command with the access address in the cache unit 30 in sequence. If the match fails, the flash controller 20 determines the corresponding target data from the flash memory 40 according to the target address in the read command, and sends the target data to the host 10. At the same time, the flash controller 20 writes the target address and the target data into the cache unit 30.

[0062] By setting a cache unit 30 between the flash controller 20 and the flash memory 40, the access address and access data that are frequently accessed within a preset time period are stored in the cache unit 30. When the flash controller 20 receives a read command, the data can be read from the cache unit 30 first, thereby reducing the phenomenon of frequent reading of the same address in the flash memory 40 and avoiding the read interference problem caused by frequent reading of a certain address.

[0063] In one embodiment, based on the above embodiment, before writing the target address and the target data into the cache unit 30, the flash controller 20 determines whether the size of the storage space occupied by the target address and the target data is smaller than the size of the remaining cache space of the cache unit 30;

[0064] If the judgment is yes, the target address and target data are written into the cache unit 30;

[0065] If the judgment is negative, the target address and the target data are replaced by the access address with the least number of accesses among the most frequently accessed access addresses and its corresponding access data.

[0066] In practice, the flash controller 20 determines the size of the storage space occupied by the target address and the target data, and compares it with the size of the remaining cache space of the cache unit 30 .

[0067] In implementation, if the size of the storage space occupied by the target address and the target data is smaller than the size of the remaining cache space of the cache unit 30 , the flash controller 20 writes the target address and the target data into the cache unit 30 .

[0068] During implementation, if the size of the storage space occupied by the target address and the target data is larger than the size of the remaining cache space of the cache unit 30, the cache unit 30 cannot accommodate the target address and the target data. At this time, the flash controller 20 determines the access address with the least access times and its corresponding access data among all the access addresses stored in the cache unit 30, deletes the access address with the least access times and its corresponding access data, and then writes the target address and the target data into the cache unit 30.

[0069] In a specific implementation, the access address with the least access times is accessed 10 times, the target address is accessed for the first time, and the target address and target data replace the access address with the least access times of 10 and its corresponding access data.

[0070] Since the data stored in the cache unit 30 is relatively small, how the new data replaces the original data will affect the number of reads of the flash memory 40. In the present application, the replacement strategy for the data in the cache unit 30 takes the number of accesses into consideration. When new data needs to be written and the storage space of the cache unit 30 is insufficient, the access address with the least number of accesses and its corresponding access data are replaced, rather than just according to the most recent access time, so that the access address with the most recent accesses within a preset time period and its corresponding access data are stored in the cache unit 30. In this way, the access address with the most recent accesses and its corresponding access data are always stored in the cache unit 30, which is conducive to reducing the number of reads of the flash memory 40.

[0071] In one embodiment, based on the above embodiment, the cache data includes an access count, and the access count is used to indicate the number of times the access address is hit within a preset time period;

[0072] When an access address in the cache unit 30 is hit, the flash controller 20 controls the access count corresponding to the hit access address to increase by one.

[0073] In implementation, the cache data includes the number of accesses indicating that the access address is hit within a preset time period.

[0074] In implementation, when an access address in the cache unit 30 is hit, the flash controller 20 controls the access count corresponding to the hit access address to increase by one.

[0075] In one embodiment, based on the above embodiment, the cache data includes the number of consecutive misses, and the number of consecutive misses is used to indicate the number of times that the access address is not hit consecutively within a preset time period.

[0076] When an access address in the cache unit 30 is hit, the flash controller 20 controls the number of consecutive misses corresponding to the hit access address to be changed to a preset value, and controls other consecutive misses corresponding to other access addresses to be increased by one.

[0077] In implementation, the cache data includes information indicating the number of times the access address is not hit continuously within a preset time period.

[0078] In practice, when an access address in the cache unit 30 is hit, the flash controller 20 controls the number of consecutive misses corresponding to the hit access address to be changed to a preset value, and controls other consecutive misses corresponding to other access addresses to be incremented by one.

[0079] It should be noted that the specific numerical value of the preset value can be set according to the actual application scenario and is not limited here.

[0080] In a specific implementation, the value of the preset value is set to zero.

[0081] In a specific implementation, the value of the preset value is set to one.

[0082] In one embodiment, based on the above embodiment, after writing the target address and the target data into the cache unit 30, the flash controller 20 determines whether the number of consecutive misses is greater than a preset first threshold;

[0083] If the judgment is yes, the access address corresponding to the number of consecutive misses and the corresponding access data are deleted.

[0084] In implementation, after the flash controller 20 writes the target address and the target data into the cache unit 30, the flash controller 20 further executes a determination command, where the determination command is used to determine whether the number of consecutive misses is greater than a preset first threshold.

[0085] If it is determined that the number of consecutive misses is greater than a preset first threshold, the access address corresponding to the number of consecutive misses and the access data corresponding thereto are deleted.

[0086] It should be noted that the specific data of the preset first threshold can be set according to the actual application scenario and is not limited here.

[0087] By deleting the access addresses and access data that have not been hit a sufficient number of times in a row, the situation where data occupies the storage space of the cache unit 30 for a long time is effectively avoided.

[0088] In one embodiment, based on the above embodiment, the cache data includes a valid bit, and the valid bit is used to indicate the valid state of the access address and its corresponding access data.

[0089] In an implementation, the cache data includes a valid bit for indicating a valid state of an access address and its corresponding access data.

[0090] In a specific implementation, when the flash controller 20 receives a read command sent by the host 10 , it determines whether the cache unit 30 stores the target address required by the read command according to the read command.

[0091] In practice, if the cache unit 30 stores the target address required by the read command, the target data is determined from the cache unit 30 according to the target address, and whether the target data is valid is determined according to the valid bit of the target data.

[0092] In implementation, if the cache unit 30 stores the target address required by the read command and the target data is valid, the flash controller 20 sends the target data in the cache unit 30 to the host 10 .

[0093] In practice, if the cache unit 30 stores the target address required for the read command and the target data is invalid, the flash controller 20 determines the target data from the flash memory 40 according to the target address and sends it to the host 10, and writes the target address and target data into the cache unit 30. Preferably, the invalid data is deleted.

[0094] In practice, if the cache unit 30 does not have the target address required by the read command, the flash controller 20 determines the target data from the flash memory 40 according to the target address and sends it to the host 10 , and writes the target address and the target data into the cache unit 30 .

[0095] In a specific implementation, when the valid bit is 0, it indicates that the target data corresponding to the valid bit is in an invalid state. When the valid bit is 1, it indicates that the target data corresponding to the valid bit is in a valid state.

[0096] In a specific implementation, the storage system includes a flash controller 20 and a flash memory 40, the flash memory 40 is a NOR flash, and a cache unit 30 is set between the flash controller 20 and the NOR flash. Each row in the cache unit 30 stores an access address and its corresponding data, such as Figure 2 As shown, the data stored in each row includes: access address, access data, access times, consecutive miss times and valid bits.

[0097] In practice, when the flash controller 20 receives a read command issued by the host 10 , the target address included in the read command and each access address stored in the cache unit 30 are matched in sequence.

[0098] In practice, if the match is successful, it means that the target data corresponding to the target address is stored in the cache unit 30 , and the flash controller 20 further determines the valid bits of the target data. If the target data is valid, the target data is sent to the host 10 .

[0099] In practice, if the match succeeds and the target data is invalid, or the match fails, the flash controller 20 obtains the target data corresponding to the target address from the NOR flash and sends it to the host 10, and determines whether the remaining storage space of the cache unit 30 can store the target address and the target data.

[0100] During implementation, if the remaining storage space of the cache unit 30 can store the target address and target data, the flash controller 20 writes the target address and target data into the cache unit 30; if the remaining storage space of the cache unit 30 cannot store the target address and target data, the flash controller 20 replaces the target address and target data with the access address with the least number of accesses among the most frequently accessed access addresses and its corresponding access data.

[0101] In practice, after the flash determines in the cache unit 30 that the target data is to be sent to the host 10, the access count corresponding to the target data is increased by one, the consecutive miss count corresponding to the target data is reset to zero, and the consecutive miss count corresponding to other access addresses is increased by one.

[0102] In practice, after writing the target address and target data into the cache unit 30, the flash sets the number of accesses corresponding to the target data to one, sets the number of consecutive misses corresponding to the target data to zero, and increases the number of consecutive misses corresponding to other access addresses by one.

[0103] In implementation, when the number of consecutive misses is greater than a preset first threshold, the corresponding access address and access data are deleted.

[0104] It should be noted that the specific value of the preset first threshold can be set according to the actual application scenario and is not limited here.

[0105] NOR flash is a byte-based storage structure, that is, data is stored in a single byte or small block, rather than in an entire page like a page-based storage structure. Flash memory 40 can read a word at a time, without reading and writing the entire page. In other words, each data stored in flash memory 40 only needs to occupy a word, that is, a few bytes of storage space.

[0106] Therefore, the additional cache unit 30 only needs less than 1kb of storage space to meet the cache requirements, with low hardware overhead, which is conducive to cost saving. Preferably, configuring a storage space of several tens of bytes for the cache unit 30 can meet the requirements.

[0107] The cache unit 30 provided in the present application not only stores the access address and the access data, but also stores the number of accesses and the number of consecutive misses corresponding to the access data, and deletes the cache data according to the number of accesses and the number of consecutive misses, thereby realizing that the access address with the most accesses within a preset time period and its corresponding access data are saved in the cache unit 30, rather than only saving the most recently accessed data according to the access time.

[0108] According to another aspect of the present invention, the present application also provides a method for reducing read interference, which is applied to a storage system, wherein the storage system includes a flash controller and a flash memory, and a cache unit is arranged between the flash controller and the flash memory, and the cache unit is used to store cache data, and the cache data includes several most frequently accessed access addresses and their corresponding access data within a preset time period.

[0109] like Figure 3 As shown, the method includes:

[0110] S100, controlling the flash controller to receive a read command sent by the host, and determining whether a target address required by the read command is stored in the cache unit according to the read command;

[0111] S200, if the judgment is yes, determine the target data from the cache unit according to the target address and send it to the host;

[0112] S300: If the judgment is no, determine the target data from the flash memory according to the target address and send it to the host, and write the target address and the target data into the cache unit.

[0113] In the implementation, the storage system includes a flash controller and a flash memory, a cache unit is arranged between the flash controller and the flash memory, and the cache unit is located closer to the flash controller than the flash memory. The cache unit stores a number of most frequently accessed addresses and their corresponding access data within a preset time period.

[0114] Preferably, the flash memory is NOR flash.

[0115] During implementation, the most frequently visited access address is determined based on the number of accesses and the most recent access time.

[0116] It should be noted that the start and end time of the preset time period can be set according to the actual application scenario, and no limitation is made here. Preferably, the preset time period is a recent time period, for example, the last hour.

[0117] In implementation, the flash controller is used to receive a read command from the host, and determine target data from the cache unit or the flash memory to send to the host.

[0118] In implementation, when the host needs to obtain data, the host sends a read instruction including a target address to the flash controller. When the flash controller receives the read command issued by the host, it preferentially searches for the target data from the cache unit. Specifically, the flash controller matches the target address in the read command with the access address in the cache unit in sequence. If the match is successful, it is determined that the cache unit stores the target address required by the read command, and the flash controller determines the target data corresponding to the target address and sends it to the host.

[0119] In the implementation, the flash controller matches the access address in the cache unit in sequence according to the target address in the read command. If the match fails, the flash controller searches for the target data from the flash memory according to the target address. Specifically, the flash controller determines the corresponding target data from the flash memory according to the target address in the read command, and sends the target data to the host. At the same time, the flash controller writes the target address and target data into the cache unit.

[0120] By setting a cache unit between the flash controller and the flash memory, the access addresses and access data that are frequently accessed within a preset time period are stored in the cache unit. When the flash controller receives a read command, it can read data from the cache unit first, reducing the phenomenon of frequent reading of the same address in the flash memory and avoiding the read interference problem caused by frequent reading of a certain address.

[0121] The additional cache unit only needs less than 1kb of storage space to meet the cache requirements, with low hardware overhead, which is conducive to cost saving.

[0122] In one embodiment, based on the above embodiment, before writing the target address and the target data into the cache unit, the method further includes:

[0123] S301, determining whether the size of the storage space occupied by the target address and the target data is smaller than the size of the remaining cache space of the cache unit;

[0124] S302: If the judgment is yes, write the target address and target data into the cache unit;

[0125] S303: If the judgment is no, the target address and target data are replaced by the access address with the least number of accesses among the most frequently accessed access addresses and its corresponding access data.

[0126] During implementation, the flash controller determines the size of the storage space occupied by the target address and target data, and compares it with the size of the remaining cache space of the cache unit. If the size of the storage space occupied by the target address and target data is smaller than the size of the remaining cache space of the cache unit, the flash controller executes a write instruction to write the target address and target data into the cache unit. If the size of the storage space occupied by the target address and target data is greater than or equal to the size of the remaining cache space of the cache unit, the flash controller determines the access address with the least number of accesses and its corresponding access data among all the access addresses stored in the cache unit, deletes the access address with the least number of accesses and its corresponding access data, and then writes the target address and target data into the cache unit.

[0127] When new data needs to be written and the storage space of the cache unit is insufficient, the access address with the least number of accesses and its corresponding access data are replaced, rather than just according to the most recent access time, so that the access address with the most recent accesses within a preset time period and its corresponding access data are stored in the cache unit. In this way, the access address with the most recent accesses and its corresponding access data are always stored in the cache unit, which is conducive to reducing the number of times the flash memory is read.

[0128] In one embodiment, based on the above-mentioned embodiment, when the target address required for the read command is stored in the cache unit, the number of consecutive misses corresponding to the hit access address is controlled to be changed to a preset value, and the other number of consecutive misses corresponding to other access addresses is controlled to be increased by one; wherein the number of consecutive misses indicates the number of times the access address is not hit consecutively within a preset time period.

[0129] In implementation, the cache data includes information indicating the number of times the access address is not hit continuously within a preset time period.

[0130] In implementation, when an access address in the cache unit is hit, the flash controller controls the number of consecutive misses corresponding to the hit access address to be changed to a preset value, and controls other consecutive misses corresponding to other access addresses to be increased by one.

[0131] It should be noted that the specific numerical value of the preset value can be set according to the actual application scenario and is not limited here.

[0132] In a specific implementation, the value of the preset value is set to zero.

[0133] In a specific implementation, the value of the preset value is set to one.

[0134] In one embodiment, based on the above embodiment, after writing the target address and the target data into the cache unit, it is determined whether the number of consecutive misses is greater than a preset first threshold;

[0135] If the judgment is yes, the access address corresponding to the number of consecutive misses and the corresponding access data are deleted.

[0136] In implementation, after the flash controller writes the target address and the target data into the cache unit, the flash controller determines whether the number of consecutive misses is greater than a preset first threshold.

[0137] If it is determined that the number of consecutive misses is greater than a preset first threshold, the access address corresponding to the number of consecutive misses and the access data corresponding thereto are deleted.

[0138] It should be noted that the specific data of the preset first threshold can be set according to the actual application scenario and is not limited here.

[0139] By deleting the access addresses and access data that have not been hit a sufficient number of times in a row, the situation where data occupies the storage space of the cache unit for a long time is effectively avoided.

[0140] It should be noted that the above embodiments can be freely combined as needed. The above are only preferred embodiments of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be regarded as the protection scope of the present invention.

Claims

1. A storage system for reducing read disturbance, characterized in that: The storage system includes a flash controller and a flash memory, wherein a cache unit is provided between the flash controller and the flash memory, and the cache unit is used to store cache data, wherein the cache data includes a plurality of most frequently accessed access addresses and their corresponding access data within a preset time period; When receiving a read command sent by the host, the flash controller determines whether the cache unit stores a target address required by the read command according to the read command; If the judgment is yes, determine the target data from the cache unit according to the target address and send it to the host; If the judgment is no, determining the target data from the flash memory according to the target address and sending it to the host, and writing the target address and the target data into the cache unit; Wherein, the cache data includes the access count, and the access count is used to indicate the number of times the access address is hit within the preset time period; When the access address in the cache unit is hit, the flash controller controls the access count corresponding to the hit access address to increase by one; The cache data includes the number of consecutive misses, where the number of consecutive misses is used to indicate the number of consecutive misses of the access address within the preset time period; When the access address in the cache unit is hit, the flash controller controls the number of consecutive misses corresponding to the hit access address to be changed to a preset value, and controls other consecutive misses corresponding to other access addresses to be increased by one.

2. A storage system for reducing read disturbance according to claim 1, characterized in that: Before writing the target address and the target data into the cache unit, the flash controller determines whether the size of the storage space occupied by the target address and the target data is smaller than the size of the remaining cache space of the cache unit; If the judgment is yes, writing the target address and the target data into the cache unit; If the judgment is no, the target address and the target data are used to replace the access address with the least number of accesses among the most frequently accessed access addresses and the access data corresponding thereto.

3. The storage system for reducing read disturbance according to claim 1, characterized in that: The flash controller determines whether the number of consecutive misses is greater than a preset first threshold after writing the target address and the target data into the cache unit; If the judgment is yes, the access address corresponding to the number of consecutive misses and the corresponding access data are deleted.

4. The storage system for reducing read disturbance according to claim 1, characterized in that: The cache data includes a valid bit, and the valid bit is used to indicate a valid state of the access address and the corresponding access data.

5. A method for reducing read disturbance, characterized in that: Applied to a storage system, the storage system includes a flash controller and a flash memory, a cache unit is provided between the flash controller and the flash memory, the cache unit is used to store cache data, the cache data includes a plurality of most frequently accessed access addresses and their corresponding access data within a preset time period; The method comprises: Controlling the flash controller to receive a read command issued by a host, and determining whether the cache unit stores a target address required by the read command according to the read command; If the judgment is yes, determine the target data from the cache unit according to the target address and send it to the host; If the judgment is no, determining the target data from the flash memory according to the target address and sending it to the host, and writing the target address and the target data into the cache unit; When the target address required by the read command is stored in the cache unit, the number of accesses corresponding to the access address that is hit is controlled to be increased by one; wherein the number of accesses is used to indicate the number of accesses that the access address is hit within the preset time period; the number of consecutive misses corresponding to the access address that is hit is controlled to be changed to a preset value, and the other number of consecutive misses corresponding to the other access addresses are controlled to be increased by one; wherein the number of consecutive misses indicates the number of consecutive times that the access address is not hit within the preset time period.

6. The method for reducing read disturbance according to claim 5, characterized in that: Before writing the target address and the target data into the cache unit, the method further includes: Determining whether the size of the storage space occupied by the target address and the target data is smaller than the size of the remaining cache space of the cache unit; If the judgment is yes, writing the target address and the target data into the cache unit; If the judgment is no, the target address and the target data are used to replace the access address with the least number of accesses among the most frequently accessed access addresses and the access data corresponding thereto.

7. The method for reducing read disturbance according to claim 5, characterized in that: After writing the target address and the target data into the cache unit, the method further includes: Determining whether the number of consecutive misses is greater than a preset first threshold; If the judgment is yes, the access address corresponding to the number of consecutive misses and the corresponding access data are deleted.

Citation Information

Patent Citations

  • Method, device and equipment for read interference processing and readable storage medium

    CN109976671A

  • Sequence flow detection method and storage device

    CN117032595A