Embodiments of the present disclosure generally relate to more efficient delta buffer utilization via compression.
Flash storage logical to physical (L2P) updates are queued in a delta buffer prior to updating the L2P table in the storage media. The delta buffer utilization has many impacts over the device storage. Random write (RW) performance and write amplification factor (WAF) and even random read (RR) performance can be impacted.
The delta buffer size is set according to the optimal size that satisfies the requirements of the storage system. RW performance requires a very large delta to maximize the ratio of host write and management write. The delta buffer size, however, is limited by the RAM available, scan time requirements, and alignment to storage write page size.
One manner to address the delta issue is to maintain the L2P table as a queue of L2P entries. Logical block address (LBA) and physical block address (PBA) and mapping run length are used as the storage mapping in the delta buffer. However, the amount of delta entries that can be present is limited by the delta buffer size divided by the delta buffer entry size. For a 10 KB RAM with an entry size of 8 bytes, the maximum amount of entries is 1280 entries. If the storage WAF and RW requires more than 1280 entries, more RAM can be allocated, which increases costs of the device.
Therefore, there is a need in the art for more efficient delta utilization.
The present disclosure generally relates to more efficient use of a delta buffer. To utilize the delta buffer, an efficiency can be gained by utilizing absolute delta entries and relative delta entries. The absolute delta entry will include the type of delta entry, the L2P table index, the L2P table offset, and the PBA. The relative delta entry will include the type of delta entry, the L2P table offset, and the PBA offset. The relative delta entry will utilize about half of the storage space of the absolute delta entry. The relative delta entry can be used after an absolute delta entry so long as the relative delta entry is for data stored in the same block as the previous delta entry. If data is stored in a different block, then the delta entry will be an absolute delta entry.
In one embodiment, a data storage device comprises: one or more memory devices; and a controller coupled to the one or more memory devices, wherein the controller is configured to: determine that a plurality of entries for a delta buffer logical to physical (L2P) table correspond to a same data block; create an absolute delta L2P entry, wherein the absolute delta L2P entry comprises a first number of bits; store the absolute delta L2P entry in the delta buffer L2P table; create a relative delta L2P entry, wherein the relative delta L2P entry comprises a second number of bits and wherein the first number of bits is greater than the second number of bits; and store the relative delta L2P entry in the delta buffer L2P table.
In another embodiment, a data storage device comprises: one or more memory devices; and a controller coupled to the one or more memory devices, wherein the controller is configured to: encode a first delta logical to physical (L2P) entry; determine that the first delta L2P entry is an absolute entry; enter the first delta L2P entry into a delta buffer, wherein the first delta L2P entry has a delta entry physical block address (PBA) equal to a PBA; encode a second delta L2P entry; determine that the second delta L2P entry is a relative entry; and enter the second delta L2P entry into the delta buffer wherein the second delta L2P entry has a delta entry PBA offset equal to an offset from the PBA.
In another embodiment, a data storage device comprises: one or more memory devices; and means to enter a plurality of delta logical to physical (L2P) entries into a delta buffer, wherein at least one entry of the plurality of delta L2P entries contains information relative to another entry of the plurality of delta L2P entries.
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.
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.
In the following, reference is made to embodiments of the disclosure. However, it should be understood that the disclosure is not limited to specific 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).
The present disclosure generally relates to more efficient use of a delta buffer. To Utilize the delta buffer, an efficiency can be gained by utilizing absolute delta entries and relative delta entries. The absolute delta entry will include the type of delta entry, the L2P table index, the L2P table offset, and the PBA. The relative delta entry will include the type of delta entry, the L2P table offset, and the PBA offset. The relative delta entry will utilize about half of the storage space of the absolute delta entry. The relative delta entry can be used after an absolute delta entry so long as the relative delta entry is for data stored in the same block as the previous delta entry. If data is stored in a different block, then the delta entry will be an absolute delta entry.
The host device 104 stores and/or retrieves data to and/or from one or more storage devices, such as the data storage device 106. As illustrated in
The data storage device 106 includes a controller 108, NVM 110, a power supply 111, volatile memory 112, the interface 114, and a write buffer 116. In some examples, the data storage device 106 may include additional components not shown in
The interface 114 of the data storage device 106 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. The 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 (DATA)), 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. The electrical connection of the interface 114 (e.g., the data bus, the control bus, or both) is electrically connected to the controller 108, providing 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 the interface 114 may also permit the data storage device 106 to receive power from the host device 104. For example, as illustrated in
The NVM 110 may include a plurality of memory devices. NVM 110 may be configured to store and/or retrieve data in response to a command from the host device 104. For instance, a memory device of NVM 110 may receive data and a message from the controller 108 that instructs the memory unit to store the data. Similarly, the memory device of NVM 110 may receive a message from the controller 108 that instructs the memory device to retrieve data. In some examples, each of the memory devices may be referred to as a die. In some examples, a single physical chip may include a plurality of dies (i.e., a plurality of memory units). In some examples, each memory device 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.).
In some examples, each memory device of NVM 110 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, magnetoresistive random-access memory (MRAM) devices, ferroelectric random-access memory (F-RAM), holographic memory devices, and any other type of non-volatile memory devices.
The NVM 110 may comprise a plurality of flash memory devices. 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 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.
The data storage device 106 includes a power supply 111, which 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 the 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, supercapacitors, 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.
The data storage device 106 also includes volatile memory 112, which may be used by controller 108 to store information. Volatile memory 112 may include one or more volatile memory devices. As illustrated in
The data storage device 106 includes a controller 108 which may manage one or more operations of the data storage device 106. For instance, the controller 108 may manage the reading of data from and/or the writing of data to the NVM 110. Furthermore, the controller 108 is coupled to the buffer 116 via a flash bus 118, where the flash bus 118 facilitates the transfer of data between the controller 108 and the buffer 116. In one embodiment, the flash bus 118 may facilitate the transfer of data between the NVM 110 and the controller 108 and/or between the volatile memory 112 and the controller 108. 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.
The controller 108 may determine at least one operational characteristic of the storage system 100 and store the at least one operational characteristic 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 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. The controller further includes a first flash transition layer (FTL) module 120. The first FTL module 120 may include one or more FTL tables configured to track the location of the newly updated data in the NVM 110, such that each read command for the newly updated data is routed to the appropriate location, ensure that newly programmed pages of the NVM 110 are evenly distributed across the NVM 110 to aid in wear leveling, and track the location of the outdated or invalid data, such that the one or more pages including the outdated or invalid data may be erased in a flash management operation such as garbage collection.
The L2P delta table includes a plurality of regions and a plurality of table parts. Each region of the plurality of regions describes a portion of the total LBA span and each table part is the resolution (i.e., the size of data) of the LBA and the PBA. In one embodiment, the number of regions is about 64 regions. In another embodiment, the number of regions is greater than about 64 regions. The LBA range (e.g., 0-191) is a continuous range that wraps around to the next table part after reaching the last region of the current table part. For example, in table part 1, 0-63 LBAs are shown. The 65th LBA, LBA 64, is located on the next table part and in region 0. Furthermore, an offset in the table part is a number of locations from the first location (i.e., region 0) of a table part. For example, LBA 65 has an offset of 1 because LBA 65 is the 2nd LBA of the table part 2.
For a given LBA, such as LBA 12,345,678, the region, table part, and the offset in the table part may be calculated using the following formulas:
table_part=LBA/table size in LBA units,
offset_in_table_part=LBA % table size in LBA units, and
region=table_part % region count.
The “/” is an integer divide operator, where the resulting value is rounded down. The “%” is an integer Modulus operator, where the result is the remainder of the “/” operation.
For example, when the LBA units has a size of about 4096 B, the total table size in LBA units is about 8192 B because the total table size in LBA size units is calculated as LBA PBA=total table size in LBA size units, where the size of the PBA is substantially equal to the size of the LBA, Furthermore, as illustrated by Table 1, the region count is 64 (i.e., the number of regions between Region 0 and Region 63).
The table_part is calculated as 12,345,678/8192 or 1507.04. However, because the “/” is an operation that rounds the value down, the resulting table_part number is 1507. The offset_in_table_part is calculated as 12,345,678% 8192 or 1507.04. However, because the “%” is a Modulus operation, the resulting offset_in_table_part is 334. The region is calculated as 1507% 64 or 35. Therefore, when looking up the LBA 12,345,678 in Table 1, the LBA 12,345,678 is found at region 35, table part 1507 with an offset of 334. When new data, such as data from a host device 104 of
The absolute delta L2P entry 200 is a standalone or an absolute entry with an independent translation capability, were the LBA and the PBA are written in full resolution. The absolute delta L2P entry 200 does not depend on any other structure. The relative delta L2P entry 250 may be a compressed delta L2P entry that includes less information than the absolute delta L2P entry 200. One or more delta L2P entries may follow the absolute L2P entry 200, such that the each of the relative delta L2P entries depends on the prior absolute delta L2P entry 200. For example, each of the relative delta L2P entries that follow the absolute L2P entry 200 have the same table_part as the absolute L2P entry 200.
A first bit is utilized to describe the type of the L2P delta entry. Furthermore, the table part size of about 32 KB maps to 32 KB/4 or about 8K entries. Thus, about 13 bits are used to describe the offset in the table part. The table part count or the L2P_table_part_index is calculated as 256 M (LBAs)/8K (table part size) or about 32K indexes. The about 32K indexes translates to about 15 bits. Thus, the total bit size of the LBA is about 1+15+13+3 (spare bits) or about 32 bits. Because the PBA size is substantially equal to the LBA size, the total size of the absolute delta entry structure is about 64 bits. The PBA size includes 28 bits utilized for the PBA and 4 additional bits associated with the PBA or used for other purposes. In some embodiments, the number of bits of the absolute delta entry structure or a first number of bits is between about 55 bits and about 64 bits, where the lower bound illustrates no spare bits and the upper bound illustrates including the spare bits previously described.
The PBA offset describes the distance from the last absolute PBA, such as the PBA described in the absolute delta entry structure of
When data is written to a different L2P_table_part_index, such as the fourth entry, an absolute delta L2P entry is written to the region indicating a change in the table part index. The absolute delta L2P entry of the fourth entry follows the same format as the absolute delta L2P entry of the first entry. The next absolute delta L2P entry is the sixth entry. The sixth entry returns back to the first open block, the block associated with the first absolute delta L2P entry.
A new absolute delta L2P entry may be written after a threshold value of the PBA offset is exceeded. The threshold value may be about 16K or about 14 bits. For example, the third absolute delta L2P entry having the fields 25, 101, and 40,090 is followed by the fourth absolute delta L2P entry having the fields of 25, 3489, and 58,943. Though the third absolute delta L2P entry and the fourth absolute delta L2P entry have the same table part entry, the fourth absolute delta L2P entry is written as an absolute delta L2P entry because the entry has exceeded the threshold value.
If the calculated table part index is the same as the table part index of the last absolute entry of the same data block at block 506, then at block 508, the controller determines if the PBA offset threshold (F) has been exceeded. For example, the PBA offset threshold may be about 16 K or about 14 bits. If the PBA offset threshold has not been exceeded at block 508, then at block 510, the controller programs the delta L2P entry (E) as a relative delta L2P entry. At block 512, the controller calculates a PBA offset (G) from the previous absolute delta L2P entry, where the PBA offset is equal to an offset from the PBA of the data block. The PBA offset is calculated by subtracting the PBA of the last absolute entry from the current PBA.
However, if the calculated table part index is the different from the table part index of the last absolute entry of the same data block at block 506 or if the PBA offset threshold has been exceeded at block 508, then the controller programs the delta L2P entry as an absolute delta L2P entry at block 514. At block 516, the controller writes the table part index calculated at block 504 in the L2P table part index field (H). At block 518, the controller further writes the PBA to the PBA field of the absolute delta L2P entry W.
At block 520, the controller calculates the offset in the table part using the formula, offset_in _table_part=LBA % table size in LBA units (J=K), as described in
If the delta L2P entry is an absolute delta L2P entry at block 604, then at block 606, the controller determines the LBA associated with the absolute delta L2P entry (R) by calculating the table part index (0) times the table part size (S) plus the offset (T). At block 608, the controller sets the PBA of the absolute delta L2P entry (U) as the PBA associated with the LBA. At block 614, the LBA is returned.
However, if the delta L2P entry is a relative delta L2P entry at block 604, then at block 610, the controller determines the LBA associated with the relevant delta L2P entry by calculating the table part index of the previous absolute delta L2P entry (0) times the table part size plus the offset. At block 612, the controller further determines the PBA of the relative delta L2P entry (V) by adding the PBA of the previous absolute delta L2P entry and the PBA offset together. At block 614, the LBA is returned.
If the current entry type is an absolute entry type at block 708, then at block 710, the controller sets the current entry as the last absolute entry. After setting the current entry as the last absolute entry at block 708 or if the current entry type is not an absolute entry type at block 708, then at block 712, the controller sets the current entry as the next entry (Z). At block 714, the controller determines if the current entry is the last entry. If the current entry is not the last entry at block 714, then the method 700 returns to determining if the current entry type is an absolute entry at block 708. However, if the current entry is the last entry at block 714, then at block 716, the controller encodes the current L2P entry as the current entry in the delta buffer. At block 718, the method 700 is finished and the encoded L2P entry is returned.
By using a relative delta entry in a delta buffer that includes the type of delta entry, the L2P table offset, and the PBA offset, the amount of delta buffer utilized is about half of the storage space of the absolute delta entry. Thus, the delta buffer can be utilized more efficiently and data storage device functioning is improved.
In one embodiment, a data storage device comprises: one or more memory devices; and a controller coupled to the one or more memory devices, wherein the controller is configured to: determine that a plurality of entries for a delta buffer logical to physical (L2P) table correspond to a same data block; create an absolute delta L2P entry, wherein the absolute delta L2P entry comprises a first number of bits; store the absolute delta L2P entry in the delta buffer L2P table; create a relative delta L2P entry, wherein the relative delta L2P entry comprises a second number of bits and wherein the first number of bits is greater than the second number of bits; and store the relative delta L2P entry in the delta buffer L2P table. The absolute delta L2P entry comprises a type of entry, a L2P table part index, a first offset in the L2P table, and a physical block address (PBA). The relative delta L2P entry comprises a type of entry, a second offset in the L2P table, and a PBA offset. The first offset in the L2P table and the second offset in the L2P table comprise an equal number of bits, and wherein the PBA comprises a greater number of bits than the PBA offset. The first number of bits is between about 55 and 64 bits. The second number of bits is between about 28 and about 32 bits. The controller is further configured to: create a second relative delta L2P entry, wherein the second relative delta L2P entry comprises a third number of bits; and store the second relative delta L2P entry in the delta buffer L2P table. The third number of bits is equal to the second number of bits.
In another embodiment, a data storage device comprises: one or more memory devices; and a controller coupled to the one or more memory devices, wherein the controller is configured to: encode a first delta logical to physical (L2P) entry; determine that the first delta L2P entry is an absolute entry; enter the first delta L2P entry into a delta buffer, wherein the first delta L2P entry has a delta entry physical block address (PBA) equal to a PBA; encode a second delta L2P entry; determine that the second delta L2P entry is a relative entry; and enter the second delta L2P entry into the delta buffer wherein the second delta L2P entry has a delta entry PBA offset equal to an offset from the PBA. The controller is further configured to perform the following for the absolute entry: set a delta entry type equal to absolute; set a delta entry L2P table part index equal to L2P table part index; and set the delta entry PBA equal to PBA. The controller is further configured to perform the following for the relative entry: set delta entry type equal to relative; and set delta entry PBA offset equal to PBA minus a last absolute entry PBA. The delta entry PBA offset comprises fewer bits than the delta entry PBA. The relative entry does not include a L2P table part index. The controller is further configured to: decode a delta buffer entry; and determine whether the decoded delta buffer entry is an absolute delta entry. The controller is further configured to calculate the offset from the PBA. The delta buffer comprises a plurality of regions and wherein a first entry in any region of the delta buffer is an absolute entry. The delta buffer comprises at least 64 regions.
In another embodiment, a data storage device comprises: one or more memory devices; and means to enter a plurality of delta logical to physical (L2P) entries into a delta buffer, wherein at least one entry of the plurality of delta L2P entries contains information relative to another entry of the plurality of delta L2P entries. The at least one entry comprises a first plurality of bits and the another entry comprises a second plurality of bits and wherein the first plurality of bits is less than the second plurality of bits. The data storage device further comprises means to encode and decode the plurality of delta L2P entries.
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.
This application is a continuation of U.S. patent application Ser. No. 17/183,148, filed Feb. 23, 2021, which application claims benefit of U.S. provisional patent application Ser. No. 63/089,775, filed Oct. 9, 2020, each of which is herein incorporated by reference.
Number | Date | Country | |
---|---|---|---|
63089775 | Oct 2020 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 17183148 | Feb 2021 | US |
Child | 17870407 | US |