Optimized garbage collection

By identifying super blocks that do not meet the FDP mode rules and only garbage collecting them, the problem that the garbage collection function in FDP mode cannot distinguish between super blocks that require and do not need garbage collection is solved, which significantly reduces write amplification and improves the performance of SSD.

CN119718965APending Publication Date: 2025-03-28KIOXIA CORP
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411358341.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-09-28
Filing Date
2024-09-27
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

In FDP mode, the current garbage collection function cannot effectively distinguish between super blocks that need to be collected from garbage, causing the controller to garbage collect the super blocks that do not need to be collected, which increases write amplification and reduces the performance of SSD.

Method used

By identifying superblocks that do not meet the Flexible Data Placement (FDP) mode rules of the NVMeTM specification, marking them as bad superblocks, and performing garbage collection on memory blocks of these bad superblocks, while superblocks not marked as bad superblocks are only deallocated for subsequent use.

Benefits of technology

This targeted garbage collection method significantly reduces the frequency of garbage collection, reduces write amplification in SSD, and thus improves the performance of SSD.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718965A_ABST
    Figure CN119718965A_ABST
Patent Text Reader

Abstract

The invention relates to optimized garbage collection. A method of writing data to a solid state drive (SSD) configured to store data in a plurality of memory dies, each memory die comprising a plurality of memory blocks. The plurality of memory blocks are logically organized into a plurality of super blocks. The method is performed by a controller in communication with a plurality of memory dies. The method includes associating a superblock of a plurality of superblocks with a data stream of a plurality of data streams received by a write command from a host interface. The method also includes writing each data stream to a memory block of a respective superblock. The method also includes identifying the super block as a bad super block if the data stream of the memory block written to the super block does not meet the predetermined criteria. Further, the method includes performing garbage collection only on the memory blocks of the bad superblock.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to solid-state drives (SSDs) and methods for optimizing garbage collection to reduce write amplification and improve performance when receiving a write data stream from a host. Background Art

[0002] Solid-state drives (SSDs) generally have faster performance than magnetic disk drives, are more compact, and are less sensitive to vibration or physical shock. In view of these advantages, SSDs are being used in more and more computing devices and other consumer products to replace or supplement magnetic disk drives, even though the cost per gigabyte of storage capacity of SSDs is significantly higher than the cost per gigabyte of storage capacity of magnetic disk drives. SSDs utilize physical memory cells including non-volatile semiconductor storage devices (e.g., NAND memory devices) to store data. The controller of the SSD manages data transmission between the host and the memory cells of the SSD. Writing data to and reading data from the physical memory cells of the SSD generally involves transmitting data between the host and the non-volatile semiconductor storage device external to the SSD.

[0003] SSDs are subject to a large amount of data traffic when receiving multiple read and write requests from the host. This often results in data distribution, where data from various application write commands are mixed together when stored across the memory blocks of the SSD. During the erase operation, all memory blocks must be garbage collected, resulting in high write amplification. In order to better cope with high traffic, SSDs for enterprise and data center markets typically arrange physical memory blocks from different NAND tube cores in the SSD in a larger super block structure, which supports redundancy and prevents any one or more constituent blocks from failing. Therefore, modern data center protocols implement technologies for improving the utilization and performance of NAND super blocks to extend the life of the SSD. Such technologies include improved garbage collection, in which stale data in the NAND tube cores of the super block are erased simultaneously so that the constituent memory blocks can be repurposed, reorganized, and reused.

[0004] An example of a data center protocol that minimizes the need for garbage collection is NVMe TM The FDP mode has several rules and requires that write data received from the host include a stream identifier (StreamID) and be organized so that the superblock stores data from a single StreamID. When the rules are followed, the FDP mode enables the processor to use NVMe TMThe deallocation command erases data from a specific application to a logical block address (LBA) range that invalidates the data on the entire SuperBlock for that application when the data is no longer needed. This eliminates the traditional method of performing garbage collection on the entire pool of SuperBlocks in the SSD before erasing. Since garbage collection is not performed, write amplification is reduced.

[0005] FDP rules are not followed when the host and / or application continues to write data to the logical block address (LBA) area of ​​the Super Block after the Super Block is full (thus consuming many Super Blocks), or does not issue a deallocation after completing the "read-only" mode and continues to overwrite the data in the Super Block (also consuming many Super Blocks). This causes the controller to enter a mode that triggers garbage collection. Currently, the garbage collection function in FDP mode selects the Super Block to be garbage collected based on the Super Block with the oldest data or the Super Block with the largest number of unoccupied memory blocks. Once triggered, garbage collection is performed on the Super Blocks selected based on the above criteria, regardless of whether these Super Blocks contain data streams that comply with FDP rules. It should be noted that in FDP mode, not all Super Blocks are filled before converting to "read-only" mode. Due to the way Super Blocks are selected for garbage collection in FDP mode, data from Super Blocks of multiple hosts and / or applications will be mixed.

[0006] The garbage collection feature currently used in FDP mode overburdens the SSD. This is because no distinction is made between Super Blocks containing data flows that adhere to FDP rules and Super Blocks that do not adhere to FDP rules when selecting Super Blocks for garbage collection. As a result, Super Blocks that do not need to be garbage collected (i.e., Super Blocks containing data flows that adhere to FDP rules) are mixed into the same pool with Super Blocks that do need to be garbage collected (i.e., Super Blocks containing data flows that do not adhere to FDP rules). This causes the controller to perform garbage collection from Super Blocks that simply need to be erased via deallocate and trim commands. This contributes to write amplification and is undesirable because it can reduce the performance of the SSD. Summary of the invention

[0007] According to an embodiment of the present disclosure, a method for writing data to an SSD is provided, wherein the SSD is configured to store data in a plurality of memory dies, each memory die including a plurality of memory blocks, the plurality of memory blocks being logically organized into a plurality of super blocks, and the method being executed by a controller that communicates with the plurality of memory dies. The controller begins by associating a super block of the plurality of super blocks with a data stream of a plurality of data streams received via a write command from a host interface. The controller then writes each data stream to the memory block of the corresponding super block. Next, if the data stream written to the memory block of a super block does not meet a predetermined criterion, the controller identifies the super block as a bad super block. Here, the predetermined criterion may be determined by an NVMe TM A canonical Flexible Data Placement (FDP) mode defines: The controller then performs garbage collection only on the memory blocks of the bad super block.

[0008] According to another embodiment of the present disclosure, there is provided a solid-state drive (SSD) including a non-volatile semiconductor memory device, the non-volatile semiconductor memory device including a plurality of memory dies for storing data, the memory dies including a plurality of memory blocks, the plurality of memory blocks being logically organized into a plurality of super blocks. The SSD also includes a controller communicating with the plurality of memory dies. The controller is configured to associate a super block among the plurality of super blocks with a data stream among a plurality of data streams received via a write command from a host interface. The controller is also configured to write each data stream to the memory block of the corresponding super block. In addition, the controller is configured to identify the super block as a bad super block when the data stream written to the memory block of a super block does not meet a predetermined standard. In addition, the controller is configured to perform garbage collection only on the memory blocks of the bad super block.

[0009] According to the above embodiment, the Super Blocks that are not marked as bad Super Blocks are only deallocated by the host application, which allows the deallocated Super Blocks to be erased for subsequent use. This means that garbage collection is not performed on Super Blocks that are not marked as bad Super Blocks. TM Compared with the garbage collection method used in FDP mode, such targeted garbage collection significantly reduces the frequency of performing garbage collection. This greatly reduces write amplification in the SSD, thereby improving the performance of the SSD.

[0010] In a specific embodiment, the predetermined standard is provided by NVMe TMFlexible Data Placement (FDP) protocol definition. In some embodiments, the predetermined criterion is met if the write command causes the controller to delete all data in the memory block of the super block before writing the data stream. In other embodiments, the predetermined criterion is met if the write command causes the controller to prevent writing to the memory block of the super block when the data stream contains data whose size will exceed the size of the super block. In other embodiments, the method also includes performing garbage collection on the memory block associated with the overflow super block, and the memory block associated with the overflow super block contains overflow data from the data stream that exceeds the size of the super block. In a specific embodiment, the memory block of the overflow super block consolidates overflow data from multiple data streams.

[0011] In some embodiments, the method further comprises setting a flag associated with the super block if the predetermined criteria are not met, and performing garbage collection on the memory block of the super block associated with the set flag. In other embodiments, each super block contains at least one memory block from each memory die. In other embodiments, each super block is associated with a single data stream. In a specific embodiment, the multiple data streams originate from: (i) multiple streams from different applications running on the host, (ii) multiple streams from multiple instances of a single application, or (iii) multiple streams within a single application. In other embodiments, the method further comprises converting a logical block address (LBA) specified in the write command into a physical block address of the memory block using a flash translation layer (FTL) of the controller. In other embodiments, the method further comprises identifying the super block corresponding to the physical block address of the memory block in the multiple super blocks by using the LBA from the write command through a lookup table. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The foregoing and other objects and advantages will become apparent upon consideration of the following detailed description taken in conjunction with the accompanying drawings, wherein like reference numerals refer to like parts throughout, and wherein:

[0013] Figure 1 shows a schematic representation of an SSD configured in accordance with one or more embodiments of the present disclosure;

[0014] Figure 2 Shows Figure 1 An exemplary super block structure in a memory device of an SSD in;

[0015] Figure 3 Shows that after garbage collection is performed Figure 1 Example states of memory blocks of various superblocks in an SSD;

[0016] Figure 4 Provides such as Figure 2 and Figure 3 Exemplary performance data of a typical SSD after garbage collection is shown; and

[0017] Figure 5 According to one or more embodiments of the present disclosure, a super block that does not meet the data placement protocol criteria is identified. Figure 1 A flowchart of a method for performing garbage collection on an SSD. DETAILED DESCRIPTION

[0018] In order to provide a comprehensive understanding of the apparatus described herein, certain illustrative embodiments will be described. Although the embodiments and features described herein are specifically described as being used in conjunction with an SSD having a controller, it should be understood that all of the components and other features outlined below may be combined with one another in any suitable manner and may be adapted and applied to other types of SSD memory architectures that have similar needs for improving garbage collection within the apparatus to increase performance and extend the life of the SSD, in addition to other benefits that may be readily recognized by one of ordinary skill in the art.

[0019] Modern data center oriented SSD protocols implement technologies that extend the life of SSDs. An example of such a protocol is NVMe TM NVMe as described in specification TP4146 and as presented at the 2022 Flash Memory Summit (FMS) in a report titled “Hyperscale Innovation: Flexible Data Placement Models” TM Flexible Data Placement (FDP) mode. (See https: / / nvmexpress.org / wp-content / uploads / Hyperscale-Innovation-Flexibl e-Data- Placement-Mode-FDP.pdf and https: / / nvmexpress.org / nvmeflexible-data-placement- fdp-blog / , the disclosure of which is incorporated herein by reference in its entirety. ) Such a protocol can be aware of the superblock size and manage the data written to the superblock according to that size. The protocol can open many superblocks to allow multiple separate host write streams to write data to the SSD, where each superblock contains data from a single stream. The protocol writes data to a superblock, allows reading of the superblock, and then deletes all the data in the superblock with a single command. This reduces the amount of garbage collection required before the NAND blocks with deleted data can be erased. An important element of the protocol is that the superblock contains data from a single stream, that is, the superblock does not contain a mix of data from different streams. This reduction in garbage collection based on a single stream data superblock and deallocation before writing will mean that compared to a standard SSD, the host can write much more data to the SSD before the drive wears out because write amplification will be reduced.

[0020] The present disclosure provides a method for identifying when the data stream of a write command does not comply with the Flexible Data Placement (FDP) protocol rules. Here, the controller checks the flash translation layer data of the logical block address for the write command and marks the super block to which the data stream is written as a bad super block. Then, garbage collection is performed only on the super blocks marked as bad super blocks, while the super blocks that are not marked as bad super blocks are only deallocated and erased for subsequent use. This means that garbage collection is not performed on super blocks that are not marked as bad super blocks. TM Compared to the garbage collection method used by the FDP protocol, such targeted garbage collection significantly reduces the frequency of garbage collection. This greatly reduces write amplification in the SSD, thereby improving performance.

[0021] Figure 1 1 is a block diagram of a memory system 100 including at least one host 110 in communication with a storage device 120. The host 110 is a computing system that includes a processor, a memory, and other components known in the art, which are not shown in the figure for the sake of brevity. Figure 1. The storage device 120 provides a non-volatile storage function used by the host 110. The storage device 120 may include an integrated circuit including a controller communicatively coupled to a memory such as an SSD or HDD. Such an integrated circuit may include a system on chip (SoC) 130. SoCs are advantageous because they provide a single integrated circuit that contains circuits and components for the electronic system of the storage device 120. The SoC 130 may be communicatively coupled to the memory 140. The memory 140 may additionally include a NAND semiconductor memory, such as a NAND-based flash memory device. The memory 140 may be organized into pages, blocks, planes, dies, and chips. The memory 140 may include a plurality of NAND chips, such as 32, 64, 128, 256 individual NAND chips, and each NAND chip may run a separate command on an individual die (not shown) within the chip. The memory 140 may have blocks organized into super blocks, as will be described in detail below.

[0022] The storage device 120 may include a local memory located external to the SoC 130, such as a dynamic random access memory ("DRAM") 150. However, one of ordinary skill in the art will appreciate that other types of memory, such as static random access memory ("SRAM") or other suitable alternatives may be employed without departing from the scope of the present disclosure. The local external memory 150 includes several buffers for buffering data during read and write operations between the host 110 and the memory 140. In addition, the storage device 120 may include a host interface 132 that allows communication with the host 110 to receive I / O commands and vendor unique commands (VUCs). The storage device 120 may also include a memory interface 134 for communicating with the memory 140 (via multiple channels, not shown), and an interface 136 for communicating with the local external memory 150. For example, the interface 132 on the SoC 130 may include a Serial Advanced Technology Attachment (SATA) connector or an NVMe. TM Connector (NVMe TM is an acronym for "NVM express", where "NVM" stands for "non-volatile memory"), which is transmitted via PCIe TM(“Peripheral Component Interface Express”) bus operation. For example, interface 134 may include an open NAND flash interface (ONFI) or a manufacturer's proprietary interface. Interface 136 may include, for example, an interface according to, but not limited to, the following standards: a double data rate (DDR) memory bus standard, such as DDR3, DDR4, or DDRS; a low power double data rate (LPDDR) memory bus standard, such as LPDDR3, LPDDR4, or LPDDR5; a hybrid memory cube (HMC) memory bus standard.

[0023] Figure 1 Also shown is a memory controller 160, which enables the storage device 120 to perform various functions, such as processing VUC commands received from the host 110 and internal commands generated within the storage device 120 to maintain functionality (e.g., NVMe commands such as "FormatNVM" TM Commands). The storage device 120 also includes a read-only memory (ROM) that stores firmware 165 for the operation of the various states of the storage device 120. The firmware 165 includes computer executable instructions executed by the controller 160 for the operation of the storage device 120. The ROM is programmed with the firmware 165 during the manufacture of the storage device 120, and the ROM can be reprogrammed by the controller 160 as needed. This allows the operation of the storage device 120 to be adjusted as needed. The storage device 120 may also include an internal memory 170, such as a static random access memory ("SRAM"), which forms part of the same integrated circuit as the SoC 130. The internal memory 170 can be configured to store data such as system metadata, mapping tables, and bad block lists. In some embodiments, such data may also be stored in the local external memory 150. The memory controller 160 may also include a flash translation layer (FTL) that enables the SoC controller 130 to perform various activities that facilitate processing of read and write commands received from the host 110, such as converting an LBA specified by the host 110 to a physical block address in the NAND memory 140 for garbage collection.

[0024] The memory controller 160 may also include an error correction encoder and decoder. The decoder may include an encryption and error correction code (ECC) decoder that is communicatively coupled to the hard decision decoder and the soft decision decoder. The ECC decoder may also include a BCH error corrector or any other cyclic error corrector. In a first example, the data written to the memory 140 is encoded with an ECC code to give ECC encoded data. In order to decode data from the memory, the data from the memory cell of the target row is passed through a hard decision decoder and (when necessary) a soft decision decoder. In addition, wear and tear of the device during its life causes errors to be introduced into the data when reading data from the memory device.

[0025] To manage the flow of data within SSD 120, controller 160 may organize the memory blocks in NAND die 140 into superblocks. This larger superblock structure supports redundancy and protects against failure of any one or more of the constituent blocks. Superblocks may include specific groupings of memory blocks to help organize and manage data in memory device 140, such as in Figure 2 and Figure 3 15. Here, NAND Dies B0-B15 are dies from NAND device 140. NAND Dies B0-B15 are organized into Super Blocks X, Y, and Z, where each Super Block includes one memory block from each NAND Die B0-B15. For example, Super Block X includes one NAND block from each of Dies B0-B15 that has not been used by another Super Block, Super Block Y includes one NAND block from each of Dies B0-B15 that has not been used by another Super Block, and Super Block Z includes one NAND block from each of Dies B0-B15 that has not been used by another Super Block. In some instances, RAID parity is added for additional data protection (see Figure 2 By organizing memory blocks into super blocks, NAND device 140 can present thousands of super blocks for use by the SSD to help manage the data stream received from host 110.

[0026] Typically, data from a data stream received from the host is written in a fixed order from die B0 to die B1... and finally to die B15. Once a superblock is filled, a new superblock is selected for writing data from the host data stream, whether to continue the write order of data from the same data stream (the new superblock will be referred to as an "overflow superblock"), or a new write order for a new data stream received from the host. When all of the memory blocks of a superblock have been written, there may be some data from the data stream that has been written beyond the capacity of the superblock. Such an over-write occurs when the data to be written has a size greater than the capacity of the memory blocks in the superblock. In this case, a new superblock can be opened so that the spill over data can be written. However, in this case, the memory blocks of the newly opened superblock may not all be full, and may actually be almost empty. This will make the newly opened superblock a candidate for conventional garbage collection. This is because conventional garbage collection merges data from almost empty superblocks so that almost unfilled superblocks can be used for data from new data streams received from the host. Therefore, garbage collection moves valid data that overflows from the newly opened superblock to the garbage collection superblock (e.g., described in detail below). Figure 3 Superblock A in .

[0027] For a typical data center SSD, garbage collection will remove valid data from 2 to 8 Super Blocks in the manner described above to fill a Garbage Collection Super Block before it can be erased (to free up the Garbage Collection Super Block so that the Garbage Collection Super Block itself can be used again by the host). This means that for every Super Block that is worth writing data to, 2 to 8 Super Blocks must be garbage collected before the Garbage Collection Super Block is fully filled for erasure. This additional garbage collection contributes to write amplification within the SSD. This write amplification can be reduced by the host sending a "trim" command to delete obsolete data. The trim command is usually sent by the host to the SSD to inform the SSD which memory blocks can be erased because they are no longer used. However, in the case of conventional Super Block organization within the NAND device 140, if conventional garbage collection has created a recycled Super Block containing a mixture of data from multiple write streams, the trim command will not delete all the data in the Super Block due to the mixing of data. Therefore, the data in this portion of the Super Block is likely to be recycled in another garbage collection that triggers multiple recycling cycles, which will increase write amplification.

[0028] Typical data placement protocols (e.g., the NVMe TMThe FDP protocol) knows the size of the SuperBlock and manages the data written to the SuperBlock according to that size. Such a protocol can open many SuperBlocks to allow multiple separate host write streams to write data to the SSD, where each SuperBlock contains data from a single stream. FDP mode allows the controller to write data to a SuperBlock, read data from the SuperBlock, and delete all the data in the SuperBlock with a single command. This reduces the amount of garbage collection required before the NAND blocks containing deleted data can be erased. An important element of FDP mode is that SuperBlocks contain data from a single stream (i.e., each SuperBlock does not contain a mix of data from different streams). This is important in Figure 2 , where the memory blocks of Super Block X contain data from stream 1 shown by shadow memory blocks 1-5 in NAND die B0, B1, and B2, the memory blocks of Super Block Y contain data from stream 2 shown by shadow memory blocks 1-7 in NAND die B0, B1, B2, and B3, and the memory blocks of Super Block Z contain data from stream 15 shown by shadow memory blocks 1-2 in NAND die B0. Assuming that the protocol rules are followed, limiting each Super Block to one stream reduces the need for garbage collection. Since garbage collection is not required, only the deallocation command needs to be executed before writing. Compared to a standard SSD, because the write amplification will be small, this allows the host to write much more data to the SSD before the drive wears out. This reduces write amplification in the SSD. However, if the protocol rules are not followed, conventional garbage collection will occur.

[0029] The key rules of the Flexible Data Placement Protocol are as follows. First, the host must delete all data in the SuperBlock (e.g., using an NVMe "deallocate" command) before overwriting the SuperBlock. Second, the host must "close" the SuperBlock before it writes more data than the size of the SuperBlock. Writing data in a SuperBlock that is larger than the available space will cause the FTL to write the additional data to an "overflow" SuperBlock, which can contain data from many data streams. This violates the requirement that the SuperBlock contain data from a single host stream, so no garbage collection is required when the host deallocates the data.

[0030] Reclamation is performed in the erroneous case where one or more host write data streams do not comply with the above critical rules (hereinafter referred to as "bad streams"). These bad streams may consume available over-provisioning Super Blocks, which will trigger garbage collection. However, in standard FTL, the regular garbage collection function will select the emptiest Super Block in the entire Super Block pool in the memory device. This can include Super Blocks written by good streams that comply with the above critical rules. This means that Super Blocks containing valid data will also be garbage collected into a new Super Block, which will typically include data from other streams, resulting in Super Blocks containing a mixture of data from different streams. This can be seen in Figure 2 and Figure 3 , where memory blocks 1-5 originally in Super Block X, memory blocks 1-7 originally in Super Block Y, and memory blocks 1-2 originally in Super Block Z have been garbage collected into Super Block A when a data stream from the host has violated one of the FDP rules. This results in garbage collected Super Block A having data from multiple streams, including data from well-behaved data streams 1, 2, and 15, as well as data from the bad stream that triggered the garbage collection.

[0031] Figure 4 The effect of garbage collection on the performance of an SSD for eight data streams is shown. The results show the case where there is a single bad stream, where garbage collection is performed by selecting from the entire pool of superblocks from both the well-performing and poorly-performing streams, rather than just garbage collecting the superblocks from the poorly-performing stream. Figure 4 The figure shows a dramatic change in performance once the poorly performing stream from the host write command is processed. Garbage collection is triggered by the poorly performing stream (around 950 seconds), with the performance of the device gradually getting worse from that point on (the line marked "Agg" represents the aggregate performance of all eight streams, with performance decreasing by up to about 30%).

[0032] According to the new garbage collection function of the present disclosure, garbage collection is performed only on super blocks from bad streams that do not comply with key rules. This will reduce overall write amplification by identifying bad streams and performing garbage collection only on bad streams. The garbage collection function identifies when a data stream does not comply with the first rule and optionally the second rule. However, it will be understood by a person of ordinary skill in the art that other rules or criteria may be used to determine a "bad stream" without departing from the scope of the present disclosure. According to an embodiment of the present disclosure, once a bad data stream is identified, garbage collection is performed only on super blocks associated with memory blocks containing invalid data from the bad data stream. Garbage collection is not performed on super blocks associated with memory blocks containing valid data from good data streams.

[0033] Here, the controller identifies whether the write command associated with the host data stream meets the predetermined criteria, and if the predetermined criteria are not met, garbage collection is performed on the memory blocks of the super block. The predetermined criteria may include: an instruction (first rule) that causes the controller to delete all data in the memory blocks of the super block before writing the data stream is included in the host write command. Specifically, the controller can check the physical block address of the memory block of the super block corresponding to the LBA of the write command of the FTL data. Here, the physical block address of the memory block of the super block can be identified by a lookup table using the LBA from the write command. If the FTL data of the LBA points to a super block other than the super block to which the data is being written, the host has not yet deallocated the super block before starting to overwrite the memory block in the super block. The two super blocks corresponding to the data stream (the existing super block for the LBA in the write command, and the new super block associated with the overflowed or overflowed data stream) are marked as bad stream super blocks.

[0034] The predetermined criteria may also include including in the host write command an instruction to cause the controller to prevent writing to the memory blocks of the super block when the data stream contains data whose size exceeds the super block size (second rule). Here, when the data stream overfills the super block, so that additional data is written to the overflow super block, the super block is similarly marked as a bad stream super block. In this case, both the overfilled super block and the overflow super block are marked as bad stream super blocks.

[0035] If the write command associated with the host data stream does not meet the predetermined criteria, the super block to which the write data stream has been written is marked as a bad stream super block. This can be achieved by setting a flag associated with the bad stream super block. The controller's FTL then performs garbage collection only on the bad stream super blocks with the set flag. By performing garbage collection only on super blocks containing data from bad streams, the write amplification caused by conventional garbage collection used in FDP mode can be greatly reduced, thereby improving the performance of the SSD. According to an embodiment of the present disclosure, once a bad stream is identified, garbage collection is not performed on a super block containing valid data from a good data stream. In addition, it will be understood by those of ordinary skill in the art that other predetermined criteria may be used to identify bad streams without departing from the scope of the present disclosure.

[0036] Figure 5 FIG. 5 is an exemplary flow chart of a method 500 for processing a write command received by SSD 120 from host 110 according to an embodiment of the present disclosure. The method 500 involves the NVMe TMThe method 500 begins at step 510, where the controller 160 associates a Super Block with a data stream received via a write command. The protocol can open many Super Blocks to allow multiple separate host write streams to write data to the SSD, where each Super Block contains data from a single stream. The method then proceeds to step 520, where the controller 160 writes the data from the received data stream to the Super Block. Next, the controller 160 determines whether the write command meets predetermined criteria (step 530).

[0037] The predetermined criteria may be defined by the FDP protocol and based on key rules. Key rules include (1) the host must delete all data in the superblock before overwriting the superblock (e.g., using NVMe TM "Deallocate" command), and optionally (2) the host must "close" the Super Block before it writes more data that exceeds the size of the Super Block. In the case of the first rule, the controller 160 checks the LBA of the write command of the FTL data and determines whether the LBA points to a memory block of an existing Super Block that has not been de-allocated before the controller starts overwriting the memory block of the Super Block. As for the second rule, when the data stream overfills the Super Block and additional data is written to the overflow Super Block, the Super Block is marked as a bad stream Super Block. In this case, both the overfilled Super Block and the overflow Super Block are marked as bad stream Super Blocks.

[0038] If the write data stream does not meet the criteria ("No" at step 530), the write data stream does not comply with the FDP protocol rules (the error use case scenario described above), and the Super Block to which the write data stream is written is identified as a bad Super Block and is marked for garbage collection (step 540). This can be achieved by setting a flag associated with the bad Super Block. The controller's FTL then performs garbage collection only on the bad stream Super Block (step 550). However, if the write data command does meet the criteria ("Yes" at step 530), the data stream is valid and complies with the FDP protocol rules, and garbage collection is not performed on the Super Block. Instead, as shown in step 560, a trim command is issued by the host for the LBA area mapped to the Super Block, and, because it complies with the FDP rules to trim the entire area, the memory blocks in the Super Block are erased, thereby making the Super Block available for subsequent data streams received from the host 110.

[0039] In the above, all references to "layers" or "engines" should be considered to refer to multiple circuits within a controller that facilitates the described functions. Such circuits may include electronic components such as transistors and resistors formed on a semiconductor chip. It should be noted that the above terms "approximately" or "about" indicate a range of ±20% of the value. In addition, in the above, all references to "commands," "actions," or "functions" should be considered to be based on algorithms and instructions stored on a non-temporary computer-readable medium, which, when executed by a processor, cause the controller of the integrated circuit of the solid-state drive (SSD) to perform commands, actions, or functions. When used in connection with NAND non-volatile semiconductor memory devices, all references to "devices," "memory," and "die" may be used interchangeably. The term "similar" as used herein means close to the same, but the described differences exist. The terms "protocol" and "mode" may be used interchangeably to refer to NVMe TM A canonical Flexible Data Placement (FDP) approach.

[0040] Other purposes, advantages and embodiments of various aspects of the present invention will be apparent to those skilled in the art and are within the scope of the specification and drawings. For example, but not limited to, structural or functional elements may be rearranged in accordance with the present invention. Similarly, the principles of the present invention may be applied to other examples, even if not specifically described in detail herein, but other examples are still within the scope of the present invention.

Claims

1. A method of writing data to a solid state drive (SSD), the SSD being configured to store data in a plurality of memory dies, each memory die comprising a plurality of memory blocks, the plurality of memory blocks being logically organized into a plurality of super blocks, the method being performed by a controller in communication with the plurality of memory dies, and comprising: associating a super block of the plurality of super blocks with a data stream of the plurality of data streams received via a write command from a host interface; writing each data stream to the memory block of the corresponding super block; If the data stream written to the memory blocks of a Super Block does not meet predetermined criteria, identifying the Super Block as a bad Super Block; and Garbage collection is performed only on the memory blocks of the bad super block.

2. The method according to claim 1, wherein: The predetermined standard is determined by NVMe TM Flexible Data Placement (FDP) protocol definition.

3. The method according to claim 2, wherein: The predetermined criterion is met if the write command causes the controller to delete all data in the memory blocks of the super block prior to writing the data stream.

4. The method according to claim 3, wherein: The predetermined criterion is met if the write command causes the controller to prevent writing to the memory blocks of the Super Block when the data stream contains data whose size would exceed the size of the Super Block.

5. The method according to claim 4, further comprising: Garbage collection is performed on memory blocks associated with an overflow Super Block, the memory blocks associated with the overflow Super Block containing overflow data from the data stream that exceeds the size of the Super Block.

6. The method according to claim 5, wherein: The memory block of the overflow super block consolidates overflow data from multiple data streams.

7. The method according to claim 1, further comprising: If the predetermined criterion is not met, setting a flag associated with the superblock; as well as Garbage collection is performed on the memory blocks of the super block associated with the set flag.

8. The method according to claim 1, wherein: Each super block contains at least one memory block from each memory die.

9. The method according to claim 1, wherein: Each superblock is associated with a single data stream.

10. The method according to claim 1, wherein: The multiple data streams originate from: (i) multiple streams from different applications running on the host, (ii) multiple streams from multiple instances of a single application, or (iii) multiple streams within a single application.

11. A solid state drive (SSD), comprising: A non-volatile semiconductor memory device comprising a plurality of memory dies for storing data, the memory dies comprising a plurality of memory blocks, the plurality of memory blocks being logically organized into a plurality of super blocks; as well as a controller in communication with the plurality of memory dies, the controller being configured to: associating a super block of the plurality of super blocks with a data stream of the plurality of data streams received via a write command from a host interface; writing each data stream to the memory block of the corresponding super block; If the data stream written to the memory blocks of a Super Block does not meet predetermined criteria, identifying the Super Block as a bad Super Block; and Garbage collection is performed only on the memory blocks of the bad super block.

12. The method according to claim 11, wherein: The predetermined standard is determined by NVMe TM Flexible Data Placement (FDP) protocol definition.

13. The SSD according to claim 12, wherein: The predetermined criterion is met if the write command causes the controller to delete all data in the memory blocks of the super block prior to writing the data stream.

14. The SSD according to claim 13, wherein: The predetermined criterion is met if the write command causes the controller to prevent writing to the memory blocks of the Super Block when the data stream contains data whose size would exceed the size of the Super Block.

15. The SSD according to claim 14, wherein: The controller performs garbage collection on memory blocks associated with an overflow Super Block, the memory blocks associated with the overflow Super Block containing overflow data from the data stream that exceeds the size of the Super Block.

16. The SSD according to claim 15, wherein: The memory block of the overflow super block consolidates overflow data from multiple data streams.

17. The SSD according to claim 11, wherein: If the predetermined criteria is not met, the controller sets a flag associated with the super block and performs garbage collection on the memory blocks of the super block associated with the set flag.

18. The SSD according to claim 11, wherein: Each super block contains at least one memory block from each memory die.

19. The SSD according to claim 11, wherein: Each superblock is associated with a single data stream.

20. The SSD according to claim 11, wherein: The multiple data streams originate from: (i) multiple streams from different applications running on the host, (ii) multiple streams from multiple instances of a single application, or (iii) multiple streams within a single application.

Citation Information

Cited By

  • Memory management method and memory controller

    CN120540597A