Virtual block management method and storage device applying same
By dividing super blocks into virtual blocks and adjusting the amount of IO data, the problem of traditional GC operation time extension and delay is solved, achieving more efficient garbage collection and longer chip life.
Patent Information
- Application Number
- CN202411268017.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2024-10-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional garbage collection (GC) algorithms in solid-state drives process multiple super blocks to improve efficiency and parallelism, resulting in extended GC operation times, affecting latency and shortening chip life.
By dividing the super block into multiple virtual blocks in equal proportions, and only processing one or more virtual blocks during garbage collection, the amount of IO data is adjusted to match the specified delay range, such as 15μs~45μs, to reduce the delay impact of GC.
It effectively reduces the delay in garbage collection, reduces chip wear, and extends the service life of the chip.
Smart Images

Figure CN118778908A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of memory, in particular to the field of flash memory, and in particular to a virtual block management method and a storage device applying the method. Background Art
[0002] Flash memory is a non-volatile memory technology for storing data, commonly used in various electronic devices such as solid-state drives (SSDs), smartphones, tablets, cameras, etc. It consists of many storage cells, each of which can store one or more bits of data. The characteristics of flash memory technology include: non-volatility, the data stored in flash memory can still be retained after power failure, and does not require continuous power supply; high speed, flash memory usually has a faster read speed, making it suitable for application scenarios that require fast access to data; low energy consumption, compared with traditional mechanical hard drives, flash memory usually has lower energy consumption, which makes it more popular in portable devices; durability, flash memory usually has high durability and can withstand multiple read and write operations without failure; small size, flash memory usually has small size and light weight, suitable for application in small electronic devices; and vibration resistance, since there are no moving parts in flash memory, it has good vibration resistance and is suitable for use in mobile devices and harsh environments.
[0003] According to the different structures and working principles of flash memory, flash memory technology includes many types, such as NAND Flash and NOR Flash. NAND Flash is usually used for large-capacity storage, such as solid-state drives and flash memory cards, while NOR Flash is often used for code storage and firmware storage in embedded systems. In general, flash memory technology has been widely used in various electronic devices. It provides advantages such as high speed, non-volatility, low energy consumption and durability, making it an important part of modern electronic products.
[0004] NAND Flash is a non-volatile memory technology widely used in electronic devices such as solid-state drives (SSDs), smartphones, tablets, cameras, etc. It is a variant of flash memory storage technology, mainly composed of NAND gates, used to store data. The data stored in NAND Flash can still be retained after power failure, so it does not require continuous power supply. This makes it suitable for application scenarios that require long-term data storage. NAND Flash storage density is generally higher than traditional NOR Flash storage density, so more data can be stored in the same chip size. NAND Flash has a fast read speed and a fast sequential write speed, which makes it suitable for application scenarios that require high-speed data transmission. NAND Flash can be divided into different types such as single-layer cell (SLC), multi-layer cell (MLC), triple-layer cell (TLC) and quad-layer cell (QLC) according to the construction method and storage method of the storage cell, which differ in storage density, write speed, write life, etc.
[0005] However, NAND Flash also has some disadvantages. For example, the erase operation of NAND Flash is performed in blocks, that is, the data of the entire block needs to be erased at one time. This is different from the byte erase operation of NOR Flash, so it may result in a large overhead for the erase operation. In addition, NAND Flash storage cells gradually lose stability after a write operation, so they have a limited write life. In order to extend the service life of NAND Flash, various technologies are usually used, such as garbage collection and balanced write.
[0006] Block is a physical NAND block, and Super Block is composed of the same blocks of different NAND chips in a chip. Super Block is an important logical management unit in the solid-state drive (SSD), which is used to organize and manage data blocks in flash memory. The current garbage collection method is usually performed in units of a super block. Summary of the invention
[0007] Technical Problems to be Solved by the Invention Garbage Collection (GC) refers to the automatic recovery of unused memory space for reuse during program execution.
[0008] In traditional garbage collection (GC) algorithms, especially in solid-state drives (SSDs), super blocks are often used to manage data in flash memory and perform garbage collection operations. Super blocks are logical management units in flash memory. Each super block contains multiple physical blocks and is used to organize and manage data in flash memory. Traditional GC mainly includes the following stages: Mark phase: In the Mark phase, the SSD scans the data blocks in the flash memory and marks which data blocks are active (i.e. contain valid data) and which are junk (i.e. do not contain valid data); Sweep: During the Sweep phase, the SSD will erase data blocks marked as garbage and move or reorganize the valid data in them to release continuous free space. Erase phase: During the erase phase, the SSD performs a physical erase operation to erase data blocks marked as garbage and prepare free blocks for writing new data.
[0009] When managing superblocks according to traditional GC, a GC operation may involve refreshing multiple superblocks. In traditional GC algorithms, superblocks are used as logical units to manage data in flash memory and perform garbage collection operations. When GC needs to be performed, the firmware usually selects multiple superblocks for processing instead of just processing a single superblock. This is because the erasing and defragmentation operations of a single superblock may be time-consuming, and processing multiple superblocks at the same time can improve the efficiency and performance of GC operations.
[0010] The benefits of refreshing multiple super blocks in one GC operation include: improving efficiency. Processing multiple super blocks can reduce the frequency of GC operations, thereby reducing the overhead of flash memory management; increasing parallelism. Processing multiple super blocks can improve the parallelism of GC operations and make full use of the performance of the flash memory controller and hardware; reducing write amplification. Processing multiple super blocks at the same time can reduce the write amplification effect, making the impact of GC operations on the flash memory smaller and extending the life of the flash memory.
[0011] Through superblock-based management, traditional GC can perform garbage collection operations more efficiently and improve flash memory space utilization and write performance. However, traditional GC may also face some challenges.
[0012] With the development of NAND Flash, more and more planes and die are stacked. Specifically, in NAND Flash, each plane is actually a set of parallel storage units and logic control units, which can operate independently. Each plane contains a set of independent storage units and corresponding control logic, and can independently perform read, write and erase operations. The die is usually used to describe a single independent piece or unit of a NAND Flash storage chip. Each NAND Flash chip is usually composed of multiple die, and each die can contain multiple storage layers, control logic and I / O interfaces. As NAND Blocks become larger and larger, more and more planes and die are stacked, and the amount of data that needs to be moved is also increasing. Therefore, the time required for a GC will also become longer. In this case, the time slices (usually the minimum time unit used to schedule and execute tasks in the operating system) that affect latency will increase, which is not conducive to upper-level applications.
[0013] In addition, since the amount of data that needs to be moved each time is very large, a large amount of cold data is involved in GC, which further aggravates chip wear and reduces chip life.
[0014] The object of the present invention is to provide a virtual block management method and a storage device using the method, which can reduce the impact of GC on delay and help increase the life of the chip.
[0015] Technical solutions adopted to solve technical problems According to an embodiment of the present invention, there is provided a virtual block management method for managing a flash memory including a super block. The virtual block management method is characterized in that the super block is divided into a plurality of virtual blocks in equal proportions, and garbage collection processing is performed based on the virtual blocks obtained by the division, and the size of each virtual block is configured to match the amount of input and output data that generates a specified delay when performing a garbage collection process.
[0016] Furthermore, the flash memory is a NAND flash memory, and the super block is composed of multiple physical blocks in the NAND flash memory.
[0017] Furthermore, the prescribed delay is 15 μs to 45 μs.
[0018] Furthermore, the prescribed delay is 30 μs.
[0019] Furthermore, the super block is divided into three virtual blocks in equal proportion.
[0020] Furthermore, the super block is divided into four virtual blocks in equal proportion.
[0021] Furthermore, when performing a garbage collection process, multiple virtual blocks are refreshed simultaneously.
[0022] Furthermore, the partitioning of the super block is performed by software.
[0023] The present invention provides a storage device, comprising at least: a main controller; a flash memory area, which is implemented based on NAND flash memory and includes multiple storage modules, and the storage modules include multiple super blocks; and a cache area, which includes a garbage collection unit, and the garbage collection unit applies any of the virtual block management methods described above to the super block.
[0024] Effects of the Invention According to the virtual block management method and the storage device using the method involved in the present invention, the influence of GC on delay can be reduced and the life of the chip can be increased. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The present disclosure may be better understood by describing exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, in which: Figure 1 is a schematic diagram showing the relationship between NAND blocks, super blocks, and virtual blocks.
[0026] Figure 2 is a schematic diagram showing a specific example of a super block of a NAND flash memory.
[0027] Figure 3 1 is a schematic diagram showing the start of data writing to the NAND flash memory.
[0028] Figure 4 Schematic diagram showing a state where a NAND flash memory is filled with random writing.
[0029] Figure 5 is a schematic diagram showing a GC process performed in a NAND flash memory.
[0030] Figure 6 is a schematic diagram showing a GC process performed in a NAND flash memory.
[0031] Figure 7 It is a schematic diagram showing an example of a virtual block management method according to an embodiment of the present invention.
[0032] Figure 8 It is a schematic diagram showing another example of the virtual block management method involved in the embodiment of the present invention. DETAILED DESCRIPTION
[0033] The specific implementation methods of the present disclosure will be described below. It should be noted that in the specific description of these implementation methods, in order to provide a concise description, it is impossible for this specification to provide a detailed description of all the features of the actual implementation methods. It should be understood that in the actual implementation of any implementation method, just as in the process of any engineering project or design project, in order to achieve the specific goals of the developer and to meet system-related or business-related restrictions, various specific decisions are often made, and this will also change from one implementation method to another. In addition, it can also be understood that although the efforts made in this development process may be complex and lengthy, for ordinary technicians in the field related to the content disclosed by the present disclosure, some changes in design, manufacturing or production based on the technical content disclosed in the present disclosure are just conventional technical means, and should not be understood as insufficient content of the present disclosure.
[0034] In the present disclosure, unless otherwise specified, all the embodiments and preferred embodiments mentioned herein can be combined with each other to form a new technical solution. In the present disclosure, unless otherwise specified, all the technical features and preferred features mentioned herein can be combined with each other to form a new technical solution. In the description of the embodiments of the present disclosure, the term "and / or" is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the previously associated objects are in an "or" relationship.
[0035] Hereinafter, a virtual block management method according to an embodiment of the present invention will be described in detail with reference to the drawings.
[0036] In this embodiment, a garbage collection (GC) strategy to which the virtual block management method is applied is described in detail by taking NAND Flash as an example.
[0037] Figure 1 is a schematic diagram showing the relationship between NAND blocks, super blocks, and virtual blocks.
[0038] like Figure 1 As shown in the figure, the part indicated by the black solid line is the NAND block, which is a physical NAND block. The blocks in the NAND flash memory can be divided according to the space requirements. In this example, a block contains 4 small blocks, but it is not limited to this. There are various situations depending on the type of flash memory.
[0039] A super block is composed of the same blocks of different NAND chips in a chip, as shown by the black dotted line. In this example, the super block contains 2 physical blocks, that is, 8 small blocks. Superblock is an important logical management unit in a solid-state drive (SSD) that is used to organize and manage data blocks in flash memory. The current garbage collection method is usually performed in units of a super block.
[0040] Virtual blocks such as Figure 1 As shown by the black dot-dashed line in , it is obtained by dividing the super block. In the present invention, virtual blocks are obtained by dividing the super block, and garbage collection (Garbage Collection) is performed with one virtual block as a unit.
[0041] A virtual block is a logical unit used to manage and organize flash memory in a solid-state drive (SSD). Flash memory is divided into multiple virtual blocks, each of which contains multiple physical blocks. The introduction of virtual blocks is mainly to achieve the following functions: bad block management, virtual blocks can span multiple physical blocks, so when bad blocks appear, blocks can be replaced and managed more flexibly without affecting the entire physical block; garbage collection, garbage collection is one of the important operations in solid-state drives, and virtual blocks can help optimize garbage collection operations so that it can be performed more efficiently without affecting other blocks; write amplification control, virtual blocks can better manage write operations and reduce the degree of write amplification. By reasonably allocating data blocks, the number of writes to the flash memory can be reduced, extending the service life of the solid-state drive; and block-level operations, virtual blocks allow flash memory management to be performed at the block level instead of a single physical block, which can simplify management operations and improve system efficiency.
[0042] Figure 2 is a schematic diagram showing a specific example of a super block of a NAND flash memory.
[0043] Here, if Figure 2 As shown, we assume that the NAND flash memory has 4 channels (CH0~CH3) at the bottom layer, connected to 4 die blocks, and the die blocks on each channel can operate in parallel. Assuming that each die block has 5 flash blocks, there are 20 flash blocks in total.
[0044] Blocks in NAND flash memory can be divided according to requirements to more efficiently manage storage space and improve performance. As one of the division methods, blocks in NAND flash memory can be divided according to space requirements. For example, NAND flash memory can be divided into multiple storage areas, each storage area consists of a certain number of blocks for storing data of different types or sizes. Space division can help allocate storage space to different applications or users for more efficient resource management and isolation.
[0045] Therefore, here, for the convenience of description and explanation, the blocks in the NAND flash memory are divided according to the space requirements. Specifically, it is assumed that the storage area of each flash memory block is composed of 9 blocks (i.e., small squares in the figure), and the size of each small square is the same as the logical page. Through these flash memory blocks, the storage space (capacity) of the NAND flash memory is formed.
[0046] Here, a flash memory block (NAND Block, NAND block) corresponds to Figure 1 A NAND block in the , and the portion consisting of 9 blocks corresponds to Figure 1 A super block in the memory. When garbage collection is performed, it is performed in units of a super block. The following describes the process of writing and erasing data to the flash memory with reference to the accompanying drawings.
[0047] Figure 3 1 is a schematic diagram showing the start of data writing to the NAND flash memory.
[0048] like Figure 3 As shown, as an example, when writing data to a NAND flash memory, for example, four logical pages can be written sequentially and written to Dies of different channels respectively, which can increase the underlying parallelism and improve the write performance.
[0049] Specifically, if Figure 3 As shown in FIG. 1 , data is written to each die in an interleaved manner. The blank small squares represent blank storage spaces, and the numbers represent the data written and the specific location of the data.
[0050] certainly, Figure 3 The case shown is a sequential write, in actual applications, data may be written randomly in more cases. Unlike sequential writes, random writes refer to data being written out of sequence to any available location in the flash memory. Compared with sequential writes, random writes result in more erase and write operations because the data is not stored in a continuous address order, which may reduce the life of the flash memory. However, random writes can also improve performance, especially in certain workloads, because it can better utilize the parallel performance of flash storage devices.
[0051] Figure 4 Schematic diagram showing a state where a NAND flash memory is filled with random writing.
[0052] like Figure 4 As shown, at this time, the NAND flash memory involved in this embodiment is already full of data, so there are no blank small squares at this time. Among them, the light-colored small squares represent valid data (that is, data required by the user), and the dark-colored small squares represent junk data (that is, data not required by the user).
[0053] In this case, since there are no empty small blocks (ie, no empty space) in the flash memory, if the user continues to write data to the flash memory, a garbage collection process (hereinafter sometimes referred to as a GC process) needs to be performed.
[0054] Garbage collection is necessary for the following reasons: Due to the principle of NAND flash memory, it is impossible to perform data overwriting in the general sense, that is, directly writing new data on the storage medium to overwrite the original data. Therefore, in NAND flash memory, data overwriting usually requires two steps: erasing and writing. First, it is necessary to determine the block where the data to be overwritten is located. The write operation of NAND flash memory is performed in units of pages, while the erase operation is usually performed in units of blocks. Therefore, before overwriting data, it is necessary to ensure that the block where the data to be overwritten is located has been erased. If the block where the data is to be overwritten has not been erased, an erase operation must be performed first. Once the block where the data is located has been erased, new data can be written to the block. The write operation usually uses a specific write algorithm and controller to ensure the correctness and reliability of the data. After the data overwrite operation, the metadata information in the NAND flash memory needs to be updated to reflect the storage location and status of the new data. Metadata includes bad block management information, page usage status, error detection and correction information, etc. Updating metadata can ensure that the system can correctly find the newly written data when reading data.
[0055] Therefore, the main purpose of GC is to clear these "junk" data so that the space in the flash memory can be effectively reused. When the free space in the flash memory is insufficient, GC triggers an erase operation to organize the valid data in the flash memory into fewer blocks and free up more space to store new data.
[0056] Figure 5 and Figure 6 is a schematic diagram showing a GC process performed in a NAND flash memory.
[0057] like Figure 5As shown in the figure, GC processing is generally performed through super blocks. For Block A (super block A) and Block B (super block B), the valid data in them is read out and written into the blank super block. Here, the light-colored small squares represent valid data, while the dark-colored small squares represent garbage data, and the blank small squares represent blank blocks. Here, the valid data in Block A and Block B is written into Block X, that is, super block X.
[0058] Then, if Figure 5 As shown, the original Block A and Block B are erased to obtain available blocks.
[0059] Thus, one GC process is completed.
[0060] However, as explained above, existing GC processing is managed according to super blocks, and a GC will refresh several super blocks (here, Block A and Block B are refreshed). When performing this GC processing, the data in it needs to be read and written, so IO data (input / output data) will be generated, which will cause latency. As the blocks of current NAND flash memory are getting larger and larger, and the stacking of Planes and Dies is increasing, the amount of data that needs to be moved during GC is also increasing, which will cause the time required for a GC to become longer, and the time slices that affect latency will also increase, which will deteriorate the user experience and be detrimental to upper-level applications.
[0061] Therefore, in an embodiment of the present invention, a virtual block management method is proposed to solve the above problem.
[0062] Figure 7 It is a schematic diagram showing an example of a virtual block management method according to an embodiment of the present invention.
[0063] like Figure 7 As shown, the super block is divided into areas of equal proportion (ie, divided into multiple virtual blocks).
[0064] Specifically, as an example, Figure 7 As shown in the upper part, the existing super block contains 9 small blocks, and in this embodiment, a super block is divided into 3 areas of equal proportion (that is, divided into 3 virtual blocks), that is, the size of the super block is divided into one third of the original size.
[0065] In this case, when performing a GC, only the data in a virtual block is transferred to a blank block and marked as empty (no valid data). When all three virtual blocks in the super block are marked as empty, they are erased. Therefore, unlike the previous GC operation that required the relocation of a large amount of data, when a super block is divided into one third, the amount of data relocated at one time also becomes one virtual block, that is, the data of one-third of the super block. Due to the reduction of IO data, the time required for a GC is also shortened accordingly, the delay is reduced, and the user experience is improved.
[0066] Furthermore, similar to the conventional method of performing GC processing based on super blocks, a plurality of virtual blocks are refreshed simultaneously during one garbage collection process.
[0067] Figure 8 It is a schematic diagram showing another example of the virtual block management method involved in the embodiment of the present invention.
[0068] Figure 7 In the example shown, the super block is divided into three virtual blocks in equal proportion. Figure 8 In the example shown, the super block is divided into four virtual blocks in equal proportion. In this case, the amount of data to be migrated at one time is reduced to one-fourth, the time required for one GC is further shortened, the latency is further reduced, and the user experience is further improved.
[0069] Through the above virtual block management method, in addition to reducing the impact of latency when triggering GC, the chip life can also be increased.
[0070] Specifically, the hot and cold LBAs of actual data will be clustered. "LBA" stands for "Logical Block Address". In the field of computer storage, LBA is a method for accessing data on disk. Hot data refers to data that is frequently accessed and used. This data is usually in an active state and is frequently read or written. It may be data used by active applications or important information that needs to be retrieved frequently. Cold data refers to data that is not frequently accessed and used. This data may be historical data, archived data, backup data, or old versions of data that are no longer active. Cold data usually does not need to be accessed frequently, but still needs to be stored for a long time to meet various needs. Therefore, a small proportion of virtual blocks will make a large amount of cold data rarely participate in GC. They can easily be aggregated into some large blocks, thereby reducing the frequency of cold data movement, reducing chip wear, and increasing chip life.
[0071] The following describes the criteria for dividing the regions into equal proportions.
[0072] Although dividing a super block into multiple areas (multiple virtual blocks) in equal proportions can help reduce latency and increase chip life, if it is divided too much, although the latency will be further reduced, the number of read and write times will increase dramatically, which will reduce the chip life.
[0073] In addition, when the super block is very large, if the area is divided into too few areas, the amount of data moved during a GC is still very large, so the effect of reducing latency is not obvious.
[0074] In this implementation, the number of NAND blocks to be divided into equal proportions is determined based on the relationship between the latency of the NAND flash memory and the amount of IO data.
[0075] The relationship between NAND flash memory latency and IO data volume depends on multiple factors, including the type of flash memory, the technology of the storage media, the performance of the flash memory controller, the type of read / write operation, etc. Latency generally refers to the time required to complete a read or write operation, while IO data volume refers to the amount of data transferred in each IO operation. Generally speaking, there is a trade-off between NAND flash memory latency and IO data volume. Increasing IO data volume may increase the transmission time of each IO operation, thereby increasing the overall latency. However, efficient flash memory controllers and storage media can reduce latency by operating in parallel and increasing data transfer rates, thereby achieving higher IO data volumes.
[0076] In typical cases, NAND flash memory latency is usually between a few microseconds (µs) to a few milliseconds (ms), depending on the type of operation and device performance. Here are some approximate latency ranges for some common cases: Random read latency: Random reads typically have higher latency, typically between a few hundred nanoseconds (ns) and a few microseconds (µs), depending on the device type and controller performance. In lower latency SSDs (solid state drives), random read latency can be between a few hundred nanoseconds and a few microseconds. Sequential read latency: Sequential reads typically have lower latency, typically between a few microseconds (µs) and a few milliseconds (ms), depending on the device type and controller performance. SSDs typically have lower sequential read latency, typically between a few microseconds and tens of microseconds. Write latency: Write operations typically have higher latency than read operations. The specific latency depends on the device type, write mode (random or sequential), and controller performance. Random write latency is typically higher and can range from a few milliseconds (ms) to tens of milliseconds (ms), while sequential write latency is typically lower and can range from a few microseconds (µs) to tens of microseconds (µs).
[0077] In addition, the IO data volume of NAND flash memory depends on multiple factors, including flash memory type, device performance, read and write mode, etc. Generally speaking, the IO data volume of NAND flash memory can range from a few bytes to hundreds of KB. The following are typical IO data volume ranges in some common situations: Random read: In a random read operation, the amount of data read each time is usually small, depending on the target data size of the read operation and the device performance. Usually, the amount of data read each time can range from a few bytes to several KB; Sequential read: In a sequential read operation, the amount of data read each time is usually large, which can be adjusted according to the operation requirements and device performance. In a high-performance SSD, the amount of data read each time can usually reach tens of KB or even larger; Random write: In a random write operation, the amount of data written each time is small, depending on the target data size of the write operation and the device performance. Usually, the amount of data written each time can range from a few bytes to several KB; Sequential write: In a sequential write operation, the amount of data written each time is usually large and can be adjusted according to the operation requirements and device performance. In a high-performance SSD, the amount of data written each time can usually reach tens of KB or even larger.
[0078] When performing garbage collection (GC), the amount of IO data of the flash device can vary depending on multiple factors, including the GC algorithm, the performance of the flash controller, the GC policy, and the current system load. Generally speaking, GC operations involve erasing garbage data from the flash memory and reorganizing valid data, so the amount of IO data involved may be relatively large. The following are some factors that may affect the amount of IO data during GC: Erase block size: During the GC process, a certain number of flash blocks usually need to be erased to free up space. The erase block size is usually a fixed value, which determines the amount of data involved in each erase operation; Valid data replication: During the GC process, valid data may need to be copied to new blocks so that the data can be reorganized after the old block space is released. The copy operation involves copying data from one block to another, so it increases the amount of IO data. Erase operation: GC operation usually involves writing new valid data into new blocks and erasing old blocks to free up space; these write and erase operations will generate IO data volume; Data compression: Some GC algorithms may involve data compression operations to maximize the use of flash memory space. Compression operations may introduce additional IO data volume. GC concurrency: Some flash memory devices may support concurrent GC operations, allowing GC to be performed in the background without affecting normal read and write operations. This can reduce the impact on IO performance, but still generate a certain amount of IO data.
[0079] In this embodiment, the super block of the NAND flash memory is divided into a plurality of virtual blocks in equal proportion, and the size of each virtual block is configured to match the IO data volume that generates a specified delay when performing a GC process.
[0080] As an example, the specified delay is 15 μs to 45 μs.
[0081] In this case, when performing a GC process, the delay caused by the amount of IO data generated when relocating and erasing each virtual block obtained by equally dividing the NAND flash memory is 15μs~45μs. At this time, not only the impact of each GC on the delay is reduced, the user experience is better, and the NAND flash memory will not be over-read and written, thus affecting its lifespan, and a better balance can be achieved. In addition, since the hot and cold LBAs of actual data are clustered, the small proportion of virtual blocks after division will make a large amount of cold data rarely participate in GC. They are easily aggregated into some large blocks, thereby reducing the frequency of cold data migration, reducing chip wear, and thus increasing chip lifespan.
[0082] Furthermore, the predetermined delay is preferably 30 μs.
[0083] That is, the super block of the NAND flash memory is divided into multiple virtual blocks in equal proportion, and the size of each virtual block is configured to match the IO data volume that generates a 30μs delay during a GC process. In this case, the performance of the NAND flash memory is more balanced and better results can be achieved.
[0084] In addition, the division of the super block of the NAND flash memory can be set by software at the factory according to actual conditions (eg, the size of the NAND block, the actual stacking condition, and the performance to be achieved).
[0085] In addition, the super blocks of NAND flash memory can be divided into different sizes according to the special requirements of customers. For example, if the customer wants to reduce GC latency as the most important performance indicator, more virtual blocks can be divided appropriately. If the customer wants to extend the life of the chip, fewer virtual blocks can be divided appropriately.
[0086] The present invention also provides a storage device, which at least includes: a main controller; a flash memory area, which is implemented based on NAND flash memory and includes multiple storage modules, and the storage modules include multiple super blocks; and a cache area, which includes a garbage collection unit, and the garbage collection unit applies the virtual block management method described in this embodiment to the super block.
[0087] It should be understood that the above description is illustrative and not restrictive. For example, the above embodiments (and / or their various aspects) can be used in combination with each other. In addition, without departing from the scope of the present invention, many modifications can be made to adapt specific conditions or materials to the teachings of the various embodiments of the present invention. Although the size and type of the material described herein are used to define the parameters of the various embodiments of the present invention, the various embodiments are not meant to be restrictive, but exemplary embodiments. In the case of reading the above description, many other embodiments are obvious to those skilled in the art. Therefore, the scope of the various embodiments of the present invention should be determined with reference to the attached claims, and the full range of equivalent forms claimed by these claims.
Claims
1. A virtual block management method for managing a flash memory including a super block, wherein the virtual block management method is characterized in that: Divide the super block into multiple virtual blocks in equal proportion, and perform garbage collection based on the virtual blocks obtained by the division. The size of each virtual block is configured to match the amount of input and output data that generates a specified delay when performing a garbage collection process.
2. The virtual block management method according to claim 1, characterized in that: The flash memory is a NAND flash memory, and the super block is composed of multiple physical blocks in the NAND flash memory.
3. The virtual block management method according to claim 1, characterized in that: The specified delay is 15μs~45μs.
4. The virtual block management method according to claim 3, characterized in that: The specified delay is 30 μs.
5. The virtual block management method according to claim 1, characterized in that: The super block is divided into three virtual blocks in equal proportion.
6. The virtual block management method according to claim 1, characterized in that: The super block is divided into 4 virtual blocks in equal proportion.
7. The virtual block management method according to claim 1, characterized in that: During a garbage collection process, multiple virtual blocks are refreshed simultaneously.
8. The virtual block management method according to claim 1, characterized in that: The partitioning of the super block is performed by software.
9. A storage device, characterized in that: At least: Main controller; A flash memory area, which is implemented based on NAND flash memory and includes a plurality of storage modules, and the storage modules include a plurality of super blocks; as well as a cache area, the cache area including a garbage collection unit, The garbage collection unit applies the virtual block management method according to any one of claims 1 to 8 to the super block.
Citation Information
Patent Citations
Transparent compression method based on partitioned solid-state disk, storage controller and storage system
CN118567567A
Patially curved or foldable display device AMD method of fabricating thereof
KR1020210100332A
Software-defined SSD and system using the same
US20150378886A1
Weighted valid address count for garbage collection
US20240045799A1
System and method for data recovery in parallel multi-tenancy SSD with finer granularity
WO2020073233A1
Cited By
Method for reducing size of super block, memory card and storage medium
CN120523418A
