Method and apparatus for cache operation in storage device

By optimizing data access paths using cache and garbage collection buffers in storage devices, the delay problem caused by storage media availability operations is solved, data access efficiency is improved and storage capacity utilization is improved.

CN119065993APending Publication Date: 2024-12-03SAMSUNG ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410687073.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-04-09
Filing Date
2024-05-30
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

When existing storage devices process the availability-related operations of storage media, the data access delay is too long, especially in garbage collection operations. The access request for valid data needs to wait for the operation to be completed, resulting in a tail delay.

Method used

By introducing cache and garbage collection buffers in the storage device, using the cache medium to store frequently accessed data copies and temporarily store valid data to be erased in the garbage collection buffer, thereby reducing direct access to the storage medium, optimizing Data access path.

Benefits of technology

Effectively reduce latency related to storage media access, improve data access efficiency, and increase the overall storage capacity and utilization of storage media by reducing the amount of flash memory required for garbage collection operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065993A_ABST
    Figure CN119065993A_ABST
Patent Text Reader

Abstract

Methods and apparatus are provided for cache operations in a storage device. The apparatus may include a storage medium; a cache medium; a buffer medium; and at least one control circuit configured to: perform one or more operations, the one or more operations including: receiving a first request to access a storage medium; accessing a cache medium based on the first request; copying data from a portion of the storage medium to the buffer medium; modifying the availability of the at least part of the storage medium based on the replicated processing; receiving a second request for accessing a storage medium; and accessing the buffer medium based on the second request. The one or more operations may include determining a location of data associated with the second request, and accessing the buffer medium based on the determined processing. The one or more operations may include receiving information about a location of data associated with a second request; and accessing a buffer medium based on the information.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to and the benefit of U.S. Provisional Patent Application No. 63 / 470,809, filed on June 2, 2023, which is incorporated herein by reference. Technical Field

[0002] The present disclosure relates generally to cache and storage devices, and more particularly, to systems, methods, and devices for cache operations in storage devices. Background Art

[0003] The storage device may include a storage medium configured to store data received at the storage device. The storage device may also include a cache for storing copies of the data stored in the storage medium. An application or other user may access the storage device using one or more communication interfaces, communication protocols, etc.

[0004] The above information disclosed in this Background section is only for enhancement of understanding of the background of the principles of the invention and therefore it may contain information that does not constitute prior art. Summary of the invention

[0005] An apparatus may include: a storage medium; a cache medium; a buffer medium; and at least one control circuit configured to: perform one or more operations, the one or more operations including: receiving a first request for accessing the storage medium; accessing the cache medium based on the first request; copying data from a portion of the storage medium to the buffer medium; modifying the availability of the at least a portion of the storage medium based on the copying process; receiving a second request for accessing the storage medium; and accessing the buffer medium based on the second request. The one or more operations may include: determining a location of data associated with the second request; and accessing the buffer medium based on the determined process. The one or more operations may include: receiving information about the location of the data associated with the second request, and the process of accessing the buffer medium may be based on the information. The information may include a portion of an address. The information may include a portion of a data structure. The apparatus may also include: a first queue configured to store access requests for the copying process; and a second queue configured to store the second request. The second request may include a memory access request. The one or more operations may include: accessing the buffer medium based on a first priority, and the process of copying may be based on a second priority. The portion of the storage medium may be a first portion of the storage medium, and the one or more operations may include: reading the data from the buffer medium based on a copy process; and storing the data in a second portion of the storage medium. The process of accessing the buffer medium may be based on a first priority, and the process of reading may be based on a second priority.

[0006] A method may include: receiving a first request for accessing a storage medium at a device including a storage medium, wherein the device may also include a cache medium and a buffer medium; accessing the cache medium based on the first request; copying data from a portion of the storage medium to the buffer medium; modifying the availability of the portion of the storage medium based on the step of copying; receiving a second request for accessing the storage medium at the device; and accessing the buffer medium based on the second request. The method may also include: determining a location of data associated with the second request; and accessing the buffer medium based on the step of determining. The method may also include: receiving information about the location of the data associated with the second request; and accessing the buffer medium based on the information. The information may include a portion of an address. The information may include a portion of a data structure. The first request may include a first memory access request, and the second request may include a second memory access request. The step of accessing the buffer medium based on the second request may be performed at a first priority, and the step of copying may be performed at a second priority.

[0007] An apparatus may include: a storage medium; a buffer medium; and at least one control circuit configured to perform one or more operations, the one or more operations including: copying data from a portion of the storage medium to the buffer medium; modifying the availability of the portion of the storage medium based on the copying; receiving a request for accessing the storage medium; and accessing the buffer medium based on the request. The one or more operations may include: accessing the storage medium based on the request. The one or more operations may include: receiving information about a location of data associated with the request, and the accessing may be based on the information. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] The drawings are not necessarily drawn to scale, and throughout the drawings, for illustrative purposes, elements of similar structure or function may generally be represented by the same reference numeral or portions of reference numerals. The drawings are intended only to facilitate the description of the various embodiments described herein. The drawings do not describe every aspect of the teachings disclosed herein and do not limit the scope of the claims. In order to prevent the drawings from becoming obscure, not all components, connections, etc. may be shown, and not all components may have reference numerals. However, the pattern of component configurations can be easily seen from the drawings. The drawings, together with the specification, illustrate example embodiments of the present disclosure and, together with the specification, are used to explain the principles of the present disclosure.

[0009] Figure 1 An embodiment of an apparatus having a data buffer for implementing a medium availability scheme according to a disclosed example embodiment is shown.

[0010] Figure 2An embodiment of a device having a device cache and a data buffer for implementing a medium availability scheme according to a disclosed example embodiment is shown.

[0011] Figure 3 An example embodiment of a storage device having a device cache and a garbage collection buffer according to the disclosed example embodiments is shown.

[0012] Figure 4 An example embodiment of a system having a "storage device with device cache and garbage collection buffer" according to a disclosed example embodiment is shown.

[0013] Figure 5 An example embodiment of a metadata structure for device cache metadata according to the disclosed example embodiments is shown.

[0014] Figure 6 An example embodiment of a metadata structure for garbage collection buffer metadata according to the disclosed example embodiments is shown.

[0015] Figure 7 An embodiment of a method for accessing one or more caches in a device according to a disclosed example embodiment is shown.

[0016] Figure 8 Another embodiment of a method for accessing one or more caches in a device according to a disclosed example embodiment is shown.

[0017] Fig. 9 An example embodiment of a host device according to a disclosed example embodiment is shown.

[0018] Fig.10 An example embodiment of an apparatus according to a disclosed example embodiment is shown.

[0019] Fig.11 An embodiment of a method for accessing a cache medium of a device according to a disclosed example embodiment is shown. DETAILED DESCRIPTION

[0020] The storage device may include a device cache that may reduce latency of some access operations, for example, by storing copies of frequently and / or recently accessed data in a cache medium that may have a relatively low access latency compared to a storage medium. The storage device may receive a request to access data present in the device cache (which may be referred to as a cache hit) and process the request by reading the requested data from or writing the requested data to the device cache that may have a relatively low access latency. The storage device may receive a request to access data not present in the device cache (which may be referred to as a cache miss) and process the request by reading the data from or writing the data to a storage medium that may have a relatively high access latency.

[0021] Data access operations to the storage medium may have particularly long delays if the storage medium is involved in operations related to the availability of the storage medium. For example, the storage device may implement a garbage collection operation in which one or more pages of valid data in a first erase block (which may also include one or more pages of invalid data) may be copied to a second (e.g., empty) erase block to enable the first erase block to be erased so that the first erase block can be used to store new valid data. Access requests to one or more pages of valid data involved in the garbage collection operation may experience relatively long delays (which may be referred to as tail delays). For example, access requests may not be processed until the garbage collection operation is completed.

[0022] Some storage devices may include a garbage collection buffer that may be used to store one or more pages of valid data involved in a garbage collection operation. In an access scheme according to the disclosed example embodiments, the storage device may process a request to access a storage medium by accessing the garbage collection buffer. For example, the storage device may copy a page of valid data from an erase block to the garbage collection buffer so that the storage device can perform an erase operation on the erase block. When a page of valid data is stored in the garbage collection buffer, the storage device may receive a request to read a page of valid data. Therefore, the storage device may process the request by reading a page of valid data from the garbage collection buffer. Depending on the implementation details, this may reduce the latency (e.g., tail latency) associated with servicing a request.

[0023] In some embodiments, a storage device according to the disclosure may use metadata to determine whether a request for accessing a storage medium can be processed by accessing a device cache and / or a garbage collection buffer. For example, a storage device may implement a metadata structure having a first portion and a second portion, the first portion including metadata that "may provide access to one or more entries in the device cache" (e.g., one or more tags, indexes, mappings, etc.), and the second portion including metadata that "may provide access to one or more entries in the garbage collection buffer" (e.g., one or more tags, indexes, hash tables, mappings, etc.).

[0024] Some embodiments of the disclosed storage device may include one or more queues for accessing one or more caches, buffers, etc. For example, some embodiments may include an access request queue for storing read requests to access a garbage collection buffer based on a memory read request received by the storage device. Such embodiments may also include a garbage collection read queue and / or a garbage collection write queue, which may be used by garbage collection logic to read valid data from the garbage collection buffer and / or write valid data to the garbage collection buffer for garbage collection operations. In some embodiments, one or more of the queues may have different priorities. For example, in some embodiments, an access request queue may have a higher priority than a garbage collection read queue and / or a garbage collection write queue.

[0025] The present disclosure covers many principles related to accessing data using caches, buffers, etc. for storage media. The principles disclosed herein may have independent utility and may be embodied individually, and not every embodiment may utilize every principle. In addition, the principles may also be embodied in various combinations, some of which may amplify some benefits of the individual principles in a synergistic manner.

[0026] For purposes of illustration, some example embodiments may be described in the context of some specific implementation details, however, the principles are not limited to these or any other implementation details. For example, some embodiments may be described in the context of storage devices that may use Compute Express Link (CXL) and / or Non-Volatile Express (NVMe) protocols, however, other embodiments may be implemented with other types of devices (such as accelerators, memory expansion devices, memory buffers, etc.) using other types of interfaces, protocols, etc.

[0027] Figure 1An embodiment of an apparatus having a data buffer for implementing a media availability scheme according to an example embodiment disclosed is shown. The apparatus 102 may include a storage medium 104, a control logic 108, a data buffer 110, and / or a communication connection 107. The apparatus 102 may communicate with a user (e.g., a host, a server, an application, an operating system, a process, a service, a virtual machine (VM), a VM manager, etc.) via the communication connection 107, and the communication connection 107 may transmit one or more access requests 109 (e.g., read and / or write requests, load and / or store requests, etc.), data 111, configuration information, addresses, metadata, etc. to and / or from the apparatus 102.

[0028] The control logic 108 may include access logic 116, which may be configured to process access requests 109 to enable a user to access (e.g., read, write, copy, etc.) data in the storage medium 104. For example, all or a portion of the storage medium 104 may be configured as a storage device that can be accessed using a read command or a write command using a storage access protocol such as Serial Advanced Technology Attachment (ATA) (SATA), Small Computer System Interface (SCSI), Serial Attached SCSI (SAS), Non-Volatile Memory Express (NVMe), etc. As another example, all or a portion of the storage medium 104 may be configured as a memory that can be accessed using a load and / or store command using a memory access protocol such as Direct Memory Access (DMA), Remote Direct Memory Access (RDMA), RDMA over Converged Ethernet (RoCE), Compute Express Link (CXL), etc.

[0029] The control logic 108 may include availability logic 118, which may be configured to perform one or more operations related to the availability of the storage medium 104. For example, in some embodiments, a portion or all of the storage medium 104 may be implemented with one or more availability units 114 that can be erased as a unit to make it available for storing data 111. In a storage medium 104 implemented with flash memory, an availability unit may represent one or more erase blocks, non-volatile memory (NVM) devices (e.g., NVM dies), NVM device partitions (e.g., planes), etc., or any combination thereof. As another example, in a storage medium 104 implemented with magnetic media (e.g., shingled magnetic recording (SMR) media), an availability unit may represent one or more shingled sections, zones, sectors, tracks, etc., or any combination thereof. As a further example, in a storage medium 104 implemented with a storage class memory (e.g., magnetoresistive random access memory (MRAM), resistive random access memory (ReRAM), phase change memory (PCM), cross-grid non-volatile memory, memory with body resistance change, etc.), an availability unit may represent one or more storage banks, programming groups, dies, etc., or any combination thereof.

[0030] In some embodiments where the storage medium 104 may be implemented at least in part with flash memory, the availability logic 118 may implement a garbage collection scheme for the flash memory. In such embodiments, the availability units 114 may be implemented as erase blocks, and the availability logic 118 may copy one or more pages of valid data in a first erase block (which may also include one or more pages of invalid data) to a second (e.g., empty) erase block to enable the first erase block to be erased to make it available for storing new valid data.

[0031] In some embodiments, the availability logic 118 may use the data buffer 110 for availability operations. For example, in an embodiment where the availability logic 118 may implement a garbage collection scheme for the storage medium 104 implemented with flash memory, the availability logic 118 may copy valid data from the erase block to the data buffer 110 to enable the erase block to be erased. Depending on the implementation details, this may reduce the amount of flash memory that may be reserved for garbage collection operations, which in turn may increase the overall storage capacity and / or utilization of the storage medium 104.

[0032] Any storage medium disclosed herein, including the storage medium 104, may be implemented with any type of non-volatile memory medium that can be used as a storage medium based on, for example, solid-state media, magnetic media, optical media, etc. For example, in some embodiments, the storage medium may be implemented with a NAND flash memory, or a NOR flash memory, a persistent memory (such as a cross-grid non-volatile memory, a memory with a bulk resistance change, a phase change memory (PCM), etc.), or any combination thereof.

[0033] Any of the cache media, buffer media, etc. disclosed herein including the data buffer 110 may be implemented with a volatile memory medium such as a dynamic random access memory (DRAM), a static random access memory (SRAM), etc. Additionally or alternatively, any of the cache media, buffer media, etc. disclosed herein may be implemented with any type of non-volatile memory medium based on solid-state media, magnetic media, optical media, etc., as described above, or any combination thereof.

[0034] In some embodiments, the storage medium 104 and the data buffer 110 may be implemented with media that may have one or more related characteristics that may make one or both of the storage medium 104 and the data buffer 110 more suitable for their respective functions. For example, in some embodiments, the storage medium 104 may be implemented with NAND flash memory that may have relatively higher capacity, lower cost, etc., and the data buffer 110 may be implemented with DRAM that may have relatively lower access latency. As another example, in some embodiments, the storage medium 104 may be implemented with magnetic media that may have relatively higher capacity, lower cost, etc., and the data buffer 110 may be implemented with NAND flash memory that may have relatively lower access latency. In some other embodiments, some or all of the storage medium 104 and some or all of the data buffer 110 may be implemented with the same or similar types of media.

[0035] Any communication connection disclosed herein, including communication connection 107, may be implemented using any interconnect and / or storage interface and / or protocol, such as Peripheral Component Interconnect (PCI), PCI Express (PCIe), Non-Volatile Memory Express (NVMe), NVMe Key-Value (NVMe-KV), Direct Memory Access (DMA), Serial ATA (SATA), Small Computer System Interface (SCSI), Serial Attached SCSI (SAS), Compute Express Link (CXL) and / or one or more CXL protocols (such as CXL.mem, CXL.cache and / or CXL.io), Gen-Z, Coherent Accelerator Processor Interface (CAPI), Cache Coherent Interconnect for Accelerators (CCIX), etc., or any combination thereof. Alternatively or additionally, any communication connection disclosed herein including the communication connection 107 may be implemented with any networking interface and / or protocol such as Ethernet, Transmission Control Protocol / Internet Protocol (TCP / IP), Remote Direct Memory Access (RDMA), RDMA over Converged Ethernet (RoCE), Fibre Channel, InfiniBand (IB), iWARP, NVMe over Fabric (NVMe-oF), etc., or any combination thereof. Alternatively or additionally, any communication connection disclosed herein including the communication connection 107 may be implemented with any control and / or management interface including NVMe Management Interface (NVMe-MI), System Management Bus (SMBus), etc.

[0036] Any device disclosed herein, including device 102, may be implemented using any connector configuration (e.g., PCIe, SATA, SCSI, SAS, M.2, U.2, U.3, etc.) in any form having any physical form factor (e.g., storage device, accelerator, memory buffer (e.g., CXL memory buffer), graphics processor (GPU), network interface card and / or network interface controller (NIC), etc.), any physical form factor including one or more for storage device (e.g., solid state drive (SSD), hard disk drive (HDD), etc.) and / or other devices. form factors (such as, peripheral component interconnect express (PCIe) add-in card, 3.5-inch drive, 2.5-inch drive, 1.8-inch drive, M.2 drive, U.2 and / or U.3 drive, enterprise and data center SSD form factor (EDSFF) drive, any SFF-TA-100X form factor (e.g., SFF-TA-1002), NF1, etc. In some embodiments, the device can be implemented in any other form (e.g., as a collection of one or more components on a circuit board (e.g., integrated into a server motherboard, backplane, midplane, etc.)).

[0037] Any device disclosed herein, including device 102, may be used in conjunction with one or more personal computers, smart phones, tablet computers, servers, server chassis, server racks, data rooms, data centers, edge data centers, mobile edge data centers, the like, or any combination thereof.

[0038] In some embodiments, for example, control logic (e.g., one or more control circuits) may be configured to operate a portion or all of a medium (e.g., a storage medium, a cache medium, a buffer medium, a storage medium, etc.) in a particular manner as a cache, as a data buffer, as a memory space, as a storage space, etc. (any of which may be visible or invisible to a user). In such embodiments, the medium may be referred to as being configured in a particular manner even if the control logic may perform one or more actions, operations, etc. that may cause the operation in that manner. For example, in some embodiments, the control logic may be configured to operate a cache medium or other medium as a garbage collection buffer for a storage medium. In such embodiments, the cache medium may be referred to as being configured as a cache even if the control logic may perform one or more actions, operations, etc. that may cause the cache medium to operate as a garbage collection buffer for a storage medium.

[0039] Figure 2 An embodiment of a device having a device cache and a data buffer for implementing a medium availability scheme according to a disclosed example embodiment is shown. Figure 2 The device 202 shown in FIG. 2 may include Figure 1 One or more elements similar to the embodiments shown in the drawings may be indicated by reference numerals ending with and / or containing the same numbers, letters, etc.

[0040] In some respects, Figure 2 The configuration and / or operation of the device 202 shown in Figure 1 The configuration and / or operation of the device 102 shown in FIG. 1 is similar. However, Figure 2 The embodiment shown in FIG. 1 may include a device cache 206 that can be used, for example, to store a copy of the data 211 stored in the storage medium 204. Figure 2 In the embodiment shown in FIG. 2 , control logic 208 may include cache logic 230 that may control at least a portion of the operation of device cache 206 and / or data buffer 210 .

[0041] Depending on implementation details, the device cache 206 may be used to reduce latency associated with accessing data 211 stored in the storage medium 204. For example, in some embodiments, at least a portion of the storage medium 204 may be configured as a memory that can be accessed using a memory access protocol (such as, CXL.mem). In such embodiments, at least a portion of the device cache 206 may be configured to store a copy of the data 211 that may be (previously, currently, and / or eventually (e.g., according to a cache policy)) stored in a corresponding portion of the storage medium 204. The access logic 216 and / or the cache logic 230 may be configured to process a request 209 for accessing the data 211 in the storage medium 204 by accessing a copy of the data stored in the device cache 206. In some embodiments, the device cache 206 may be implemented with a memory medium (e.g., dynamic random access memory (DRAM)) that may have a lower access latency than a memory medium (e.g., NAND flash memory) used to implement the storage medium 204. Thus, the access logic 216 and / or cache logic 230 may process the request 209 with lower latency by accessing the device cache 206 (eg, instead of and / or in addition to the storage medium 204 ).

[0042] Additionally or alternatively, the access logic 216 and / or the cache logic 230 may be configured to process the request 209 for accessing the data 211 in the storage medium 204 by accessing the copy of the data stored in the data buffer 210. For example, in some embodiments, at least a portion of the data buffer 210 may be configured as a garbage collection buffer (which may be implemented, for example, with DRAM) for at least a portion of the storage medium 204 (which may be implemented, for example, with flash memory). The control logic 208 may receive the request 209 for accessing the data 211 in the storage medium 204. The access logic 216 and / or the cache logic 230 may determine (e.g., using metadata (such as tags, indexes, etc.)) that a copy of the requested data is located in the data buffer 210 (e.g., based on a cache hit that the requested data is involved in a garbage collection operation), and process the request 209 by accessing the data buffer 210 (e.g., reading the requested data from the data buffer 210 or writing the requested data to the data buffer 210). Depending on implementation details, this may reduce latency associated with processing access request 209 .

[0043] Additionally or alternatively, the access logic 216 and / or the cache logic 230 may be configured to process the request 209 by accessing the device cache 206. For example, in some embodiments, based on receiving the request 209 for access to the data 211 in the storage medium 204, the access logic 216 and / or the cache logic 230 may perform one or more checks (e.g., using metadata (such as tags, indexes, etc.)) to determine whether a copy of the requested data is located in either, both, or neither of the device cache 206 and / or the data buffer 210. If a copy of the requested data is located in only one of the device cache 206 and the data buffer 210, the access logic 216 and / or the cache logic 230 may access the cache where the copy is located. If a copy of the requested data is located in both the device cache 206 and the data buffer 210, the access logic 216 and / or cache logic 230 may access the cache or buffer that may have the lowest latency (e.g., based on media access speed, metadata processing time, etc.). If neither the device cache 206 or the data buffer 210 has a copy of the requested data, the access logic 216 and / or cache logic 230 may process the request 209 by accessing the storage medium 204. Depending on implementation details, this may reduce latency (e.g., tail latency) associated with processing the access request 209. Additionally or alternatively, and depending on implementation details, this may increase the effective size of the device cache 206, for example, by enabling a portion of the data buffer 210 to be used as both the device cache and a buffer for garbage collection or other availability operations of the storage medium 204.

[0044] Figure 3 An example embodiment of a storage device having a device cache and a garbage collection buffer according to the disclosed example embodiments is shown. For example, Figure 3 The storage device 302 shown in FIG. 1 may be used to implement Figure 2 The devices shown and / or available Figure 2 The present invention is implemented by the device shown in , wherein similar elements can be indicated by reference numerals ending with and / or containing the same numbers, letters, etc.

[0045] Reference Figure 3The storage device 302 may include a storage medium 304, a device cache 306, a garbage collection buffer 310 and / or a control logic 308, and the control logic 308 may include a command manager 336, a cache manager 330, a metadata memory 322, garbage collection logic 318, a garbage collection read queue 317, a garbage collection write queue 319, an access request queue 325, a medium translation layer (MTL) 324 and / or a medium interface layer (MIL) 326. One or more.

[0046] Storage medium 304 may be implemented with any medium that may be configured with availability units 314-1 (AU-1) and 314-2 (AU-2) (which may be individually and / or collectively referred to as 314) on which availability operations may be performed to place one or more of availability units 314 in a state for storing data (e.g., erased). For example, in an embodiment where at least a portion of storage medium 304 may be implemented with flash memory, one or more of availability units 314 may be implemented with erase blocks.

[0047] Data may be stored in data units 311-1-1 and 311-1-2 in availability unit 314-1. Data may be stored in data units 311-2-1 and 311-2-2 in availability unit 314-2. Any of data units 311-1-1, 311-1-2, 311-2-1, and 311-2-2 (which may be individually and / or collectively referred to as 311) may be configured with, for example, units in which data may be loaded, stored, read, written, etc. For example, in an embodiment in which at least a portion of storage medium 304 may be implemented with flash memory, one or more available pages in data unit 311 may be implemented. For purposes of illustration, storage medium 304 may be shown with two availability units 314, each availability unit 314 having two data units, but any number of availability units 314 and / or data units 311 may be used.

[0048] The media interface layer 326 may provide an interface between the storage medium 304 and any other logic, functionality, etc. that may access the storage medium 304. For example, the media interface layer 326 may implement one or more NAND channels for accessing one or more NAND flash memory dies. The media conversion layer 324 may perform logical to physical address translation, wear leveling of the storage medium, error correction, etc.

[0049] The garbage collection logic 318 may implement a garbage collection scheme for the storage medium 304. For example, if the availability unit 314-1 includes a data unit 311-1-1 having valid data and a data unit 311-1-2 having invalid data, the garbage collection logic 318 may copy the valid data in the data unit 311-1-1 to the garbage collection buffer 310 and perform a medium availability operation (e.g., an erase operation) to put the availability unit 314-1 in an available state (e.g., erased) to store new data. The garbage collection logic 318 may then copy the valid data back to the erased availability unit 314-1 (or another available availability unit).

[0050] In some embodiments, the garbage collection logic 318 may use the garbage collection read queue 317 and / or the garbage collection write queue 319 to read valid data from the garbage collection buffer 310 and / or write valid data to the garbage collection buffer 310, respectively. In some embodiments, the garbage collection logic 318 may place memory load commands, address information of valid data, etc. in entries in the garbage collection read queue 317, and the garbage collection read queue 317 may process the entries, for example, in a first-in-first-out (FIFO) order. In some embodiments, the garbage collection logic 318 may place memory storage commands, valid data, address information of valid data, etc. in entries in the garbage collection write queue 319, and the garbage collection write queue 319 may process the entries, for example, in a first-in-first-out (FIFO) order.

[0051] The command manager 336 may process access requests (e.g., commands) received through the communication interface 309 to access the storage medium 304. In some embodiments, the command manager 336 may implement a storage access protocol that enables a user to access the storage medium 304 as a storage device using a read and / or write (Read / Write) command, and the read and / or write (Read / Write (Rd / Wr)) command may specify a read and / or write address with one or more logical block addresses. Additionally or alternatively, the command manager 336 may implement a memory access protocol that enables a user to access the storage medium 304 as a memory using a load and / or store (Load / Store (LD / ST)) command, and the load and / or store (Load / Store) command may specify a requested data location as a memory address (e.g., a memory address in a system memory). In such an embodiment, the command manager 336 may convert one or more memory addresses into one or more LBAs.

[0052] The cache manager 330 may include logic for implementing any control scheme disclosed herein for the device cache 306 and / or the garbage collection buffer 310. For example, in some embodiments, the command manager 336 may process an access request (e.g., a memory load or storage read command) to access data (requested data) in the data unit 311-1-1 in the availability unit 314-1 stored in the storage medium 304. The command manager 336 may forward the command to the media conversion layer 324, and the media conversion layer 324 may forward address information (e.g., LBA information) of the requested data to the cache manager 330.

[0053] The cache manager 330 may use the address information of the requested data to determine whether the requested data (e.g., a copy of the requested data) is located in the device cache 306 and / or the garbage collection buffer 310. In some embodiments, the cache manager 330 may use device cache metadata 323a and / or garbage collection metadata (GC) 323b (which may be individually and / or collectively referred to as cache metadata 323 and may be stored in the metadata storage 322) to determine whether the requested data is located in the device cache 306 and / or the garbage collection buffer 310. Examples of cache metadata 323 may include one or more addresses, pointers, etc. of data stored in the device cache 306 and / or the garbage collection buffer 310, a history of data stored in the device cache 306 and / or the garbage collection buffer 310, valid and / or invalid status information of data stored in the device cache 306 and / or the garbage collection buffer 310, and the like. In some embodiments, the cache manager 330 and / or garbage collection logic 318 may maintain cache metadata 323, for example, by updating cache metadata 323 when data is written to the device cache 306 and / or garbage collection buffer 310, and / or evicted from the device cache 306 and / or garbage collection buffer 310 (e.g., with information about the data's address, history, validity, etc.).

[0054] Based on the device cache metadata 323a of the address information of the requested data, the cache manager 330 may determine that a copy of the requested data is located in the device cache 306 (e.g., a device cache hit). Therefore, the cache manager 330 may load the requested data from the device cache 306 and send the requested data to the media conversion layer 324. The media conversion layer 324 may forward the requested data to the command manager 336, which may send the requested data to the user who sent the access request (e.g., a memory load or storage read command).

[0055] Alternatively or additionally, based on the garbage collection metadata 323b, the cache manager 330 may determine that a copy of the requested data is located in the garbage collection buffer 310 (e.g., a garbage collection buffer hit). The cache manager 330 may therefore load the requested data from the garbage collection buffer 310. In some embodiments, the cache manager 330 may use the access request queue 325 to access the requested data from the garbage collection buffer 310. For example, the cache manager 330 may place a memory load command, address information of the requested data, etc. in an entry in the access request queue 325, and the access request queue 325 may process one or more entries, for example, in a first-in, first-out (FIFO) order. After accessing the requested data from the garbage collection buffer 310, the cache manager 330 may send the requested data to the media conversion layer 324, which may forward the requested data to the command manager 336, which may in turn send the requested data to the user who sent the access request.

[0056] In some embodiments, cache manager 330 and / or garbage collection logic 318 may operate one or more of garbage collection read queue 317, garbage collection write queue 319, and / or access request queue 325 at one or more priorities. For example, in some embodiments, access request queue 325 may operate at a higher priority than either or both of garbage collection read queue 317 and / or garbage collection write queue 319. Thus, even if one or more entries are pending in one or both of garbage collection read queue 317 and / or garbage collection write queue 319, entries placed in access request queue 325 may be processed (e.g., data for the associated request may be loaded from garbage collection buffer 310) before one or more of the entries pending in garbage collection read queue 317 and / or garbage collection write queue 319 are processed.

[0057] In some cases, cache manager 330 may determine that copies of data associated with an access request received by command manager 336 may be located in both device cache 306 and garbage collection buffer 310. In such cases, cache manager 330 may be configured to access the location of the requested data, e.g., based on one or more characteristics of device cache 306, garbage collection buffer 310, associated logic, etc. For example, in some embodiments, device cache 306 may have a relatively lower access latency than garbage collection buffer 310, and thus cache manager 330 may access the requested data from device cache 306.

[0058] If the cache manager 330 determines that the requested data is not located in the device cache 306 or the garbage collection buffer 310, the cache manager 330 may notify the media conversion layer 324, which may proceed to access the requested data from the storage medium 304. The media conversion layer 324 may then forward the requested data to the command manager 336, which may in turn send the requested data to the user who sent the access request.

[0059] Depending on the implementation details, Figure 3 The embodiment of the storage device shown in can reduce the delay (e.g., tail delay) associated with accessing data from the storage medium 304. Additionally or alternatively, depending on the implementation details, Figure 3 The embodiment of the storage device shown in FIG. 306 may increase the effective size of the device cache 306, for example, by enabling a portion of the garbage collection buffer 310 to be used as both a device cache and a cache for garbage collection.

[0060] Figure 4 An example embodiment of a system having a "storage device having a device cache and a garbage collection buffer" according to an example embodiment disclosed is shown. For example, Figure 4 The system shown in can be used to implement the disclosed herein including Figure 2 or Figure 3 Any of the devices shown and / or may be used in the present disclosure including Figure 2 or Figure 3 The present invention can be implemented by any device of the devices shown in the drawings, wherein similar elements can be indicated by reference numerals ending with and / or containing the same numbers, letters, etc. For the purpose of illustration, Figure 4 The systems shown in the may be described using example implementation details (such as, CXL and / or NVMe protocols, flash memory, DRAM and / or static random access memory (SRAM), specific numbers and / or types of components, etc.), but other protocols, media, numbers and / or types of components, etc. may be used.

[0061] Reference Figure 4 , the system may include a host 401 and a storage device 402. The host 401 may be implemented with any type of processing hardware that can run one or more operating systems, applications, VMs, VM managers, processes, services, etc. that can store data in the storage device 402, but for purposes of illustration, the host 401 is shown as running one or more applications 438-1, 438-2, ..., 438-M (which may be individually and / or collectively referred to as 438).

[0062] The storage device 402 may include a storage medium 404, a device cache 406, a control logic 408, a garbage collection buffer 410, and / or a communication interface 409. The control logic 408 may include a media translation layer (MTL) 424, a cache manager 430, a memory for cache configuration information 420, garbage collection logic 418, a metadata memory 422, a garbage collection read queue 417, a garbage collection write queue 419, an access request queue 425, a first command manager 436, and / or a second command manager 434.

[0063] The storage medium 404 may be implemented, for example, with one or more NAND flash memory dies arranged in channels CH0, CH1, ..., CHN that may be controlled by control logic (e.g., one or more NAND channel controllers) in a NAND interface layer (NIL) 426. The NAND flash memory may be configured with a first erase block 414-1 having pages 411-1-1 and 411-1-2 and a second erase block 414-2 having pages 411-2-1 and 411-2-2, but any number of erase blocks and / or pages in each block may be used. The erase blocks 414-1 and 414-2 (which may be individually and / or collectively referred to as 414) and the pages 411-1-1, 411-1-2, 411-2-1, and 411-2-2 (which may be individually and / or collectively referred to as 411) may be configured across any arrangement of channels, dies, disks, etc. In embodiments where a portion or all of storage medium 404 may be implemented using flash memory, MTL 424 may be implemented at least in part using a flash translation layer (FTL).

[0064] In some respects, Figure 4 The configuration and / or operation of the storage device 402 shown in Figure 3 The configuration and / or operation of the storage device 302 shown in FIG. 1 is similar, but the availability unit and the data unit are implemented as erase blocks and pages, respectively. However, Figure 4 The embodiments shown in may also implement a dual mode (e.g., dual access method) scheme in which a user (e.g., application 438) may (e.g., via MTL 424) use load and / or store (load / store) commands (e.g., using first command manager 436) to access storage medium 404 as a memory, and / or use storage read and / or write (read / write) commands (e.g., using second command manager 434) to access storage medium 404 as a storage device.

[0065] The first command manager 436 may implement a CXL protocol that may enable a user (e.g., application 438) to access the storage medium 404 as a memory using a load / store command, which may specify a requested data location as a memory address (e.g., a memory address that may be mapped to the "system memory space of the host 401"). The load / store command, load data, store data, etc. may be sent and / or received using one or more connections 446 (e.g., using the CXL.mem protocol). In some embodiments, the first command manager 436 may implement a memory-to-storage address translator (e.g., a CXL to LBA or CXL2LBA translator) to convert the memory address included with the load / store command to an LBA that the MTL 424 may use to access the requested data in the storage medium 404. Alternatively or additionally, one or more of the MTL 424, the cache manager 430, and / or the garbage collection logic 418 may implement a memory-to-storage device address translator.

[0066] The second command manager 434 may implement an NVMe protocol that may enable a user (e.g., application 438) to access the storage medium 404 as a storage device using read / write commands that may specify read and / or write addresses using one or more LBAs. The NVMe protocol may be used to send and / or receive read / write commands, write data, read data, etc. using one or more connections 444. In some embodiments, the NVMe protocol may be implemented using an underlying CXL.io transport scheme.

[0067] In some embodiments, the control logic 408 may include a memory for storing cache configuration information 420 of the cache manager 430. Examples of the cache configuration information 420 may include information regarding the configuration and / or operation of the device cache metadata 423a, the garbage collection buffer metadata 423b, the device cache 406, the queues 417, 419, and / or 425, the garbage collection buffer 410, and the like. For example, the cache configuration information 420 may determine cache parameters such as cache size and / or arrangement (e.g., number of sets, ways, etc.), cache mapping (e.g., direct, set associative, etc.), type of memory used for metadata and / or cache (e.g., tag-in SRAM, tag-in DRAM), cache replacement policy (e.g., random, least recently used (LRU), least frequently used (LFU)), and the like. In some embodiments, examples of the cache configuration information 420 may also include data structures (e.g., Figure 5 The metadata structure for device cache metadata shown in and / or Figure 6 In some embodiments, cache configuration information 420 may be provided by a user (e.g., at a host as shown by arrow 429), an administrator, etc., using one or more interfaces, protocols, etc. that may support configuration and / or management operations (such as, for example, NVMe Management Interface (NVMe-MI), CXL.io, System Management Bus (SMBus), etc.).

[0068] In some embodiments, the device cache metadata 423a may point to the device cache 406, and / or the garbage collection buffer metadata 423b may point to the garbage collection buffer 410. Although the device cache metadata 423a and the garbage collection buffer metadata 423b (which may be individually and / or collectively referred to as 423) are not limited to any particular implementation details, in some embodiments, the device cache metadata 423a may be implemented with an intra-tag SRAM configuration and a set associative cache arrangement in which tags may be stored in SRAM (e.g., in metadata memory 422) and associated cache data may be stored in DRAM (e.g., in device cache 406).

[0069] In some other embodiments, the device cache metadata 423a may be implemented with an inner tag DRAM configuration and a direct mapped cache arrangement or a set associative cache arrangement in which both cache metadata and cache data may be stored in DRAM (e.g., in the device cache 406). Thus, in such embodiments, the device cache metadata 423a and cache data may be stored in the same row and / or column of a page of DRAM. Depending on implementation details, the inner tag DRAM configuration may reduce cache hit and / or cache miss latency. Additionally or alternatively, depending on implementation details, the inner tag DRAM configuration may increase flexibility in configuring and / or programming cache schemes according to the disclosed example embodiments.

[0070] In some embodiments, a cache structure for garbage collection buffer 410 may be implemented with an internal tag SRAM configuration. For example, tag information may be stored in SRAM in metadata memory 422, and associated cache data pointed to by the metadata may be stored in garbage collection buffer 410, which may be implemented, for example, with DRAM. Such a configuration may be beneficial, for example, in embodiments where garbage collection buffer 410 may be organized based on NAND physical pages (e.g., physical block addresses (PBAs)) and / or error correction structures.

[0071] In some embodiments, the garbage collection buffer metadata 423b may use a hash-based data structure, a NAND page-based direct mapping, and / or a random replacement strategy.

[0072] Refer again Figure 4 In some embodiments, the MTL 424 may track the previous PBA and the new PBA of the LBA of data that may be copied to the garbage collection buffer 410 during the garbage collection operation. The MTL 424 may modify (e.g., update) a mapping table (e.g., an LBA to PBA mapping table) to reflect the new PBA of the data associated with the LBA. This may enable the cache manager 430, the garbage collection logic 418, etc. to determine the location of the data associated with the LBA.

[0073] In some embodiments, different cache metadata formats, cache structures, mappings, policies, etc. may be used for the device cache 406 and / or the garbage collection buffer 410, for example, based on their user (e.g., host) address space size, cache address range, etc., related characteristics (e.g., size). For example, the host memory address range used for the device cache 406 may be relatively large compared to the internal or local address (e.g., LBA and / or PBA) range used by the garbage collection buffer 410. Therefore, the metadata for the garbage collection buffer 410 may be relatively small and / or simple compared to the metadata for the device cache 406. In addition, depending on the implementation details, the use of inner tag SRAM technology for the garbage collection buffer metadata 423b may reduce the complexity, cost, development time, etc. associated with implementing the garbage collection buffer metadata 423b with an inner tag DRAM configuration.

[0074] Figure 5 An example embodiment of a metadata structure for device cache metadata according to a disclosed example embodiment is shown. For example, Figure 5 The embodiments shown in the figure can be used to implement Figure 4 4. In some embodiments, the device cache metadata 423a and / or a portion or all of the device cache 406 may be shown in FIG. Figure 5The metadata structure shown in may include cache medium 506, which in this example may be implemented using DRAM, but in other embodiments may be implemented using one or more other types of media. Cache medium 506 may include portions 540-1, ..., 540-N, and one or more (e.g., each) of portions 540-1, ..., 540-N may implement a 4-way set associative cache structure that "may include a portion of device cache metadata 423a (e.g., one or more tags, indexes, etc.) and corresponding cache data." Therefore, depending on implementation details, part or all of device cache metadata 423a (e.g., one or more tags, indexes, etc.) and corresponding cache data may be organized in the same row and / or column of a page of DRAM.

[0075] Figure 5 Also shown are some additional and / or optional metadata structures that may be used with device cache metadata 423a and corresponding cache data. For example, portion 542 may include one or more tags arranged with the data in a direct-mapped arrangement, and portion 544 may include one or more tags arranged with the data in a 2-way set-associative arrangement.

[0076] Figure 6 An example embodiment of a metadata structure for garbage collection buffer metadata according to an example embodiment disclosed is shown. For example, Figure 6 The embodiments shown in the figure can be used to implement Figure 4 4. The garbage collection buffer metadata 423b and / or part or all of the garbage collection buffer 410 shown in FIG. Figure 6 The metadata structure shown in the figure may implement an internal tag SRAM configuration in which garbage collection buffer metadata 623b (e.g., one or more tags, indexes, etc.) may be stored in a metadata memory 622, which may be implemented, for example, with SRAM. All or a portion of the garbage collection buffer 610 may be implemented with DRAM. One or more (e.g., each) of the metadata 623b-1, 623b-2, ..., 623-N (which may be individually and / or collectively referred to as 623b) may point to corresponding cache data in the garbage collection buffer 610 (e.g., data 1 648-1, data 2 648-2, ..., data N 648-N), respectively. The garbage collection buffer metadata 623b may be based on, for example, one or more LBAs, PBAs, etc. of one or more data entries in the garbage collection buffer 610. In some embodiments, at least a portion of the garbage collection buffer metadata 623b may be implemented with a hash table, with a direct mapping, with a set associative mapping, etc.

[0077] Figure 7An embodiment of a method for accessing one or more caches in a device according to an example embodiment of the disclosure is shown. For illustration purposes, Figure 7 The method shown in can be referred to Figure 2 , Figure 3 , Figure 4 , Figure 5 and / or Figure 6 The invention is described with reference to the embodiments shown in the drawings, but is not limited to any details disclosed therein.

[0078] Reference Figure 7 , the method may begin at operation 750, where a request for accessing data from one or more cache media may be received. For example, cache manager 430 may receive a request from MTL 424 to determine whether data associated with a memory load command received by first (e.g., CXL) command manager 436 may be located in device cache 406 or garbage collection buffer 410. The request received by cache manager 430 may include, for example, a memory address (e.g., a system memory address) of the requested data.

[0079] At operation 752, the method may check whether the requested data (e.g., a copy of the requested data) is located in a device cache (e.g., device cache 406). In some embodiments, to perform the check, the method may proceed to operation 754, where the method may access device cache metadata 423a stored in metadata memory 422. After obtaining the device cache metadata 423a, the method may return to operation 752, where the method may perform a check, for example, by comparing a tag, index, etc. in the device cache metadata 423a with a tag, index, etc. contained within a memory address of the requested data.

[0080] At operation 756, if the method determines that the requested data is located in the device cache 406 (e.g., at least a portion of the device cache metadata 423a matches the corresponding portion (or portion) of the memory address of the requested data) (device cache hit), the method may proceed to operation 758, where the method may access the requested data in the device cache 406. The method may send the requested data to the MTL 424, which may send the requested data to the user, for example, in response to a memory load command received by the first (e.g., CXL) command manager 436.

[0081] However, at operation 756, if the method determines that the requested data is not located in the device cache 406 (device cache miss), the method may proceed to operation 760, where the method may check whether the requested data (e.g., a copy of the requested data) is located in the garbage collection buffer (e.g., garbage collection buffer 410). In some embodiments, to perform the check, the method may proceed to operation 762, where the method may access the garbage collection buffer metadata 423b stored in the metadata memory 422. After obtaining the garbage collection buffer metadata 423b, the method may return to operation 760, where the method may perform the check, for example, by comparing the tags, indexes, etc. in the garbage collection buffer metadata 423b with the tags, indexes, etc. contained in the local storage address of the requested data. In some embodiments, the local storage address (e.g., PBA) may correspond to the memory address of the requested data. For example, the local storage address may be obtained using a CXL to LBA conversion and / or an LBA to PBA mapping table. The cache manager 430 may request the local storage address from the MTL 424. Alternatively or additionally, when the MTL 424 sends the request to the cache manager at operation 750 , the MTL 424 may send a local storage address corresponding to the memory address of the requested data to the cache manager 430 .

[0082] At operation 764, if the method determines that the requested data is located in the garbage collection buffer 410 (e.g., at least a portion of the garbage collection buffer metadata 423b matches a corresponding portion (or portion) of the internal or local storage address of the requested data) (a garbage collection buffer hit), the method may proceed to operation 766, where the method may obtain a PBA of the requested data, for example, from the MTL 424. At operation 768, the method may access the requested data in the garbage collection buffer 410 using the PBA. In some embodiments, the cache manager 430 may access the requested data in the garbage collection buffer 410 by placing a read request in the access request queue 425. The method may send the requested data to the MTL 424, which may send the requested data to the user, for example, in response to a memory load command received by the first (e.g., CXL) command manager 436.

[0083] However, at operation 764, if the method determines that the requested data is not located in the garbage collection buffer 410 (a garbage collection buffer miss), the method may proceed to operation 770, where the command manager 436 may notify the MTL 424 that the requested data is not located in the device cache 406 or the garbage collection buffer 410. Based on the notification, at operation 772, the MTL 424 may access the requested data from the storage medium, for example, using the NAND interface layer 426. The MTL 424 may send the requested data to the user, for example, in response to a memory load command received by the first (e.g., CXL) command manager 436.

[0084] Figure 8 Another embodiment of a method for accessing one or more caches in a device according to an example embodiment of the disclosure is shown. For illustration purposes, Figure 8 The method shown in can be referred to Figure 2 , Figure 3 , Figure 4 , Figure 5 , Figure 6 and / or Figure 7 The invention is described with reference to the embodiments shown in the drawings, but is not limited to any details disclosed therein.

[0085] In some respects, Figure 8 The operation of the method shown in Figure 7 The operation of the method shown in is similar, wherein similar elements may be indicated by reference numerals ending with and / or containing the same numbers, letters, etc. However, in Figure 8 In the illustrated embodiment, operation 852 , operation 854 , and / or operation 856 may be performed in parallel with operation 860 , operation 862 , and / or operation 864 .

[0086] Furthermore, at operation 856, if the method determines that the requested data is not located in the device cache 406 (device cache miss), the method may proceed to operation 870, where the command manager 436 may notify the MTL 424 that the requested data is not located in the device cache 406. Additionally, at operation 864, if the method determines that the requested data is not located in the garbage collection buffer 410 (garbage collection buffer miss), the method may proceed to operation 870, where the command manager 436 may notify the MTL 424 that the requested data is not located in the garbage collection buffer 410.

[0087] At operation 872, based on the notification that the requested data is not located in the device cache 406 or the garbage collection buffer 410, the MTL 424 may access the requested data from the storage medium, for example, using the NAND interface layer 426. The MTL 424 may send the requested data to the user, for example, in response to a memory load command received by the first (e.g., CXL) command manager 436.

[0088] Depending on implementation details, performing some or all of operation 852 and / or operation 856 in parallel with operation 860 and / or operation 864 may reduce latency associated with accessing data in device cache 406 or garbage collection buffer 410 .

[0089] In some embodiments, a memory medium (e.g., a device cache) may be configured as a visible memory space backed up by a storage medium (e.g., a storage medium configured as an invisible persistent space that can be used to persist data stored in the visible memory space). In such embodiments, a request to access a storage medium configured as visible memory backed up by a storage medium may be referred to as a request to access the storage medium. For example, in Figure 4 In some implementations of the embodiments shown in , control logic 408 may be configured to operate device cache 406 (which may be implemented with a volatile memory medium) in a manner that causes the device cache to appear as a persistent memory space visible to a user. However, because device cache 406 may be implemented with a volatile memory medium, control logic 408 may be configured to operate a portion or all of storage medium 404 (which may be implemented with non-volatile memory) as a persistent space that may not be visible to a user, but may be used to persist (e.g., save) data stored in device cache 406 (e.g., in the event of a power loss). In such embodiments, a request (e.g., a load command, a store command, a copy command, etc.) to access device cache 406 may be referred to as a request to access the storage medium.

[0090] Some embodiments may implement an architecture that can manage device cache and / or garbage collection buffer media, for example, in a storage device that can implement a memory access protocol such as CXL. In some embodiments, a cache manager may be implemented as a module that can manage device cache and / or garbage collection buffer media. Some embodiments may implement a cache metadata structure that can provide access to user data (e.g., in a device cache and / or garbage collection buffer) and / or garbage collection data. Some embodiments may implement a scheme for queue priorities: for example, an access request queue (e.g., for a garbage collection buffer) may have a different (e.g., higher) priority than a garbage collection read queue and / or a garbage collection write queue. Depending on implementation details, one or more features according to the disclosed example embodiments may reduce access latency (e.g., tail latency) for accessing a storage medium in a device. In some embodiments, at least a portion of a first cache (e.g., a garbage collection buffer) may be used as (e.g., reused or repurposed) all or part of a second cache (e.g., a device cache).

[0091] Fig. 9 Example embodiments of a host device according to disclosed example embodiments that may be used to implement any host and / or other user functionality disclosed herein are shown. Fig. 9 The host device 980 shown in FIG. 9 may include a processor 982 , which may include a memory controller 984 , a system memory 986 , host logic 988 , and / or a communication interface 983 . Fig. 9 Any or all of the components shown in the figure may communicate via one or more system buses 985. In some embodiments, Fig. 9 One or more of the components shown in the embodiment may be implemented using other components. For example, in some embodiments, the host logic 988 may be implemented by a processor 982 executing instructions stored in a system memory 986 or other memory.

[0092] Host logic 988 may be used to implement any host and / or other user functionality disclosed herein (e.g., one or more of host 401 and / or application 438), as well as to provide cache configuration information 420 to the host computer 401 as described above with respect to FIG. Figure 4 The storage device 402.

[0093] Fig.10 An example embodiment of a device that can be used to implement any device functionality disclosed herein according to the disclosed example embodiments is shown. Device 1090 may include a device controller 1092, a media conversion layer 1094 (e.g., FTL), a storage medium 1096, a cache medium 1098, a control logic 1097, and / or a communication interface 1093. Fig.10The components shown in the figure may communicate via one or more device buses 1095. In some embodiments where flash memory may be used for part or all of storage media 1096, media translation layer 1094 may be partially or completely implemented as a flash translation layer (FTL).

[0094] Control logic 1097 may be used to implement any of the device functions disclosed herein (e.g., as described above with respect to Figure 1 , Figure 2 , Figure 3 and / or Figure 4 One or more of the garbage collection logic, queue, media conversion layer, flash conversion layer, cache manager, command manager, etc.).

[0095] Fig.11 An embodiment of a method for accessing a cache medium of a device according to an example embodiment of the disclosure is shown. At operation 1102, the method may start. At operation 1104, the method may receive a first request for accessing a storage medium at a device including a storage medium, wherein the device also includes a cache medium and a buffer medium. For example, referring to Figure 2 , a device 202 having a storage medium 204 , a device cache (eg, a first cache) 206 , and a data buffer (eg, a second cache) 210 may receive an access request (eg, a first request) 209 for accessing the storage medium 204 .

[0096] Reference Fig.11 At operation 1106, the method may access the cache medium based on the first request. Figure 3 and Figure 7 , at operation 758 , the control logic 308 may access the device cache 306 .

[0097] Reference Fig.11 At operation 1108, the method may copy data from a portion of the storage medium to a buffer medium. Figure 3 , the garbage collection logic 318 may copy valid data in the data unit 311 for the garbage collection operation from the storage medium 304 to the garbage collection buffer 310 .

[0098] Reference Fig.11 At operation 1110, the method may modify the portion of the storage medium to a usable state based on the copy. Figure 3 , the garbage collection logic 318 may erase one or more availability units (eg, erase blocks) 314 from which valid data is copied to the garbage collection buffer 310 .

[0099] Reference Fig.11At operation 1112, the method may receive a second request for accessing the storage medium at the device. Figure 2 , the device 202 may receive an access request (eg, a second request) 209 for accessing the storage medium 204 .

[0100] Reference Fig.11 At operation 1114, the method may access the buffer medium based on the second request. Figure 3 and Figure 7 At operation 768, control logic 308 may access garbage collection buffer 310. At operation 1116, the method may end.

[0101] Fig.11 The embodiments shown in and all other embodiments described herein are example operations and / or components. In some embodiments, some operations and / or components may be omitted and / or other operations and / or components may be included. In addition, in some embodiments, the time and / or spatial order of operations and / or components may be changed. Although some parts and / or operations may be shown as separate components, in some embodiments, some components and / or operations shown separately may be integrated into a single component and / or operation, and / or some components and / or operations shown as a single component and / or operation may be realized with multiple components and / or operations.

[0102] Any functionality described herein, including any functionality that may be implemented by a host, device (e.g., storage device), etc., or a combination thereof (including, for example, any of a cache (e.g., device cache, garbage collection buffer), metadata storage, and / or control logic (such as garbage collection logic, queues, media translation layer, flash translation layer, cache manager, command manager, etc.)) may be implemented by hardware (e.g., circuitry), software, firmware, or any combination thereof (including, for example, hardware and / or software combination logic of "executing instructions stored in any type of memory", sequential logic, timers, counters, registers, state machines, volatile memory (such as DRAM and / or SRA) M), non-volatile memory (including flash memory, persistent memory (such as cross-grid non-volatile memory, memory with body resistance change, PCM, etc.)), one or more complex programmable logic devices (CPLD) field programmable gate arrays (FPGA), application-specific circuits (ASICs), processors including one or more complex instruction set computer (CISC) processors (such as x86 processors) and / or reduced instruction set computer (RISC) processors (such as ARM processors), graphics processing units (GPUs), neural processing units (NPUs), tensor processing units (TPUs), data processing units (DPUs), etc., or any combination thereof). In some embodiments, one or more components may be implemented as a system on a chip (SOC).

[0103] Some embodiments disclosed above have been described in the context of various implementation details, but the principles of the present disclosure are not limited to these or any other specific details. For example, some functions have been described as being implemented by specific components, but in other embodiments, functions may be distributed in different locations and between different systems and components with various user interfaces. Specific embodiments have been described as having specific processing, operations, etc., but these terms also cover embodiments in which specific processing, operations, etc. can be implemented with multiple processing, operations, etc. or in which multiple processing, operations, etc. can be integrated into a single processing, step, etc. Reference to a component or element may represent only a part of a component or element. For example, a reference to a block may represent an entire block or one or more sub-blocks. Unless it is obvious from the context, the use of terms (such as, "first" and "second") in the present disclosure and claims may only be used to distinguish the purpose of the elements they modify, and may not indicate any spatial or temporal order. In some embodiments, reference to an element may represent at least a portion of an element, for example, "based on" may represent "based at least in part on", etc. Reference to a first element may not imply the presence of a second element. The principles disclosed herein have independent practicality and may be implemented separately, and not every embodiment may utilize each principle. However, the principles can also be embodied in various combinations, some of which can amplify the benefits of the individual principles in a synergistic manner. According to the inventive principles of this patent disclosure, the various details and embodiments described above can be combined to produce additional embodiments.

[0104] Since the inventive concepts of this patent disclosure may be modified in arrangement and detail without departing from the inventive concept, such changes and modifications are considered to fall within the scope of the appended claims.

Claims

1. A device for cache operation in a storage device, include: Storage media; Cache media; buffer medium; as well as At least one control circuit is configured to: perform one or more operations, the one or more operations comprising: receiving a first request for accessing a storage medium; accessing a cache medium based on the first request; copying data from a portion of a storage medium to a buffer medium; modifying availability of the portion of the storage medium based on the copying process; receiving a second request to access the storage medium; and The buffer medium is accessed based on the second request.

2. The device according to claim 1, in, The one or more operations also include: determining a location of data associated with the second request; and The buffer medium is accessed based on the determined process.

3. The device according to claim 1, in: The one or more operations also include: receiving information regarding a location of data associated with the second request; and The process of accessing the buffer medium is based on the information.

4. The device according to claim 3, in, The information includes a portion of the address.

5. The device according to claim 3, in, The information comprises a portion of a data structure.

6. The device according to any one of claims 1 to 5, further comprising: include: a first queue configured to store access requests for replication processing; as well as The second queue is configured to store the second request.

7. The device according to any one of claims 1 to 5, in, The second request comprises a memory access request.

8. The device according to any one of claims 1 to 5, in: The one or more operations further include: accessing a buffer medium based on a first priority; and The replication is processed based on the second priority.

9. The device according to any one of claims 1 to 5, in, The portion of the storage medium is a first portion of the storage medium, and the one or more operations further include: reading said data from a buffer medium based on a copy process; and The data is stored in a second portion of the storage medium.

10. The device according to claim 9, in: Access to the buffer medium is processed based on a first priority; and Reads are processed based on the second priority.

11. A method for cache operation in a storage device, include: Receiving, at an apparatus including a storage medium, a first request for accessing a storage medium, wherein the apparatus further includes a cache medium and a buffer medium; accessing a cache medium based on the first request; copying data from a portion of a storage medium to a buffer medium; modifying availability of the portion of the storage medium based on the step of replicating; receiving, at the device, a second request for access to a storage medium; and The buffer medium is accessed based on the second request.

12. The method according to claim 11, further comprising: include: determining a location of data associated with the second request; as well as The buffer medium is accessed based on the determined steps.

13. The method according to claim 11, further comprising: include: receiving information regarding a location of data associated with the second request; as well as A buffer medium is accessed based on the information.

14. The method according to claim 13, in, The information includes a portion of the address.

15. The method according to claim 13, in, The information comprises a portion of a data structure.

16. The method according to any one of claims 11 to 15, in: The first request comprises a first memory access request; and The second request includes a second memory access request.

17. The method according to any one of claims 11 to 15, in: The step of accessing the buffer medium based on the second request is performed at a first priority; and The copying step is performed with second priority.

18. An apparatus for cache operation in a storage device, include: Storage media; buffer medium; as well as At least one control circuit is configured to perform one or more operations, the one or more operations comprising: copying data from a portion of a storage medium to a buffer medium; modifying availability of the portion of the storage medium based on the copying process; receiving a request to access a storage medium; and A buffer medium is accessed based on the request.

19. The device according to claim 18, in, The one or more operations also include accessing a storage medium based on the request.

20. The device according to claim 18 or 19, in: The one or more operations also include: receiving information regarding a location of data associated with the request; and The access is processed based on said information.