Search

US-12625632-B2 - Data retention for efficient consolidation processing in NVM

US12625632B2US 12625632 B2US12625632 B2US 12625632B2US-12625632-B2

Abstract

When performing a consolidation process, entries (uRuns) in the update region (uRegion) of an update layer (uLayer) are typically erased immediately after the data in the uRuns is updated to a master layer (mLayer). The data may, at a later time, be copied back to the uRuns for read purposes. Rather than erasing the uRuns and then copying the data back to the uRuns for read purposes, the uRuns can simply not be erased after the consolidation. If space is needed, the uRuns can be erased without any need for consolidation. Furthermore, if another consolidation process occurs, the uRuns that were previously consolidated, but not erased, can simply be erased.

Inventors

  • Marina Frid
  • Vered Kelner
  • Igor Genshaft

Assignees

  • SanDisk Technologies, Inc.

Dates

Publication Date
20260512
Application Date
20240408

Claims (20)

  1. 1 . A data storage device, comprising: a memory device; and a controller coupled to the memory device, wherein the controller is configured to: determine that an update layer (uLayer) has reached a consolidation threshold, wherein the determining is due to a no free items trigger; update a master layer (mLayer) with data from the uLayer; erase less than all data from the uLayer, wherein at least some data remains in the uLayer after the mLayer has been updated; and add additional data to the uLayer.
  2. 2 . The data storage device of claim 1 , wherein the uLayer contains both data that has been updated to the mLayer and the additional data after the adding, wherein the additional data has not be updated to the mLayer.
  3. 3 . The data storage device of claim 1 , wherein the controller is configured to maintain a tracking mechanism to track data in the uLayer that has already been updated to the mLayer.
  4. 4 . The data storage device of claim 3 , wherein the tracking mechanism is a bitmap.
  5. 5 . The data storage device of claim 1 , wherein the controller is configured to erase the at least some data from the uLayer after the adding.
  6. 6 . The data storage device of claim 5 , wherein the erasing the at least some data is in response to a determination that storage space is needed in the uLayer.
  7. 7 . The data storage device of claim 6 , wherein the at least some data is not updated to the mLayer after the adding and before the erasing the at least some data.
  8. 8 . The data storage device of claim 1 , wherein the controller is configured to read the at least some data from the uLayer in response to a read request received after the erasing.
  9. 9 . The data storage device of claim 1 , wherein the at least some data is sequential data.
  10. 10 . The data storage device of claim 1 , wherein the controller is configured to perform a consolidation after the adding, wherein during the consolidation, the at least some data is not updated to the mLayer.
  11. 11 . The data storage device of claim 1 , wherein the controller is further configured to update the mLayer with a portion of the data from the uLayer prior to reaching a consolidation threshold, wherein the portion of the data remains in the uLayer.
  12. 12 . A data storage device, comprising: a memory device; and a controller coupled to the memory device, wherein the controller is configured to: track one or more uRuns of an update layer (uLayer) that remain in the uLayer after updating a master layer (mLayer), wherein the one or more uRuns of the uLayer remaining in the uLayer are sequential uRuns, wherein the one or more uRuns are tracked in a bitmap with one bit of the bitmap delegated to each uRun of the one or more uRuns; determine that a consolidation process needs to occur, wherein the determining is due to a no free items trigger; and read data from the one or more uRuns after performing a consolidation process.
  13. 13 . The data storage device of claim 12 , wherein the controller is configured to erase the one or more uRuns without re-updating the mLayer with the one or more uRuns.
  14. 14 . The data storage device of claim 13 , wherein the controller is configured to change a corresponding bitmap bit to 0 for each of the erased one or more uRuns.
  15. 15 . The data storage device of claim 12 , wherein the one or more uRuns are sequential.
  16. 16 . The data storage device of claim 12 , wherein the uLayer contains both data that has been updated to the mLayer and data that has not be updated to the mLayer.
  17. 17 . A data storage device, comprising: means to store data; and a controller coupled to the means to store data, wherein the controller is configured to: determine that a consolidation process of data stored in an update layer (uLayer) needs to occur, wherein the determining is due to a no free items trigger; perform the consolidation process of data stored in the uLayer, wherein the consolidation process comprises updating a master layer (mLayer) with data from the uLayer; and maintain at least some data in the uLayer that was used to update the mLayer.
  18. 18 . The data storage device of claim 17 , wherein the at least some data is disposed in one or more uRuns.
  19. 19 . The data storage device of claim 18 , wherein the one or more uRuns are tracked in a bitmap with one bit of the bitmap delegated to each uRun of the one or more uRuns.
  20. 20 . The data storage device of claim 17 , wherein the controller is configured to read the at least some data from the uLayer in response to a read request received after the erasing.

Description

BACKGROUND OF THE DISCLOSURE Field of the Disclosure Embodiments of the present disclosure generally relate to improving read translation after sequential write operations. Description of the Related Art 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 random access memory (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. The mLayer can be easily divided into equal segments (mSets), which can be saved to flash and loaded from flash (i.e., swapped out and in) when needed. Dividing the uLayer into such segments is not trivial. Low-RAM devices have a limited amount of RAM and therefore the RAM keeps a small 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. The best aggregation of multiple control updates can be reached on sequential writes or preconditions. However, aggregation can lead to a huge number of back to back consolidations when random writes occur after sequential writes. Therefore, there is a need in the art for improved consolidation after sequential writes. SUMMARY OF THE DISCLOSURE When performing a consolidation process, entries (uRuns) in the update region (uRegion) of an update layer (uLayer) are typically erased immediately after the data in the uRuns is updated to a master layer (mLayer). The data may, at a later time, be copied back to the uRuns for read purposes. Rather than erasing the uRuns and then copying the data back to the uRuns for read purposes, the uRuns can simply not be erased after the consolidation. If space is needed, the uRuns can be erased without any need for consolidation. Furthermore, if another consolidation process occurs, the uRuns that were previously consolidated, but not erased, can simply be erased. 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: determine that an update layer (uLayer) has reached a consolidation threshold; update a master layer (mLayer) with data from the uLayer; erase less than all data from the uLayer, wherein at least some data remains in the uLayer after the mLayer has been updated; and add additional data to the uLayer. 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: track one or more uRuns of an update layer (uLayer) that remain in the uLayer after updating a master layer (mLayer), wherein the one or more uRuns of the uLayer remaining in the uLayer are sequential uRuns, wherein the one or more uRuns are tracked in a bitmap with one bit of the bitmap delegated to each uRun of the one or more uRuns; and read data from the one or more uRuns after performing a consolidation process. 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: perform a consolidation process of data stored in an update layer (uLayer), wherein the consolidation process comprises updating a master layer (mLayer) with data from the uLayer; and maintain at least some data in the uLayer that was used to update the mLayer. BRIEF DESCRIPTION OF THE DRAWINGS 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. 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. FIG