A data separate placement method for NAND flash memory

CN116450036BActive Publication Date: 2026-08-28CHONGQING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310291568.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-23
Publication Date
2026-08-28
Estimated Expiration
2043-03-23

AI Technical Summary

Technical Problem

然而随着NAND闪存工艺不断改进,单元密度不断提高,以及3D NAND闪存的广泛应用,读干扰问题已成为高密度NAND闪存的主要可靠性问题

Benefits of technology

[0028]本发明的有益效果在于:通过负载数据的读写访问特征的识别,利用这种数据访问特征对已有的数据管理方案进行优化,对各类特征的数据进行合理放置,优化闪存内部读干扰差异问题以及垃圾回收效率,从而提高闪存的读写性能。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116450036B_ABST
    Figure CN116450036B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of flash memory performance, and relates to a data separation and placement method for a NAND flash memory, which comprises the following steps: according to the read-only and write-only characteristics and the hot and cold characteristics of load data, the data is divided into hot read data, cold read data, hot write data and cold write data; the flash memory logical space is divided into four regions, namely a hot write region, a hot read region, a mixed region and a free region; the hot read data is stored in the hot read region, the hot write data is stored in the hot write region, the mixed region is used for storing the cold read data and the cold write data, and the free region is used for allocating a storage region to the data according to the read-only and write-only characteristics and the hot and cold characteristics of the data; the existing data management scheme is optimized by using data access characteristics, the data of various characteristics is reasonably placed, the read interference difference problem in the flash memory is optimized, and the garbage collection efficiency is improved, so that the read and write performance of the flash memory is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of flash memory performance technology and relates to a data separation and placement method for NAND flash memory. Background Technology

[0002] Due to limitations in process scaling technology, 2D planar flash memory can hardly increase its capacity further. To further improve storage capacity, NAND flash-based SSDs have evolved from 2D to 3D, offering higher storage density, better performance, and greater durability. Compared to traditional planar SSDs, which have a planar flash memory block structure, 3D stacked SSDs increase storage capacity per unit area by stacking flash memory chips in a three-dimensional manner. Ultimately, 3D SSDs can provide higher storage capacity within the same area.

[0003] With the rapid development of NAND flash memory technology, solid-state drives (SSDs) are increasingly being used in daily life due to their excellent storage performance and superior read / write speeds. However, with continuous improvements in NAND flash memory manufacturing processes, increasing cell density, and the widespread application of 3D NAND flash memory, read interference has become a major reliability issue for high-density NAND flash memory. The reduced reliability of flash memory due to smaller manufacturing processes and multi-layer storage technologies makes read interference a more prominent factor affecting flash memory reliability. At the same time, because NAND flash memory has excellent read performance (typically with read latency of tens of microseconds), it is increasingly used in read-intensive applications. In these scenarios, SSDs handle a large number of intensive read requests, further making read interference a major cause of errors in NAND flash memory. Summary of the Invention

[0004] To optimize the problem of read interference differences within flash memory and improve garbage collection efficiency, this invention proposes a data separation and placement method for NAND flash memory, which specifically includes the following steps:

[0005] S1. Based on the read-only and write-only characteristics and hot / cold characteristics of the load data, the data is divided into hot read data, cold read data, hot write data, and cold write data.

[0006] S2. Divide the flash memory logical space into four regions: hot write region, hot read region, mixed region, and idle region;

[0007] S3. Store hot-read data in the hot-read area and hot-write data in the hot-write area. Use the mixed area to store cold-read data and cold-write data. Use the free area to allocate storage space for data based on its read-only and write-only characteristics and its hot / cold characteristics.

[0008] Furthermore, four data lists based on Least Recently Used (LRU) are used to maintain hot read data, cold read data, hot write data, and cold write data, respectively. Specific steps include:

[0009] Write / read data from the I / O request queue into the buffer, and calculate the time interval between the data's timestamp and the current time when data is evicted from the buffer;

[0010] If the time interval between two data read requests is less than a predetermined threshold, the data is added to the hot read data list; if the time interval between two data read requests is greater than the predetermined threshold, the data is added to the cold read data list.

[0011] If the time interval between two write requests is less than a predetermined threshold, the data is added to the hot write data list; if the time interval between two write requests is greater than the predetermined threshold, the data is added to the cold write data list.

[0012] Furthermore, the predetermined threshold can be dynamically adjusted according to the actual load. The specific settings for the predetermined threshold include:

[0013] Initialize by setting the predefined threshold for read requests to 1 second and the predefined threshold for write requests to 3 seconds;

[0014] The load will be adjusted accordingly in the subsequent process. If it is a read-intensive load, that is, more read data and less write data, the predetermined threshold for write data will be lowered; if it is a write-intensive load, that is, more write data and less read data, the predetermined threshold for read data will be raised.

[0015] Furthermore, the flash memory blocks in the free area are sorted according to the number of erases and stored in a bidirectional queue. The fewer the number of erases, the earlier they are in the bidirectional queue. When allocating flash memory blocks in the free area, the flash memory blocks with fewer erases at the front of the bidirectional queue are given priority to the hot read area and hot write area, while the flash memory blocks with more erases at the back of the bidirectional queue are allocated to the mixed area.

[0016] Furthermore, after dividing the flash memory area into hot write area, hot read area, mixed area and idle area, a currently active flash memory block indicator is set for each area.

[0017] Furthermore, the scheduling strategies for writing data include:

[0018] If the data to be written is hot data, the data will be written to the hot block pointed to by the hot block indicator. If the hot block does not have enough active pages, the free area will dynamically allocate a flash block to the hot block, point the hot block indicator to the newly allocated flash block, and mark it as a hot block.

[0019] If the data being written is hot write data, the data will be written to the hot write block pointed to by the hot write area indicator. If the hot write block does not have enough active pages, the free area will dynamically allocate a flash memory block to the hot write area, point the hot write area indicator to the newly allocated flash memory block, and mark it as a hot read block.

[0020] If the data being written is cold write or cold read, the data will be written to the mixed block pointed to by the mixed area indicator. If the mixed block does not have enough active pages, the free area will dynamically allocate a flash block to the mixed area, point the mixed area indicator to the newly allocated flash block, and mark it as a mixed block.

[0021] Furthermore, the process of dividing the data includes the following steps:

[0022] Load data requests. If a data request is identified as a read request, determine whether the data request has been accessed before. If it has not been accessed, the data request is cold read data and is added to the cold read data list.

[0023] If the data request has been accessed before, it is determined that the time interval between the two most recent accesses of the data request is less than a predetermined threshold. If it is less than the threshold, the data request is considered hot data and is added to the hot data list.

[0024] If the time interval between the two most recent accesses to the data is not less than a predetermined threshold, then the data request is considered cold read data and is added to the cold read data list.

[0025] If a data request is identified as a write request, it is determined whether the data request has been accessed before. If it has not been accessed, the data request is considered cold write data and is added to the cold write data list.

[0026] If the data request has been accessed, it is determined that the time interval between the two most recent accesses of the data request is less than a predetermined threshold. If it is less than the threshold, the data request is considered hot-write data and is added to the hot-write data linked list.

[0027] If the time interval between the two most recent accesses of a data request is not less than a predetermined threshold, then the data request is considered cold write data and is added to the cold write data linked list.

[0028] The beneficial effects of this invention are as follows: by identifying the read and write access characteristics of the load data, the existing data management scheme is optimized using these data access characteristics, data of various characteristics are placed reasonably, the problem of read interference differences inside the flash memory and the efficiency of garbage collection are optimized, thereby improving the read and write performance of the flash memory. Attached Figure Description

[0029] Figure 1 This is a flowchart of the data feature recognition process of the present invention;

[0030] Figure 2 This is a conceptual diagram of the cold and hot partitioning of flash memory according to the present invention;

[0031] Figure 3 This is a diagram illustrating the waste recycling process of the present invention;

[0032] Figure 4 This is a schematic diagram illustrating the working principle of the write scheduling based on data access characteristics of the present invention. Detailed Implementation

[0033] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0034] This invention proposes a data separation and placement method for NAND flash memory, specifically including the following steps:

[0035] S1. Based on the read-only and write-only characteristics and hot / cold characteristics of the load data, the data is divided into hot read data, cold read data, hot write data, and cold write data.

[0036] S2. Divide the flash memory logical space into four regions: hot write region, hot read region, mixed region, and idle region;

[0037] S3. Store hot-read data in the hot-read area and hot-write data in the hot-write area. Use the mixed area to store cold-read data and cold-write data. Use the free area to allocate storage space for data based on its read-only and write-only characteristics and its hot / cold characteristics.

[0038] This embodiment analyzes the characteristics of trace files and discovers frequent access patterns among requested logical addresses. Read requests are also divided into frequent and infrequent accesses. By identifying the read and write access characteristics of the load data, the existing data management scheme is optimized using these data access characteristics. Data with various characteristics is placed reasonably, and the problem of read interference differences within the flash memory and garbage collection efficiency are optimized, thereby improving the read and write performance of the flash memory.

[0039] In this embodiment, a data separation and placement method for NAND flash memory is implemented through the following steps:

[0040] S1: Based on the read-only and write-only characteristics and hot / cold characteristics of the load data, define the read and write access characteristics of the data and divide the data into hot read data, cold read data, hot write data, and cold write data.

[0041] S2: A dynamic flash memory hot and cold partitioning strategy is proposed. This strategy divides the flash memory logical space into four regions: hot write region, hot read region, mixed region, and free region. This strategy can better manage and schedule data with frequent access patterns.

[0042] S3: A write scheduling strategy based on data access characteristics is proposed. This strategy combines data access characteristics with flash memory hot and cold partitioning to schedule data with various characteristics to corresponding logical regions. By separating and managing hot read data, the differences in read interference between data within the flash memory can be reduced. At the same time, aggregating frequently updated hot write data can reduce the number and overhead of garbage collection migration pages. Finally, cold read / write data is centrally placed to minimize the number of accesses and the impact of read interference on blocks with high wear levels.

[0043] In step S1, the read and write access characteristics of the load data include two features. First, the data has a read-only / write-only access mode. Most load data has read-only and write-only characteristics, and only a small portion of the data is read-write data. Second, the data has cold and hot access characteristics. Access to the same logical address often has a fixed frequency. Data accessed in the current cycle is likely to be accessed in the next cycle.

[0044] After dividing the data into four types—hot read data, cold read data, hot write data, and cold write data—four data linked lists based on the least recently used data are created to maintain the hot read data, cold read data, hot write data, and cold write data, respectively. The specific steps include:

[0045] S11: First, write / read the data in the I / O request queue into the buffer. When the data is evicted from the buffer, calculate the time interval between the data's timestamp and the current time.

[0046] S12: If the time interval between two data read requests is less than a predetermined threshold, the data is added to the hot read data list; if the time interval between two data read requests is greater than the predetermined threshold, the data is added to the cold read data list.

[0047] S13: If the time interval between two data write requests is less than a predetermined threshold, the data is added to the hot write data list; if the time interval between two data write requests is greater than a predetermined threshold, the data is added to the cold write data list.

[0048] S14: The predetermined threshold can be dynamically adjusted according to the actual load.

[0049] In this embodiment, the process of adjusting the predetermined threshold includes the following steps:

[0050] Initialize by setting the predefined threshold for read requests to 1 second and the predefined threshold for write requests to 3 seconds;

[0051] The load will be adjusted accordingly in the subsequent process. If it is a read-intensive load, that is, more read data and less write data, the predetermined threshold for write data will be lowered; if it is a write-intensive load, that is, more write data and less read data, the predetermined threshold for read data will be raised.

[0052] Specifically, to determine whether a load is read-intensive, a threshold can be set. If the load exceeds this threshold, the load is considered read-intensive. Alternatively, the current read load can be compared with the read load of the previous time or the average of the read loads of the previous few time periods. For example, if the current read load is greater than the previous read load, an increment can be set to reduce the predetermined threshold for read data at the current time by an increment from the predetermined threshold for read data at the previous time. Similarly, if the current write load is greater than the previous write load, an increment can be set to increase the predetermined threshold for write data at the current time by an increment from the predetermined threshold for read data at the previous time.

[0053] In step S2, a dynamically allocated flash memory hot and cold partitioning strategy divides the flash memory logical space into four regions: a hot write region, a hot read region, a mixed region, and a free region. Each region is set with a currently active flash memory block indicator. The specific steps include:

[0054] S21: This strategy dynamically adjusts the size of the corresponding logical region based on the load type. Initially, there are no flash blocks in the hot write area, hot read area, and mixed area. When data is identified as different data types, different types of flash blocks are generated on demand in the free area, and the data is divided into different logical regions using a marking method. By allocating free blocks on demand, the flash memory can adapt to different load types; for read-intensive loads, a relatively large hot read area is generated; for write-intensive loads, a larger hot write area is generated. This gives this solution good load adaptability.

[0055] S22: This strategy allocates free blocks based on wear awareness. Each flash memory block stores its own erase count. Free blocks are sorted by erase count and stored in a doubly linked queue. Flash blocks with fewer erase counts are called "young blocks" and are placed at the front of the doubly linked queue. During free block allocation, young blocks are prioritized for hot-read areas where read interference resistance is related to wear level, and also for hot-write areas with higher erase frequencies. Flash blocks with more erase counts are called "old blocks" and are placed towards the back of the doubly linked queue. Old blocks are then allocated to mixed areas less prone to read interference and garbage collection. This free block allocation scheme significantly utilizes the characteristics of each area, evenly wears down all flash memory blocks, and reduces read interference, thereby lowering the flash memory error rate.

[0056] The current active flash block indicator for each region points to the flash block to which data will be allocated in that region. For example, when hot write data needs to be written to the hot write area, the current active flash block indicator for the hot write area points to the flash block to which the data to be allocated will be allocated. If the flash block storage space pointed to by the current active flash block indicator is full, a new flash block is allocated from the free area to the corresponding region, and the current active flash block indicator for the corresponding region then points to the newly allocated flash block.

[0057] In step S3, the write scheduling strategy based on data access characteristics includes the following steps:

[0058] S31: If the data to be written is hot data, the data will be written to the hot block pointed to by the hot block indicator. If the hot block has not enough active pages, it means that the hot block is full. At this time, the free area will dynamically allocate a young block with fewer erase cycles to the hot block, point the indicator to the new flash memory block, and mark it as a hot block.

[0059] S32: If the data being written is hot write data, it will be written to the hot write block pointed to by the hot write area indicator. If the hot write block is not active enough, it means that the hot write block is full. At this time, the free area will dynamically allocate a young block with fewer erase cycles to the hot write area, point the indicator to the new flash memory block, and mark it as a hot write block. For frequently updated hot write data, it is separated for centralized garbage collection.

[0060] S33: If the data being written is a cold write or cold read, the data will be written to the mixed block pointed to by the mixed area indicator. If the mixed block does not have enough active pages, it means that the mixed block is full. At this time, the free area will dynamically allocate an older block with a higher erase count to the mixed area, point the indicator to the new flash memory block, and mark it as a mixed block. This centralized placement of cold data minimizes the impact of access frequency and read interference from blocks with high wear levels, while avoiding excessive garbage collection and data migration overhead caused by the dispersion of cold data.

[0061] The write scheduling strategy based on data access characteristics in this embodiment includes:

[0062] Step 1: Separating and managing hot-write data can significantly improve garbage collection efficiency. Since the basic unit of garbage collection is the data block, grouping hot-write data with similar access frequencies into the same block helps these data expire around the same time. During garbage collection, erasing the selected blocks significantly reduces the amount of valid data migration, improving garbage collection efficiency while reducing the number of erases. This reduces flash write amplification and improves flash read / write performance.

[0063] Step 2: Mixing cold read / write data can minimize the number of accesses to high-wear blocks and the impact of read interference, while avoiding excessive garbage collection and data migration overhead caused by cold data dispersion.

[0064] Separating and managing frequently accessed data can reduce the write time difference between data segments while uniformly distributing the read activity across flash memory blocks. Therefore, the advantages of write scheduling strategies based on data access characteristics are as follows:

[0065] First, the clustering of frequently read data reduces the interference of frequently read data on the reading of other types of data;

[0066] Secondly, since the clustered hot data have similar popularity, there are similar reading frequencies among the data, which can balance the differences in reading interference between the data.

[0067] Finally, since hot data is read frequently, grouping it together can trigger read refresh in advance, causing data migration and shortening the write time difference. This further reduces the read interference difference between hot data. Since other non-hot data that is not grouped has a relatively low read frequency, the length of its write time difference has little impact on the read interference difference. Therefore, overall, the read interference difference during data migration is reduced.

[0068] Figure 1 The flowchart for data feature recognition of this invention is as follows, starting from step 101:

[0069] In step 102, the read / write request is loaded, and then the process proceeds to step 103.

[0070] In step 103, determine whether the request is a read request. If it is, proceed to step 104; otherwise, proceed to step 109.

[0071] In step 104, if the request is identified as a read request, it is determined whether the data has been accessed before. If so, proceed to step 106; otherwise, proceed to step 105.

[0072] In step 105, the data is identified as cold read data and added to the cold read data list, and then step 114 is executed to end the process.

[0073] In step 106, it is determined whether the time interval between the two most recent accesses to the data is less than a predetermined threshold. If so, proceed to step 107; otherwise, proceed to step 108.

[0074] In step 107, the data is identified as hot data and added to the hot data list, and then step 114 is executed to end the process.

[0075] In step 108, the data is identified as cold read data and added to the cold read data list, and then step 114 is executed to end the process.

[0076] In step 109, if the request is identified as a write request, it is determined whether the data has been accessed before. If so, proceed to step 111; otherwise, proceed to step 110.

[0077] In step 110, the data is identified as cold write data and added to the cold write data linked list, and then step 114 is executed to end the process.

[0078] In step 111, it is determined whether the time interval between the two most recent accesses to the data is less than a predetermined threshold. If it is, proceed to step 112; otherwise, proceed to step 112.

[0079] In step 112, the data is identified as hot write data and added to the hot write data linked list, and then step 114 is executed to end the process.

[0080] In step 113, the data is identified as cold write data and added to the cold write data linked list, and then step 114 is executed to end the process.

[0081] Figure 2 This is a conceptual diagram of the flash memory hot and cold partitioning of the present invention. The flash memory hot and cold partitioning strategy divides the flash memory logical space into four regions: hot write region, hot read region, mixed region, and idle region, as shown below. Figure 2 As shown in (a), the hot write area is used to store hot write data, the hot read area is used to store hot read data, the mixed area is used to store cold write data and cold read data, and the free area is used to store unallocated, free flash memory blocks, such as... Figure 2 (b) In the free area, the free flash memory blocks are sorted according to their erase / write count to form a bidirectional queue. The fewer the erase / write counts, the higher the position in the bidirectional queue. When allocating data blocks, the flash memory blocks at the front of the bidirectional queue are prioritized for allocation to the hot read and hot write areas, while the flash memory blocks at the back of the bidirectional queue are allocated to the mixed area. This allocation ensures that the difference in erase / write counts between flash memory blocks is not too large. Each area has a currently active flash memory block indicator. The allocation of each flash memory block in the four areas includes:

[0082] Step 1: This strategy dynamically adjusts the size of the corresponding logical region based on the load type. Initially, there are no flash blocks in the hot write area, hot read area, and mixed area. When data is identified as different data types, different types of flash blocks are generated on demand in the free area, and the data is divided into different logical regions using a marking method. By allocating free blocks on demand, the flash memory can adapt to different load types. For read-intensive loads, a relatively large hot read area is generated; for write-intensive loads, a larger hot write area is generated. This gives this solution good load adaptability.

[0083] Step 2: This strategy allocates free blocks based on wear awareness. Each flash memory block stores its own erase count. Free blocks are sorted by erase count and stored in a doubly linked queue. Flash blocks with fewer erase counts are called "young blocks" and are placed at the front of the doubly linked queue. During free block allocation, young blocks are prioritized for hot-read areas where read interference resistance is related to wear level, and also for hot-write areas with higher erase frequencies. Flash blocks with more erase counts are called "old blocks" and are placed towards the back of the doubly linked queue. Old blocks are then allocated to mixed areas less prone to read interference and garbage collection. This free block allocation scheme effectively utilizes the characteristics of each area, evenly wears down all flash memory blocks, and reduces read interference, thereby lowering the flash memory error rate.

[0084] Figure 3 This is a diagram illustrating the waste recycling operation process of the present invention, which specifically includes the following steps:

[0085] Step 1: The garbage collection operation in this solution is concentrated in the hot write area. When the number of free flash memory blocks in the free area is insufficient, the garbage collection operation will be triggered.

[0086] Step 2: The garbage collection controller will prioritize garbage collection in the hot-write area, and use a greedy strategy to select the hot-write block with the most invalid pages for garbage collection. The reason for choosing the hot-write area is that the data stored in this area is all hot-write data, which undergoes frequent update operations, thus generating a large number of invalid pages. Performing garbage collection operations in the hot-write area can maximize garbage collection efficiency.

[0087] Step 3: During the garbage collection process, the migrated valid pages are not updated. Therefore, in this embodiment, these valid data are considered to have a cold attribute. To avoid the overhead of distinguishing between hot and cold data, this solution marks these migrated data as cold write data and migrates them to the mixed area.

[0088] Step 4: The flash memory blocks that are selected as recycling blocks and store hot write data will be erased, the erase count of the flash memory blocks will be updated, and they will be added to the bidirectional wear queue in the free area. These flash memory blocks with erased data will be sorted according to the erase count.

[0089] Figure 4 The following is a schematic diagram illustrating the write scheduling principle based on data access characteristics of this invention. The specific steps are as follows:

[0090] Step 1: If the data to be written is hot data, the data will be written to the hot block pointed to by the hot block indicator. If there are not enough active pages in the hot block, it means that the hot block is full. At this time, the free area will dynamically allocate a young block with fewer erase cycles to the hot block, point the indicator to the new flash memory block, and mark it as a hot block.

[0091] Step 2: If the data to be written is hot write data, the data will be written to the hot write block pointed to by the hot write area indicator. If the hot write block does not have enough active pages, it means that the hot write block is full. At this time, the free area will dynamically allocate a young block with fewer erase cycles to the hot write area, point the indicator to the new flash memory block, and mark it as a hot write block.

[0092] Step 3: If the data to be written is cold write or cold read, the data will be written to the mixed block pointed to by the mixed area indicator. If the mixed block does not have enough active pages, it means that the mixed block is full. At this time, the free area will dynamically allocate an older block with a large number of erases to the mixed area, point the indicator to the new flash memory block, and mark it as a mixed block.

[0093] like Figure 4 In this context, an I / O request queue is represented as: {R a W b W b W b W c R d R d W e R d R f If R is obtained through data read / write access feature identification, ...} a For cold read data, W b For hot writing of data, W c For cold writing of data, R d For hot data, W e For cold writing of data, R f For cold read data, when allocating data, it is assigned to the corresponding region based on the read and write access characteristics of the data.

[0094] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for separating and placing data in NAND flash memory, characterized in that, Specifically, the following steps are included: S1. Based on the read-only and write-only characteristics and hot / cold characteristics of the load data, the data is divided into hot read data, cold read data, hot write data, and cold write data. Four data lists, each based on the least recently used data, are used to maintain hot read data, cold read data, hot write data, and cold write data, respectively. The specific steps include: Write / read data from the I / O request queue into the buffer, and calculate the time interval between the data's timestamp and the current time when data is evicted from the buffer; If the time interval between two data read requests is less than a predetermined threshold, the data is added to the hot read data list; if the time interval between two data read requests is greater than the predetermined threshold, the data is added to the cold read data list. If the time interval between two write requests is less than a predetermined threshold, the data is added to the hot write data list; if the time interval between two write requests is greater than the predetermined threshold, the data is added to the cold write data list. The preset threshold can be dynamically adjusted according to the actual load. The specific settings for the preset threshold include: Initialize by setting the predefined threshold for read requests to 1 second and the predefined threshold for write requests to 3 seconds; The load will be adjusted accordingly in the subsequent process. If it is a read-intensive load, that is, more read data and less write data, the predetermined threshold for write data will be lowered; if it is a write-intensive load, that is, more write data and less read data, the predetermined threshold for read data will be raised. S2. Divide the flash memory logical space into four regions: hot write region, hot read region, mixed region, and idle region; after dividing the flash memory region into hot write region, hot read region, mixed region, and idle region, set a currently active flash memory block indicator for each region; S3. Hot-read data is stored in the hot-read area, hot-write data is stored in the hot-write area, and a mixed area is used to store cold-read and cold-write data. Different types of flash memory blocks are generated on demand in the free area, and data is divided into different logical areas through a marking method. The scheduling strategy for write data includes: If the data to be written is hot data, the data will be written to the hot block pointed to by the hot block indicator. If the hot block does not have enough active pages, the free area will dynamically allocate a flash block to the hot block, point the hot block indicator to the newly allocated flash block, and mark it as a hot block. If the data being written is hot write data, the data will be written to the hot write block pointed to by the hot write area indicator. If the hot write block does not have enough active pages, the free area will dynamically allocate a flash memory block to the hot write area, point the hot write area indicator to the newly allocated flash memory block, and mark it as a hot read block. If the data being written is cold write or cold read, the data will be written to the mixed block pointed to by the mixed area indicator. If the mixed block does not have enough active pages, the free area will dynamically allocate a flash block to the mixed area, point the mixed area indicator to the newly allocated flash block, and mark it as a mixed block.

2. The data separation and placement method for NAND flash memory according to claim 1, characterized in that, Flash blocks in the free area are sorted by the number of erases and stored in a bidirectional queue. The fewer the number of erases, the earlier they are in the bidirectional queue. When allocating flash blocks in the free area, flash blocks with fewer erases at the front of the bidirectional queue are given priority to the hot read area and hot write area, while flash blocks with more erases at the back of the bidirectional queue are allocated to the mixed area.

3. The data separation and placement method for NAND flash memory according to claim 1, characterized in that, The process of partitioning data includes the following steps: Load data requests. If a data request is identified as a read request, determine whether the data request has been accessed before. If it has not been accessed, the data request is cold read data and is added to the cold read data list. If the data request has been accessed before, it is determined that the time interval between the two most recent accesses of the data request is less than a predetermined threshold. If it is less than the threshold, the data request is considered hot data and is added to the hot data list. If the time interval between the two most recent accesses to the data is not less than a predetermined threshold, then the data request is considered cold read data and is added to the cold read data list. If a data request is identified as a write request, it is determined whether the data request has been accessed before. If it has not been accessed, the data request is considered cold write data and is added to the cold write data list. If the data request has been accessed, it is determined that the time interval between the two most recent accesses of the data request is less than a predetermined threshold. If it is less than the threshold, the data request is considered hot-write data and is added to the hot-write data linked list. If the time interval between the two most recent accesses of a data request is not less than a predetermined threshold, then the data request is considered cold write data and is added to the cold write data linked list.

Citation Information

Patent Citations

  • System and method for cold and hot data separation of flash memory

    CN106201906A

  • Memory system including a nonvolatile memory and control method

    US20220066640A1