Controlled inconsistency in FTL mapping to reduce time for huge deallocate in multi-layer FTL

The method of extracting validity counters from memory sets and marking them as invalid in blocks, followed by post-deallocation consistency restoration, addresses deallocation timeouts and inconsistencies, enhancing the efficiency and speed of non-volatile memory deallocation processes.

US12817772B1Active Publication Date: 2026-12-01SANDISK TECHNOLOGIES LLC
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
US19/229857
Authority / Receiving Office
US · United States
Patent Type
Patents(United States)
Current Assignee / Owner
Filing Date
2025-06-05
Publication Date
2026-12-01
Estimated Expiration
2045-06-05

AI Technical Summary

Technical Problem

Deallocation commands in non-volatile memory systems face challenges due to timeouts and inconsistencies, particularly when input/output commands are executed concurrently, leading to inefficient and prolonged deallocation processes.

Method used

A method is proposed where deallocation is performed by extracting validity counters from memory sets (mSets) and marking them as invalid in memory blocks, while maintaining consistency by removing all deallocated units from the update layer as a single operation, thereby avoiding unnecessary consolidations and ensuring faster deallocation.

Benefits of technology

This approach reduces deallocation time and avoids timeouts by focusing on immediate deallocation without immediate consistency maintenance, allowing for quicker recovery and improved system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure US12817772-D00000_ABST
    Figure US12817772-D00000_ABST
Patent Text Reader

Abstract

Deallocation commands can be challenging to execute, particularly when input / output (I / O) commands are also sent for execution. Deallocation commands can be for an entire memory device or for a specific portion of the memory device, such as a specific namespace (NS). Deallocation can lead to timeout issues because the I / O commands, when paused for the specific NS, may timeout. Furthermore, to maintain consistency, multiple consolidations may occur after the deallocation due to full uLayers. To avoid any consolidations that include saving on NAND, deallocation of the mLayer by only extracting VC counters from mSets is proposed and marking the mSets as invalid in mBlocks. To reconstruct consistency between the uLayer and mLayer, all deallocated uRuns should be removed from the uLayer as one operation. In so doing, consistency is obtained and deallocation is faster.
Need to check novelty before this filing date? Find Prior Art

Description

BACKGROUND OF THE DISCLOSUREField of the Disclosure

[0001] Embodiments of the present disclosure generally relate to improved deallocation.Description of the Related Art

[0002] According to the non-volatile memory (NVM) Express (NVMe) specification, destroying all data and metadata with all namespaces (NSs) or only the specific NS is associated with the deallocate command and the command format NVMe. A NS is a formatted quantity of NVM that may be accessed by a host device. Associated with each NS is an input / output (I / O) command set that operates on that NS. An NVMe controller may support multiple NSs that are referenced using a NS identification (ID) (NSID). NSs may be created and deleted using the NS management and capacity management commands. The identify NS data structure, the I / O Command set specific identify NS data structure, and the I / O command set independent identify NS data structure indicate capabilities and settings that are specific to a particular NS.

[0003] The format NVMe command, or a sanitize command, may destroy all data and metadata associated with all NSs or only the specific NS associated with the command. After the sanitize / format NVMe command completes, the controller shall not return any user data previously contained in an affected NS. As part of the format NVMe command, the host device requests a format operation and may request a secure erase of the contents of the NVM. The user data erase command erases all user content present in the NVM subsystem.

[0004] According to NVMe specification, up to 256 ranges can be sent from the host device as a single deallocate command or group of single deallocate commands. The volume of destroying user data by deallocate commands might be very large and might lead to a timeout in run-time or in recovery time of many deallocate commands on ungraceful shutdown (UGSD).

[0005] The deallocate operation is a flash management logic erase operation implemented by flash management table updates that replaces direct physical erase operations managed independently and optionally at a later time by the memory flash management software. A deallocation operation is a much simpler flash management process that may be performed in active random access memory (RAM) devices, such as static RAM (SRAM) or dynamic RAM (DRAM). In storage systems having a limited RAM resources, the management tables need to be stored in flash memory and synchronized with ongoing updates. Hence, the problem of deallocation management may become a bottleneck, and with high loads, may even cause overall system timeout failures.

[0006] Therefore, there is a need in the art for improved deallocation.SUMMARY OF THE DISCLOSURE

[0007] Deallocation commands can be challenging to execute, particularly when input / output (I / O) commands are also sent for execution. Deallocation commands can be for an entire memory device or for a specific portion of the memory device, such as a specific namespace (NS). Deallocation can lead to timeout issues because the I / O commands, when paused for the specific NS, may timeout. Furthermore, to maintain consistency, multiple consolidations may occur after the deallocation due to full uLayers. To avoid timeouts any consolidations that include saving on NAND, deallocation of the mLayer by only extracting VC counters from mSets is proposed and marking the mSets as invalid in mBlocks. To reconstruct consistency between the uLayer and mLayer, all deallocated u Runs should be removed from the uLayer as one operation. In so doing, consistency is obtained and deallocation is faster.

[0008] In one embodiment, a data storage device comprises: a memory device; and a controller coupled to the memory device, wherein the controller is configured to: loop on a delayed deallocated bitmap until a last bit mSetID; determine whether a mSetID bit is set; load an mSet and merge the mSet with a uLayer; update a validity counter in the mSet; and mark the mSet as invalid in an mBlock.

[0009] In another embodiment, a data storage device comprises: a memory device; and a controller coupled to the memory device, wherein the controller is configured to: execute a fast deallocation command, wherein the controller is configured to lose consistency when executing the fast deallocation command; determine if all bits in a uLayer bitmap are equal to bits in an erase bitmap; and restore consistency after the determining.

[0010] In another embodiment, a data storage device comprises: means to store data; and a controller coupled to the means to store data, wherein the controller is configured to: execute a deallocation command for a first NS, wherein the first NS loses consistency during execution of the deallocation command; execute I / O commands for a second NS; pause execution of the I / O commands while the deallocation command is executed; pause execution of the deallocation command while the I / O commands are executed; determine when to pause execution of the deallocation command; and determine when to pause the execution of the I / O commands.BRIEF DESCRIPTION OF THE DRAWINGS

[0011] So that the manner in which the above recited features of the present disclosure can be understood in detail, a more particular description of the disclosure, briefly summarized above, may be had by reference to embodiments, some of which are illustrated in the appended drawings. It is to be noted, however, that the appended drawings illustrate only typical embodiments of this disclosure and are therefore not to be considered limiting of its scope, for the disclosure may admit to other equally effective embodiments.

[0012] FIG. 1 is a schematic block diagram illustrating a storage system in which a data storage device may function as a storage device for a host device, according to certain embodiments.

[0013] FIG. 2 is a schematic illustration of host created namespaces (NSs) according to one embodiment.

[0014] FIG. 3 is schematic illustration of system administration tool (SAT) flash translation layer (FTL) components according to one embodiment.

[0015] FIGS. 4A-4C show a comparison of two deallocation methods.

[0016] FIG. 5 is a flowchart illustrating a fast deallocation method according to one embodiment.

[0017] To facilitate understanding, identical reference numerals have been used, where possible, to designate identical elements that are common to the figures. It is contemplated that elements disclosed in one embodiment may be beneficially utilized on other embodiments without specific recitation.DETAILED DESCRIPTION

[0018] In the following, reference is made to embodiments of the disclosure. However, it should be understood that the disclosure is not limited to specifically described embodiments. Instead, any combination of the following features and elements, whether related to different embodiments or not, is contemplated to implement and practice the disclosure. Furthermore, although embodiments of the disclosure may achieve advantages over other possible solutions and / or over the prior art, whether or not a particular advantage is achieved by a given embodiment is not limiting of the disclosure. Thus, the following aspects, features, embodiments, and advantages are merely illustrative and are not considered elements or limitations of the appended claims except where explicitly recited in a claim(s). Likewise, reference to “the disclosure” shall not be construed as a generalization of any inventive subject matter disclosed herein and shall not be considered to be an element or limitation of the appended claims except where explicitly recited in a claim(s).

[0019] Deallocation commands can be challenging to execute, particularly when input / output (I / O) commands are also sent for execution. Deallocation commands can be for an entire memory device or for a specific portion of the memory device, such as a specific namespace (NS). Deallocation can lead to timeout issues because the I / O commands, when paused for the specific NS, may timeout. Furthermore, to maintain consistency, multiple consolidations may occur after the deallocation due to full uLayers. To avoid any consolidations that include saving on NAND, deallocation of the mLayer by only extracting VC counters from mSets is proposed and marking the mSets as invalid in mBlocks. To reconstruct consistency between the uLayer and mLayer, all deallocated uRuns should be removed from the uLayer as one operation. In so doing, consistency is obtained and deallocation is faster.

[0020] FIG. 1 is a schematic block diagram illustrating a storage system 100 having a data storage device 106 that may function as a storage device for a host device 104, according to certain embodiments. For instance, the host device 104 may utilize a non-volatile memory (NVM) 110 included in data storage device 106 to store and retrieve data. The host device 104 comprises a host dynamic random access memory (DRAM) 138. In some examples, the storage system 100 may include a plurality of storage devices, such as the data storage device 106, which may operate as a storage array. For instance, the storage system 100 may include a plurality of data storage devices 106 configured as a redundant array of inexpensive / independent disks (RAID) that collectively function as a mass storage device for the host device 104.

[0021] The host device 104 may store and / or retrieve data to and / or from one or more storage devices, such as the data storage device 106. As illustrated in FIG. 1, the host device 104 may communicate with the data storage device 106 via an interface 114. The host device 104 may comprise any of a wide range of devices, including computer servers, network-attached storage (NAS) units, desktop computers, notebook (i.e., laptop) computers, tablet computers, set-top boxes, telephone handsets such as so-called “smart” phones, so-called “smart” pads, televisions, cameras, display devices, digital media players, video gaming consoles, video streaming device, or other devices capable of sending or receiving data from a data storage device.

[0022] The host DRAM 138 may optionally include a host memory buffer (HMB) 150. The HMB 150 is a portion of the host DRAM 138 that is allocated to the data storage device 106 for exclusive use by a controller 108 of the data storage device 106. For example, the controller 108 may store mapping data, buffered commands, logical to physical (L2P) tables, metadata, and the like in the HMB 150. In other words, the HMB 150 may be used by the controller 108 to store data that would normally be stored in a volatile memory 112, a buffer 116, an internal memory of the controller 108, such as static random access memory (SRAM), and the like. In examples where the data storage device 106 does not include a DRAM (i.e., optional DRAM 118), the controller 108 may utilize the HMB 150 as the DRAM of the data storage device 106.

[0023] The data storage device 106 includes the controller 108, NVM 110, a power supply 111, volatile memory 112, the interface 114, a write buffer 116, and an optional DRAM 118. In some examples, the data storage device 106 may include additional components not shown in FIG. 1 for the sake of clarity. For example, the data storage device 106 may include a printed circuit board (PCB) to which components of the data storage device 106 are mechanically attached and which includes electrically conductive traces that electrically interconnect components of the data storage device 106 or the like. In some examples, the physical dimensions and connector configurations of the data storage device 106 may conform to one or more standard form factors. Some example standard form factors include, but are not limited to, 3.5″ data storage device (e.g., an HDD or SSD), 2.5″ data storage device, 1.8″ data storage device, peripheral component interconnect (PCI), PCI-extended (PCI-X), PCI Express (PCIe) (e.g., PCIe x1, x4, x8, x16, PCIe Mini Card, MiniPCI, etc.). In some examples, the data storage device 106 may be directly coupled (e.g., directly soldered or plugged into a connector) to a motherboard of the host device 104.

[0024] Interface 114 may include one or both of a data bus for exchanging data with the host device 104 and a control bus for exchanging commands with the host device 104. Interface 114 may operate in accordance with any suitable protocol. For example, the interface 114 may operate in accordance with one or more of the following protocols: advanced technology attachment (ATA) (e.g., serial-ATA (SATA) and parallel-ATA (PATA)), Fibre Channel Protocol (FCP), small computer system interface (SCSI), serially attached SCSI (SAS), PCI, and PCIe, non-volatile memory express (NVMe), OpenCAPI, GenZ, Cache Coherent Interface Accelerator (CCIX), Open Channel SSD (OCSSD), or the like. Interface 114 (e.g., the data bus, the control bus, or both) is electrically connected to the controller 108, providing an electrical connection between the host device 104 and the controller 108, allowing data to be exchanged between the host device 104 and the controller 108. In some examples, the electrical connection of interface 114 may also permit the data storage device 106 to receive power from the host device 104. For example, as illustrated in FIG. 1, the power supply 111 may receive power from the host device 104 via interface 114.

[0025] The NVM 110 may include a plurality of memory devices or memory units. NVM 110 may be configured to store and / or retrieve data. For instance, a memory unit of NVM 110 may receive data and a message from controller 108 that instructs the memory unit to store the data. Similarly, the memory unit may receive a message from controller 108 that instructs the memory unit to retrieve data. In some examples, each of the memory units may be referred to as a die. In some examples, the NVM 110 may include a plurality of dies (i.e., a plurality of memory units). In some examples, each memory unit may be configured to store relatively large amounts of data (e.g., 128 MB, 256 MB, 512 MB, 1 GB, 2 GB, 4 GB, 8 GB, 16 GB, 32 GB, 64 GB, 128 GB, 256 GB, 512 GB, 1 TB, etc.).

[0026] In some examples, each memory unit may include any type of non-volatile memory devices, such as flash memory devices, phase-change memory (PCM) devices, resistive random-access memory (ReRAM) devices, magneto-resistive random-access memory (MRAM) devices, ferroelectric random-access memory (F-RAM), holographic memory devices, and any other type of non-volatile memory devices.

[0027] The NVM 110 may comprise a plurality of flash memory devices or memory units. NVM Flash memory devices may include NAND or NOR-based flash memory devices and may store data based on a charge contained in a floating gate of a transistor for each flash memory cell. In NVM flash memory devices, the flash memory device may be divided into a plurality of dies, where each die of the plurality of dies includes a plurality of physical or logical blocks, which may be further divided into a plurality of pages. Each block of the plurality of blocks within a particular memory device may include a plurality of NVM cells. Rows of NVM cells may be electrically connected using a word line to define a page of a plurality of pages. Respective cells in each of the plurality of pages may be electrically connected to respective bit lines. Furthermore, NVM flash memory devices may be 2D or 3D devices and may be single level cell (SLC), multi-level cell (MLC), triple level cell (TLC), or quad level cell (QLC). The controller 108 may write data to and read data from NVM flash memory devices at the page level and erase data from NVM flash memory devices at the block level.

[0028] The power supply 111 may provide power to one or more components of the data storage device 106. When operating in a standard mode, the power supply 111 may provide power to one or more components using power provided by an external device, such as the host device 104. For instance, the power supply 111 may provide power to the one or more components using power received from the host device 104 via interface 114. In some examples, the power supply 111 may include one or more power storage components configured to provide power to the one or more components when operating in a shutdown mode, such as where power ceases to be received from the external device. In this way, the power supply 111 may function as an onboard backup power source. Some examples of the one or more power storage components include, but are not limited to, capacitors, super-capacitors, batteries, and the like. In some examples, the amount of power that may be stored by the one or more power storage components may be a function of the cost and / or the size (e.g., area / volume) of the one or more power storage components. In other words, as the amount of power stored by the one or more power storage components increases, the cost and / or the size of the one or more power storage components also increases.

[0029] The volatile memory 112 may be used by controller 108 to store information. Volatile memory 112 may include one or more volatile memory devices. In some examples, controller 108 may use volatile memory 112 as a cache. For instance, controller 108 may store cached information in volatile memory 112 until the cached information is written to the NVM 110. As illustrated in FIG. 1, volatile memory 112 may consume power received from the power supply 111. Examples of volatile memory 112 include, but are not limited to, random-access memory (RAM), dynamic random access memory (DRAM), static RAM (SRAM), and synchronous dynamic RAM (SDRAM (e.g., DDR1, DDR2, DDR3, DDR3L, LPDDR3, DDR4, LPDDR4, and the like)). Likewise, the optional DRAM 118 may be utilized to store mapping data, buffered commands, logical to physical (L2P) tables, metadata, cached data, and the like in the optional DRAM 118. In some examples, the data storage device 106 does not include the optional DRAM 118, such that the data storage device 106 is DRAM-less. In other examples, the data storage device 106 includes the optional DRAM 118.

[0030] Controller 108 may manage one or more operations of the data storage device 106. For instance, controller 108 may manage the reading of data from and / or the writing of data to the NVM 110. In some embodiments, when the data storage device 106 receives a write command from the host device 104, the controller 108 may initiate a data storage command to store data to the NVM 110 and monitor the progress of the data storage command. Controller 108 may determine at least one operational characteristic of the storage system 100 and store at least one operational characteristic in the NVM 110. In some embodiments, when the data storage device 106 receives a write command from the host device 104, the controller 108 temporarily stores the data associated with the write command in the internal memory or write buffer 116 before sending the data to the NVM 110. Controller 108 may include circuitry or processors configured to execute programs for operating the data storage device 106.

[0031] The controller 108 may include an optional second volatile memory 120. The optional second volatile memory 120 may be similar to the volatile memory 112. For example, the optional second volatile memory 120 may be SRAM. The controller 108 may allocate a portion of the optional second volatile memory to the host device 104 as controller memory buffer (CMB) 122. The CMB 122 may be accessed directly by the host device 104. For example, rather than maintaining one or more submission queues in the host device 104, the host device 104 may utilize the CMB 122 to store the one or more submission queues normally maintained in the host device 104. In other words, the host device 104 may generate commands and store the generated commands, with or without the associated data, in the CMB 122, where the controller 108 accesses the CMB 122 in order to retrieve the stored generated commands and / or associated data.

[0032] FIG. 2 is a schematic illustration of host created NSs 200 according to one embodiment. As shown in FIG. 2, the host device has created NS A and NS B through the NVMe controller using the PCI function. NS A and NS B are identified by NSID 1 and NSID 2.

[0033] Storage devices use logical-to-physical (L2P) mapping and use management tables with control data for dynamic mapping. The management tables are stored in flash memory (e.g., NAND), but in order to provide high performance management, copies are maintained in the controller RAM. Modern devices have dual-layered mapping architecture consisting of a Master Layer (mLayer) and an Update Layer (uLayer). The mLayer size is relatively big and the structure of the mLayer is regular (direct-access array). The uLayer size is much smaller and the structure of the uLayer is less regular. Mapping of the same logical block address (LBA) range can have a different size at different times.

[0034] The mLayer can be easily divided into equal segments (mSets), which can be saved to flash (i.e., memory device) and loaded from flash (i.e., swapped out and in) when needed. Low-RAM devices have a limited amount of RAM and therefore keep the uLayer of limited constant size regardless of the device capacity. The uLayer contains the most recent mapping in the form of ranges that allows for scanning only part, referred to as the Update Region (uRegion), of the uLayer during consolidation or translation. The purpose of the uLayer is to aggregate multiple control-updates for the same uRegion that has N mSets per uRegion, including consolidation of trapped uRegions. Each uRegion has an Update Header (uHeader) that contains the number of entries (uRun) in the uRegion and other information for the entire uRegion.

[0035] FIG. 3 is schematic illustration 300 of system administration tool (SAT) flash translation layer (FTL) components according to one embodiment. FIG. 3 illustrates the flat flash management unit (FMU) LBA (FFLBA) user's address space in 4 KB FMU granulation, delayed deallocation bitmap bits per mSet, erased bitmap bits per mSet, mBlocks, the uLayer, the mSet in uLayer bitmap, and CAT all types.

[0036] A multi-layer FTL has a complex FFLBA mapping structure, so consistent updating of each component of mapping with a single FMU requires many operations that is not a problem for a single FMU but might lead to timeout or to poor performance for millions updates in a format NVMe NS / huge deallocation case. A huge deallocation case is where the deallocation is sufficiently large that a significant amount of memory or resources will be freed up or released during the deallocation.

[0037] When a command (or several collected commands) with a huge deallocation is received, the FTL has a time slice for the huge deallocation command only, without handling other commands during deallocation processing. Thus, if the FTL can logically deallocate user data by each entire layer, or a large part of a layer, the FTL can reduce timing of such a long operation if the FTL doesn't have to worry about supporting consistency of each component for correct executing read / write / flash etc. command in parallel.

[0038] The limitation of wasting inconsistency during a format NVMe NS / huge deallocation is that the front end (FE) module should provide the following: there is no read / write / flash etc. command in FTL; and all cache types / overlap tables must be empty during format / deallocation of a specific NS in a single / multiple NS system.

[0039] For a simple example, if needing to destroy an entire building with many apartments on each floor, the contractor doesn't need to destroy each system (i.e., electricity, water, canalization, etc.) in each apartment, apartment by apartment. The contractor can destroy the building by destroying each system in the building and then destroying the entire building, and such a method will be faster. In a deallocation situation, after the huge deallocation operation is completed, the FTL mapping must be restored to consistency. Thus, the data storage device can avoid a timeout and improve performance using a controlled inconsistency method for one single NS or multiple NS systems.

[0040] Previously, the controller executed deallocation by mSets, such as by parts of mSet, by FMU, by group of FMUs, supporting consistency of each FTL component. Deallocation by mSet allows delaying deallocation and to distribute deallocation overhead between the next read / write operations but doesn't help when the FTL needs to execute a huge deallocation immediately. The idea discussed herein is to simplify a huge deallocation.

[0041] From a FE NVMe point of view, there are a few limitations. One limitation is that if there is one NS, then all I / O commands are stopped for that NS during execution of a format NVMe command so that the I / O commands will not interfere with the format, and the format can proceed without any interference. However, if there are a number of NSs on the data storage device, the host device can request to format one NS and can continue to send I / O commands to other NSs. As discussed herein, postponing the I / O commands while ensuring the I / O commands do not timeout due to the format command takes a long time.

[0042] The postponing can be initiated by the FTL or FE. In some cases it is better that the FTL initiates the deallocation because of a desire to perform an allocation of resources and request to suspend I / O operations from the FE. The FE can suspend I / O commands for some cases when the data storage device receives the format or deallocation command from the host device.

[0043] More specifically, the first limitation is related to the fact that the data storage device receives format NVM commands for all media (i.e., all media represents one NS or a format sent to the data storage device and broadcast for all NSs). In such a case, the data storage device stops processing any I / O commands and can perform the format NVM without any I / O intervention. The second limitation relates to multiple NSs. The format NVM can be done on a per NS basis so that a format NVM to NSx applies to NSx and I / O commands can still be processed for NSy. The FE firmware (FW) will have a mechanism to postpone those I / O commands until the format NSx finishes. The FTL can use a delayed deallocation algorithm. The FTL can initiate, for some internal purpose, data deallocation. In such a case, the FTL should inform the FE about the procedure and the FE should apply the same I / O postponing mechanism as discussed above. The I / O suspend / resume can have internal and external triggers from the FTL point of view. If it takes too long for the FTL to deallocate data while there are pending I / O commands, the FE can request to stop deallocation and resume I / O command processing. When the FTL needs to handle the deallocation, the FTL can request the FE to suspend I / O operations for some period of I / O processing. Sometimes the FTL initiates the deallocation, and sometimes the FE initiates deallocation.

[0044] The embodiments discussed herein relate to deallocation. First, all deallocated ranges are represented in the delayed deallocate bitmap in FIG. 3, and the loop over each positive bit (mSetID) can be executed immediately or postponed for a later write / bkops (background operations). Second, the legacy SAT components and basses in the delayed deallocate bitmap (mSets that need to be deallocated), Erased Bitmap (mSets that have already been deallocated), and mSets_In_uLayer Bitmap (mSets that have the latest updates in uLayer) are used. Third, the FE module should ensure that there is no read / write / flash etc. command in the FTL for a specific NS, all cache types / overlap tables must be empty before FTL receives a deallocate command or format NVM with deallocate as part of the format. The three conditions are correct for each specific NS in a single / multiple NS system.

[0045] In case of format NVMe with erase user data, the deallocation operation for the entire NS must be executed and completed immediately. FIG. 4A-4C show a comparison of two deallocation methods. The method in FIG. 4A is slower than the proposed fast deallocation method for a single NS shown in FIGS. 4B and 4C.

[0046] FIG. 4A shows a good algorithm for distribution of deallocation overhead where the data storage device doesn't need to do the deallocation immediately. However, in case of format NVMe with erase user data, the data storage device needs to deallocate all of the memory device or a big part of the memory device and thus the data storage device does not need to distribute overhead. The data storage device needs to perform the deallocation as fast as possible, which renders FIG. 4A potentially too slow.

[0047] FIG. 4B shows that the data storage device starts with the same deallocation bit map. If there is a bit set for an mSet, the controller would usually need to update the uLayer with a uRun for the entire deallocated mSet with invalid JBA, but in FIG. 4B, there is no updates of the uLayer and as a result the controller doesn't need to perform a consolidation. If the controller does a consolidation, the controller needs to load an mSet and merge with a uLayer, update the VC count and mSet, do a consolidation, save the mSet on the flash (i.e., FIG. 4A). For a fast deallocation, the controller needs to just extract the VCs (valid counters) after merging the mSet with all previous uRuns in uLayer without long merge of deallocated uRun for the entire mSet because the controller does not update the uLayer (i.e., FIG. 4B). The other operations can be skipped on the mLayer Deallocation stage.

[0048] As shown in FIG. 4B, the controller can take the previous location and update the previous location and then mark the mSet as invalid in the mBlock without a need to save the mSet on flash, but as a negative effect, consistency is lost. The controller handles the mSet and marks the mSet as invalid, but the uLayer still contains updates so the data storage device has lost consistency. If there are any read commands, the controller tries to load the mSet and the mSet is invalid and there are updates from the uLayer to obtain. However, it is inconsistent because the mapping is invalid while the uLayer is valid. So the data storage device has lost consistency because the uLayer still has valid data.

[0049] After the deallocation of all mSets, the data storage device can handle the uLayer for restoring consistency (See FIG. 4C). The controller loops on each region in the uLayer and checks if the mSet for the uLayer is deallocated according to the bitmap. If deallocated, the controller can remove all uRuns that belong to the same mSet for the uLayer. Usually there are bits in the bitmap and so the controller can remove each region and probably in last region there is some data, but maybe not, or if there are several NSs, the data storage device probably has some deallocated data and for storage consistency, other data is still valid for another mSet.

[0050] Another positive impact is status. In FIG. 4A, the uLayer is fully filled with uRuns and on the next update, and the controller will we need to do back-to-back consolidations for each new write command. In FIG. 4B, the uLayer is about empty after synchronization. The mBlocks are fully invalid and for the next write the controller needs to do a relocation. Thus, for FIG. 4B, the mBlock is about empty.

[0051] When there is a NSx and a NSy, a deallocation of NSy should proceed and I / O commands can be processed for NSx with suspend resume. The FE can trigger a suspend for a specific NS and the FTL will continue with the format of another NS. A trigger from the FTL for a deallocation can trigger the suspend and stop the deallocation so that the I / O commands can be processed by the FTL.

[0052] More specifically with regards to FIG. 4A, the flowchart 400 shows a loop on delayed deallocation bitmap until the last bit mSetID is performed at block 402 followed by a determination at block 404 regarding whether the mSetID is set. If the mSetID is not set, the process loops back to block 402, but if the mSetID is set, then the uLayer is updated with a deallocated mSetID at block 406. The mSet is loaded and merged with the uLayer including a uRun with 16 KB of invalid jumbo block address (JBA) at block 408. A determination is then made at block 410 regarding whether consolidation is needed. If consolidation is not needed, then the process loops back to block 402. If consolidation is needed, then any mSet is loaded and merged with a uLayer including a uRun with 16 KB LBA at block 412. The consolidated mSet with invalid JBA is saved to an mBlock in the memory device, including RLC mSets in the mBlock at block 414.

[0053] More specifically with regards to FIG. 4B, the flowchart 450 shows a much simpler flow. After block 404, there is no updating the uLayer with deallocated mSetID and no consolidation. Rather, the mSet is loaded and merged with the uLayer including the uRun, and the VC is updated in the mSet at block 452. Thereafter, the mSet is marked as invalid in the mBlock at block 454. It is noted that because there is no updated the uLayer and no consolidation, there is a loss of consistency.

[0054] More specifically with regards to FIG. 4C, the flowchart 460 illustrates restoring of consistency. The process begins at block 462 where there is a loop on each uRegion in a uLayer. Thereafter, there is a check to restore consistency in FTL mapping at block 464. At block 466, a determination is made regarding whether all bits (mSetIDs) in the uLayer bitmap have the same bits as in the erased bitmap. If there is a match between bitmaps, then at block 468, all ultems are removed from the uRegion, but if there is no match, then the uRuns are copied back for each not erased mSet in the uRegion at block 470.

[0055] More specifically with regards to FIG. 4A, the FTL SAT status after the deallocation method is that the uLayer is fully filled by uRuns with invalid JBA that will leads to many back to back consolidations during new write commands. As such, the mBlocks are fully filled by mSets with invalid JBAs that will lead to many back to back MTM RLC during new consolidations. Comparing with FIG. 4B, the FTL SAT status after the deallocation is that the uLayer is about empty and ready for new updates and the mBlocks are about empty.

[0056] For multiple NSs, NVMe formatting can be performed for each NS. While formatting is in progress on NS X on the device, the host device can send I / O commands to NS Y. In this case, the data storage device can exploit the following fact: the entire mSet belongs to only one NS: either NS X or NS Y. Thus, the FTL can use the temporary sync erased bitmap (bit per mSetID) to fast deallocate mSets in NS X. The uLayer will be synchronized with a temporary sync erased bitmap and then, all bits from the sync erased bitmap will be moved to the common erased bitmap, and the temporary sync erased bitmap can be freed.

[0057] Any requirement to stop deallocation in a format NVMe requires a special new mechanism related to format suspend / resume in FE and in FTL by replacing block 402 in FIG. 4B with a loop on delayed deallocate bitmap until the last mSetID or setting flag suspend format. A fast deallocation can also be used for any group of uRegions. The fast deallocation will be executed for each group which will combine the fast deallocation for each group and delayed deallocation as the control algorithm.

[0058] FIG. 5 is a flowchart 500 illustrating a fast deallocation method according to one embodiment. Initially a deallocation command is received at block 502. A determination is then made regarding whether the command is for a specific NS at block 504. If not for a specific NS, then all I / O commands are stopped and the deallocation is performed for the entire memory device at block 506. If the command is for a specific NS, then a determination is made regarding whether I / O commands can be executed on the other NS while the deallocation is performed for the specific NS at block 508. If the I / O cannot be performed, then the I / O commands are paused for the other NS at block 510 followed by block 512. If the I / O commands can be performed, then the process proceeds to block 512 where the deallocation occurs by marking the mSets for the NS as invalid in the mBlock. A determination is then made at block 516 regarding whether the bits in the uLayer bitmap match the bits in the erase bitmap. If there is a match, then all uRuns are removed from the uRegion at block 518 and the IO operations can resume at block 522. If the bits do not match at block 516, then the uRuns for each not erased mSet in the uRegion are copied back at block 520 followed by block 522.

[0059] Generally speaking the fast deallocation involves not worrying about consistency, but instead, focusing on the deallocation. Once the deallocation is complete, then the consistency can be dealt with by restoring the consistency. Dealing with consistency while performing the deallocation leads to a slower deallocation. The embodiments herein enable fast deallocation by focusing on the deallocation and dealing with the consistency after the deallocation is complete. The embodiments herein take advantage of the fact that if the FTL can logically deallocate user data by each entire layer, or a large part of a layer, the FTL can reduce timing of such a long deallocation operation if the FTL doesn't have to worry about supporting consistency of each component for correct executing read / write / flash etc. command in parallel.

[0060] An example of an asynchronous internal trigger is to start a control sync operation and determine if the format NVM is on a fast deallocation process. If fast deallocation, the set a flag to suspend the format operation which leads to an exit from the loop in FIG. 4B and performing mapping consistency recovery. Once a control sync operation completes, if the format NVM command was suspended, then a resume format with fast deallocation can occur.

[0061] The embodiments herein avoid the long normal deallocate operations and any normal or back-to-back consolidations. The embodiments herein extract only the useful information (i.e., VC counters per JBlocks) and discard all other information in the mLayer according to deallocated ranges. Stated another way, the embodiments herein make the huge deallocate and consolidation faster by not performing deallocations and consolidations at all and then restore the consistency between uLayer and mLayer. The embodiments herein will solve the problem of timeout host huge deallocate command and problem of timeout huge deallocate stage into sanitize / format NVMe with erase user data for a specific NS in multiple / single NS systems. The fast deallocate method reduces overhead in the mLayer (no mSet updates), uLayer (no uLayer updates), and reduces write amplification (WA) because of no consolidation and as result, writing on flash. The fast deallocation method improves deallocate performance and reduces WA of saving of mSets. The uLayer is about empty after the fast deallocation operation and ready for new updates. The fast deallocation method is universal and can be used for one or more NSs, for the uRegions group, and is also adapted for the suspend / resume format / deallocate command. Thus, the embodiments herein result in improved deallocation.

[0062] In one embodiment, a data storage device comprises: a memory device; and a controller coupled to the memory device, wherein the controller is configured to: loop on a delayed deallocated bitmap until a last bit mSetID; determine whether a mSetID bit is set; load an mSet and merge the mSet with a uLayer; update a validity counter in the mSet; and mark the mSet as invalid in an mBlock. A FTL of the controller is configured to initiate deallocation. The FTL is configured to inform a FE module of the controller about the deallocation. The FE module postpones I / O commands. The deallocation is on a per NS basis. The controller is configured to perform I / O commands for a first NS and the deallocation for a second NS that is separate and distinct from the first NS. The FTL is configured to request a FE module to suspend I / O commands. The FE module is configured to request the FTL pause deallocation for I / O commands to be executed. The FTL is configured to resume the deallocation after I / O commands are executed. A FE module of the controller is configured to ensure that all overlap tables and cache are empty before a FTL receives a deallocation command or a format NVM command.

[0063] In another embodiment, a data storage device comprises: a memory device; and a controller coupled to the memory device, wherein the controller is configured to: execute a fast deallocation command, wherein the controller is configured to lose consistency when executing the fast deallocation command; determine if all bits in a uLayer bitmap are equal to bits in an erase bitmap; and restore consistency after the determining. The controller is configured to loop on each region within a uLayer. The controller is configured to determine if a uRun in a uLayer is associated with a deallocated mSet that matches both bits in the uLayer bitmap and in the erase bitmap. The controller is configured to remove all uRuns that belong to the mSet for the uLayer when the mSet is deallocated. The deallocation command is initiated by a FTL. The deallocation command is initiated by a FE module. The FE module is configured to ensure that there are no commands in a FTL for a specific NS on which the deallocation is performed.

[0064] In another embodiment, a data storage device comprises: means to store data; and a controller coupled to the means to store data, wherein the controller is configured to: execute a deallocation command for a first namespace (NS), wherein the first NS loses consistency during execution of the deallocation command; execute input / output (I / O) commands for a second NS; pause execution of the I / O commands while the deallocation command is executed; pause execution of the deallocation command while the I / O commands are executed; determine when to pause execution of the deallocation command; and determine when to pause the execution of the I / O commands. The executing the I / O commands and executing the deallocation command occurs in parallel and using the execution of the I / O commands and pausing the execution of the deallocation command occur in isolation. The controller is configured to have an asynchronous internal trigger to start a control sync operation and determine if a format NVM is on a fast deallocation process

[0065] While the foregoing is directed to embodiments of the present disclosure, other and further embodiments of the disclosure may be devised without departing from the basic scope thereof, and the scope thereof is determined by the claims that follow.

Claims

1. A data storage device, comprising:a memory device; anda controller coupled to the memory device, wherein the controller is configured to:loop on a delayed deallocated bitmap until a last bit mSetID;determine whether a mSetID bit is set;load an mSet and merge the mSet with a uLayer;update a validity counter in the mSet; andmark the mSet as invalid in an mBlock.

2. The data storage device of claim 1, wherein a flash translation layer (FTL) of the controller is configured to initiate deallocation.

3. The data storage device of claim 2, wherein the FTL is configured to inform a front end (FE) module of the controller about the deallocation.

4. The data storage device of claim 3, wherein the FE module postpones input / output (I / O) commands.

5. The data storage device of claim 2, wherein the deallocation is on a per namespace (NS) basis.

6. The data storage device of claim 5, wherein the controller is configured to perform input / output (I / O) commands for a first NS and the deallocation for a second NS that is separate and distinct from the first NS.

7. The data storage device of claim 2, wherein the FTL is configured to request a front end (FE) module to suspend input / output (I / O) commands.

8. The data storage device of claim 7, wherein the FE module is configured to request the FTL pause deallocation for I / O commands to be executed.

9. The data storage device of claim 8, wherein the FTL is configured to resume the deallocation after I / O commands are executed.

10. The data storage device of claim 1, wherein a front end (FE) module of the controller is configured to ensure that all overlap tables and cache are empty before a flash translation layer (FTL) receives a deallocation command or a format nonvolatile memory (NVM) command.

11. A data storage device, comprising:a memory device; anda controller coupled to the memory device, wherein the controller is configured to:execute a fast deallocation command, wherein the controller is configured to lose consistency when executing the fast deallocation command;determine if all bits in a uLayer bitmap are equal to bits in an erase bitmap; andrestore consistency after the determining.

12. The data storage device of claim 11, wherein the controller is configured to loop on each region within a uLayer.

13. The data storage device of claim 12, wherein the controller is configured to determine if a uRun in a uLayer is associated with a deallocated mSet that matches both bits in the uLayer bitmap and in the erase bitmap.

14. The data storage device of claim 13, wherein the controller is configured to remove all uRuns that belong to the mSet for the uLayer when the mSet is deallocated.

15. The data storage device of claim 11, wherein the deallocation command is initiated by a flash translation layer (FTL).

16. The data storage device of claim 11, wherein the deallocation command is initiated by a front end (FE) module.

17. The data storage device of claim 16, wherein the FE module is configured to ensure that there are no commands in a flash translation layer (FTL) for a specific namespace (NS) on which the deallocation is performed.

18. A data storage device, comprising:means to store data; anda controller coupled to the means to store data, wherein the controller is configured to:execute a deallocation command for a first namespace (NS), wherein the first NS loses consistency during execution of the deallocation command;execute input / output (I / O) commands for a second NS;pause execution of the I / O commands while the deallocation command is executed;pause execution of the deallocation command while the I / O commands are executed;determine when to pause execution of the deallocation command; anddetermine when to pause the execution of the I / O commands.

19. The data storage device of claim 18, wherein the executing the I / O commands and executing the deallocation command occurs in parallel, and wherein pausing the execution of the I / O commands and pausing the execution of the deallocation command occur in isolation.

20. The data storage device of claim 18, wherein the controller is configured to have an asynchronous internal trigger to start a control sync operation and determine if a format NVM is on a fast deallocation process.

Citation Information

Patent Citations

  • Aligned And Unaligned Data Deallocation

    US20230315296A1

  • Efficient consolidation for two layer ftl

    US20240289268A1

  • Storage system-based hole punching for reclaiming unused space from a data container

    US8086652B1