System and method for cache management of storage devices
By introducing cache controllers and prefetching algorithms in storage devices, prefetching data from nonvolatile memory to cache memory, solving the problem of data access latency of storage devices and improving system performance and responsiveness.
Patent Information
- Application Number
- CN202410559765.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-06-26
- Filing Date
- 2024-05-08
- Publication Date
- 2024-11-12
AI Technical Summary
Existing storage devices have delays in data access, especially the data transmission efficiency between volatile storage media and nonvolatile storage media is low, affecting system performance and responsiveness.
Using a cache management system, by introducing a cache controller in the storage device, prefetching data from nonvolatile memory to cache memory using a prefetch algorithm, reducing memory access latency, and generating cache management instructions through software Optimize data access policies.
It effectively reduces memory access latency, improves system performance and response capabilities, reduces the load of host resources such as CPU, and improves data access efficiency.
Smart Images

Figure CN118939570A_ABST
Abstract
Description
Technical Field
[0001] One or more aspects according to embodiments of the present disclosure relate to storage devices, and more particularly to managing cache in storage devices. Background Art
[0002] Applications may perform computations on large amounts of data. As such computations increase, the demand for storage devices and memory also increases.
[0003] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure and therefore it may contain information that does not constitute the prior art. Summary of the invention
[0004] One or more embodiments of the present disclosure relate to a storage device. The storage device includes a first storage medium, a processor configured to communicate with the first storage medium, and a memory coupled to the processor. The memory stores instructions, which, when executed by the processor, cause the processor to: receive a first code provided by a computing device; execute the first code; perform a first update of the first storage medium based on the first code; receive a second code provided by the computing device; execute the second code; and perform a second update of the first storage medium based on the second code.
[0005] According to some embodiments, the first code is used to retrieve the first data from the second storage medium and store the first data in the first storage medium.
[0006] According to some embodiments, the second code is used to modify the first data from the first storage medium.
[0007] According to some embodiments, the second code is for retrieving the second data from the second storage medium and storing the second data in the first storage medium.
[0008] According to some embodiments, the first storage medium includes volatile memory and the second storage medium includes non-volatile memory.
[0009] According to some embodiments, the instructions further cause the processor to: receive a first command from the computing device; access a first storage medium for first data based on the first command; determine a first state of the first data associated with the first storage medium; and retrieve the first data from the first storage medium.
[0010] According to some embodiments, the instructions further cause the processor to: receive a second command from the computing device; check the first storage medium for the first data based on the second command; determine a second state of the first data associated with the first storage medium; and retrieve the first data from the second storage medium.
[0011] According to some embodiments, a storage device includes a cache controller to handle movement of data from a second storage medium to a first storage medium.
[0012] According to some embodiments, the first code comprises compiled machine readable code.
[0013] According to some embodiments, a computing device is configured to provide an interface for generating source code, wherein the source code is compiled into a first code.
[0014] One or more embodiments of the present disclosure also relate to a method, comprising: receiving a first code provided by a computing device; running the first code; performing a first update of a first storage medium based on the first code; receiving a second code provided by the computing device; running the second code; and performing a second update of the first storage medium based on the second code.
[0015] These and other features, aspects and advantages of the embodiments of the present disclosure will be more fully understood when considered with reference to the following detailed description, appended claims and accompanying drawings.Of course, the actual scope of the invention is defined by the appended claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Non-limiting and non-exhaustive embodiments of the present invention are described with reference to the following figures, wherein like reference numerals refer to like parts throughout the various views unless otherwise specified.
[0017] Figure 1 depicts a block diagram of a system for managing cache memory of a storage device according to one or more embodiments;
[0018] Figure 2 depicts a block diagram of a storage controller according to one or more embodiments;
[0019] Figure 3 depicts example code that may be called to run a cache prefetch algorithm in accordance with one or more embodiments;
[0020] Figure 4 Depicting example source code for a second operating process including a second cache management function according to one or more embodiments;
[0021] Figure 5 Depicting example source code for a third operating process including a third cache management function according to one or more embodiments;
[0022] Figure 6 A flowchart depicting a process for generating source code for cache management functionality according to one or more embodiments; and
[0023] Figure 7A flow diagram of a process for running cache management code is depicted in accordance with one or more embodiments. DETAILED DESCRIPTION
[0024] Hereinafter, example embodiments will be described in more detail with reference to the accompanying drawings, in which the same reference numerals always refer to the same elements. However, the present disclosure may be implemented in various different forms and should not be construed as being limited to the embodiments shown herein. On the contrary, these embodiments are provided as examples so that the present disclosure will be thorough and complete, and will fully convey the aspects and features of the present disclosure to those skilled in the art. Therefore, processes, elements and techniques that are not necessary for a complete understanding of the aspects and features of the present disclosure for those of ordinary skill in the art may not be described. Unless otherwise stated, throughout the drawings and written descriptions, the same reference numerals represent the same elements, and therefore their descriptions are not repeated. In addition, in the drawings, for clarity, the relative sizes of elements, layers and regions may be enlarged and / or simplified.
[0025] Embodiments of the present disclosure are described below with reference to block diagrams and flow charts. Therefore, it should be understood that each block of block diagrams and flow charts can be implemented in the form of computer program products, complete hardware embodiments, combinations of hardware and computer program products, and / or devices, systems, computing devices, computing entities, and / or executing interchangeable instructions, operations, steps and similar words (such as executable instructions, operating instructions, program codes, etc.) on computer-readable storage media. For example, the retrieval, loading and operation of code can be performed sequentially so that an instruction is retrieved, loaded and operated once. In some example embodiments, retrieval, loading and / or operation can be performed in parallel so that multiple instructions are retrieved, loaded and / or operated together. Therefore, such embodiments can produce a specially configured machine that performs the steps or operations specified in the block diagrams and flow charts. Therefore, block diagrams and flow charts support various combinations of embodiments for executing specified instructions, operations or steps.
[0026] Applications can interact with storage or memory devices (collectively referred to as storage devices) to read (or load) and write (or store) data. There is often latency when accessing storage devices. The type of latency involved may depend on the storage media included in the storage device. Some storage media have lower latency than other storage media. Therefore, it may be desirable to manage the data in the storage devices in order to improve overall system performance and responsiveness.
[0027] Generally speaking, an application running on a host computing device (referred to as a "host") may need to store data to and load data from a storage device. There is typically a delay when accessing a storage device. Depending on the storage medium storing the data to be retrieved, the delays involved may be different. For example, a storage device may have a volatile storage medium (e.g., dynamic random access memory (DRAM)) and a non-volatile storage medium (e.g., NAND flash memory). The latency of a volatile storage medium may be lower than the latency of a non-volatile storage medium. It may be desirable to use a volatile storage medium as a cache memory, where blocks, groups, or pages of data (collectively referred to as "blocks") that are expected to be accessed soon can be moved to the cache memory.
[0028] In general, embodiments of the present disclosure are directed to systems and methods for providing management of cache memory in a storage device. The management may include, for example, specifying, through software, a prefetch algorithm for prefetching data from a non-volatile memory (NVM) of a storage device to the cache memory. In some embodiments, a user may program cache management instructions through an interface provided by a host. The user may determine the type of instructions to be programmed based on, for example, the characteristics of an application that is to access the storage device, the characteristics of the storage device, and the like.
[0029] In some embodiments, the cache management instructions include prefetch instructions that, when executed by the storage device, cause data to be prefetched from the NVM to the cache memory - all within the same storage device. In some embodiments, unlike the prefetch function executed by the host's central processing unit (CPU) to prefetch data from the storage medium into the CPU cache, the prefetch instructions according to one or more embodiments are loaded and executed by the storage device. This helps free up the host CPU and other host resources to execute instructions other than prefetch instructions.
[0030] In some embodiments, prefetching of data from the NVM to the cache memory also helps reduce memory access latency (e.g., in the event of a cache hit), which helps improve overall system performance and responsiveness. For example, by prefetching data that results in a cache hit, the wait time for the CPU to receive the requested data from the storage device can be reduced.
[0031] Figure 1 A block diagram of a system for managing cache memory of a storage device according to one or more embodiments is depicted. The system may include a host computing device ("host") 100 coupled to a storage device 102 via one or more data communication links 104. In some embodiments, data communication link 104 may include various common interfaces such as, for example, Ethernet, a universal serial bus (USB), and / or any wired or wireless data communication link.
[0032] The host 100 may include a processor 106, a memory 108, and a host interface 110. The processor 106 may be configured to run one or more applications 112 based on instructions stored in the memory 108. The application 112 may be any application configured to send a request (e.g., a data access request) to the storage device 102. For example, the application 112 may be a big data analysis application, an e-commerce application, a database application, a machine learning application, etc. Data requests, such as load and store requests, may be generated during the execution of the application 112. The application may use the results of the data requests to generate outputs.
[0033] The application 112 may communicate with the storage device 102 through the host interface 110. The host interface 110 may include a physical connection as well as software instructions that may be executed by the processor 106. In some embodiments, the host interface 110 allows the host 100 and the storage device 102 to send and receive data using a protocol such as, for example, CXL, although the embodiments are not limited thereto. The performance of the application 112 may depend on the speed at which the storage device 102 retrieves the requested data and returns it to the application.
[0034] In addition to or instead of CXL, the host interface 110 may use other protocols, such as a cache coherent interconnect for accelerators (CCIX), a dual in-line memory module (DIMM) interface, a small computer system interface (SCSI), a non-volatile memory interconnect express (NVMe), a peripheral component interconnect express (PCIe), Ethernet remote direct memory access (RDMA), a serial advanced technology attachment (SATA), a Fibre Channel, a serial attached SCSI (SAS), NVMe over fiber (NVMe-oF), an iWARP protocol, an InfiniBand protocol, a 5G wireless protocol, a Wi-Fi protocol, a Bluetooth protocol, and the like.
[0035] In some embodiments, the processor 106 is further configured to run a code generator 114. The code generator 114 may provide an interface that a user may access to generate cache management instructions to manage cache memory of the storage device 102. The cache management instructions may include cache prefetch instructions, cache flush instructions, cache replacement instructions, cache locality hints, etc.
[0036] In some embodiments, the code generator 114 provides a library of cache management functions that a user can select depending on the type of cache management desired. The type of cache management desired can depend on, for example, the type of application 112 accessing the storage device. For example, random workload access patterns may be difficult to predict from the storage device itself. However, the user application may be able to predict the data that may be accessed next. The code generator 114 can use the prediction data to generate prefetch hints to send to the storage device.
[0037] Storage device 102 may take the form of a solid state drive (SSD), persistent memory, etc. In some embodiments, storage device 102 includes (or is embodied as) an SSD with cache coherence and / or compute capabilities. In some embodiments, storage device 102 includes (or is embodied as) a dual-mode persistent memory with dual-mode access to its storage space. In a first mode, storage device 102 is accessible as disk storage (e.g., via CXL.io). In a second mode, storage device 102 is accessible as device-attached storage (e.g., via CXL.mem or CXL.cache).
[0038] In some embodiments, the storage device 102 includes a storage controller 116, a storage memory 118, and a non-volatile memory (NVM) 120. The storage memory 118 may be a high-performance memory of the storage device 102, and may include (or may be) a volatile memory (e.g., DRAM), but the present disclosure is not limited thereto, and the storage memory 118 may be any suitable type of high-performance volatile or non-volatile memory. Although a single storage memory 118 is described for simplicity, those skilled in the art will recognize that the storage device 102 may include other local memories for temporarily storing other data of the storage device.
[0039] In some embodiments, storage memory 118 is used and managed as a cache memory. In this regard, storage memory (also referred to as cache) 118 can store a copy of data stored in NVM 120. For example, data that application 112 is to access in the near future can be copied from NVM 120 to storage memory 118 to allow data to be retrieved from storage memory 118 instead of NVM 120. In some embodiments, storage memory 118 has a lower access latency than NVM 120. Therefore, in some embodiments, accessing data from storage memory 118 helps improve overall system performance and responsiveness.
[0040] NVM 120 may persistently store data received, for example, from host 100. NVM 120 may include, for example, NAND flash memory, but the present disclosure is not limited thereto, and NVM 120 may include any suitable type of memory (e.g., magnetic disk, tape, optical disk, etc.) for permanently storing data depending on the implementation of storage device 102.
[0041] The storage controller 116 may be connected to the NVM 120 and the storage memory 118 via one or more storage interfaces 122a, 122b (collectively referred to as 122). The storage controller 116 may receive input / output (I / O) requests (e.g., load or store requests) from the host 100, and send commands to and from the NVM 120 and / or the storage memory 118 to implement the I / O requests. In this regard, the storage controller 116 may include at least one processing component embedded thereon for interfacing with the host 100, the storage memory 118, and the NVM 120. The processing component may include, for example, a digital circuit (e.g., a microcontroller, a microprocessor, a digital signal processor, or a logic device (e.g., a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), etc.)) capable of executing data access instructions (e.g., via firmware and / or software) to provide access to data stored in the storage memory 118 or the NVM 120 according to the data access instructions.
[0042] In some embodiments, the storage controller 116 receives cache management program instructions from the host 100. The storage controller 116 can load and execute program instructions to control the management of the storage memory 118. The program instructions can be an extended Berkeley packet filter (eBPF) program format, although the embodiments are not limited thereto. The program instructions can be implemented in other formats such as, for example, other types of machine code, byte code, or program formats that can be executed by the storage controller 116. The storage controller 116 loads and executes the program instructions to avoid calling the host processor 106 to execute the instructions.
[0043] In some embodiments, the cache management instructions include data prefetch instructions that allow the storage controller 116 to prefetch data from the NVM 120 to the storage memory 118. Prefetching data may require, for example, retrieving data from the NVM 120 to the storage memory 118 before the application 112 needs the data to perform a calculation. The user may determine the details of the prefetch algorithm through the code generator 114, including, for example, the data block to be prefetched, the size of the block, etc. In this way, the user can control the prefetch strategy through software, and the execution of the software can be performed by the storage controller 116.
[0044] Figure 2A block diagram of a storage controller 116 according to one or more embodiments is depicted. The storage controller 116 includes an NVM controller 200, a cache controller 202, a request consolidator 204, and a storage processor 206. Although the NVM controller 200, the cache controller 202, the request consolidator 204, and the storage processor 206 are assumed to be separate components, those skilled in the art will recognize that one or more components may be combined or integrated into a single component, or further subdivided into further subcomponents, without departing from the spirit and scope of the inventive concept.
[0045] In some embodiments, NVM controller 200, cache controller 202, and / or storage processor 206 may include, for example, digital circuits such as a microcontroller, a microprocessor, a digital signal processor, or a logic device such as a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), etc. (collectively referred to as a processor). The digital circuit may include a memory that stores instructions (e.g., software, firmware, and / or hardware code) executed by the processor.
[0046] In some embodiments, the NVM controller 200 is configured to receive data access requests from the host 100. Using CXL as an example, the data access request can be based on the CXL.io protocol, which allows the NVM 120 to be accessed by the host CPU as disk storage. In some embodiments, the NVM controller 200 includes a flash translation layer (FTL) 208, which receives the data access request and interfaces with the NVM 120 to read data from the NVM and write data to the NVM. In this regard, the FTL 208 can convert the disk block address included in the data access request into a flash block address. In doing so, the FTL 208 can perform wear leveling to move data around the storage cells of the NVM 120, thereby evenly distributing writes to the NVM 120.
[0047] Referring again to CXL as an example, the data access request may be based on the CXL.mem or CXL.cache protocol, which allows the NVM 120 to be accessed by the host CPU as device attached memory. In some embodiments, the request merger 204 receives the memory access request and calls the cache controller 202 to determine whether the requested data is stored in the storage memory 118 (e.g., a cache hit). The storage memory 118 may store the data in one or more cache lines 210. The cache controller 202 may identify the appropriate cache line 210 that may store the requested data (e.g., based on the requested memory address) and retrieve the requested data from the identified cache line that is present in the cache line. The requested data may be returned to the requesting application 112.
[0048] In the event that the requested data is not in the storage memory 118 (e.g., a cache miss), the cache controller 202 may communicate with the NVM controller 200 to access and return the data from the NVM 120. In this regard, the cache controller 202 or the FTL 208 may be configured to convert the requested memory block address into a flash block address. The latency involved in accessing data from the NVM 120 may be higher than the latency involved in accessing data from the storage memory 118. Therefore, it may be desirable to manage the storage memory 118 according to one or more cache management policies to allow efficient use of the storage memory 118 to improve cache hit rates.
[0049] In some embodiments, cache management functionality, including, for example, cache prefetch instructions generated via code generator 114, is loaded into storage processor 206 (e.g., into a local memory accessible to storage processor 206) as executable code 212. In this regard, NVM controller 200 may receive code 212 from host 100 and store the code in storage processor 206.
[0050] The storage processor 206 may execute code 212 loaded by the NVM controller 200 to perform one or more cache management functions. For example, if the code is to pre-fetch data from the NVM 120 into the storage memory 118, the storage processor 206 may interact with the cache controller 202 (e.g., via the request merger 204) to implement the movement of data from the NVM 120 to the cache line 210 of the storage memory 118.
[0051] In some embodiments, the storage processor 206 is isolated from other components (e.g., FTL 208, cache controller 202, etc.) to hide the details of data movement into and out of storage memory 118. For example, where the code 212 includes data prefetch instructions, the storage processor 206 runs the code and sends a request for a storage block to be prefetched. The request may result in additional processing and / or data movement details that are hidden from the storage processor 206. Such processing and / or data movement details may include converting a storage block to a flash address, selecting a cache address (e.g., cache line 210) to store data, and reading and storing data to the cache address.
[0052] Figure 3Depicted is example code that can be called to run a cache prefetch algorithm according to one or more embodiments. In some embodiments, a user accesses the code generator 114 to generate a software prefetcher source code 300. The software prefetcher source code 300 may include, for example, a prefetch function 302 that prefetches data stored in one or more memory addresses. The prefetch function 302 may be, for example, one or more library functions provided by the host 100.
[0053] In some embodiments, the software prefetcher source code 300 is compiled by a compiler to generate machine code, bytecode or another executable program format. In some embodiments, the software prefetcher source code 300 is compiled into an eBPF program format.
[0054] In some embodiments, the work process 304 can be run by an application to retrieve data from the storage device 102 and perform calculations using the retrieved data. The calculations can be performed via the calculation function 310. The calculation function 310 using the data block (n) can cause a data access request for the data block (n) to be sent to the data storage device 102. The application may need to wait for the data block (n) to return before performing the calculation function. Therefore, the performance of the application may depend on the latency of the storage device 102 to return the requested data block. If the requested data block is returned from the storage memory 118, the latency may be shorter. If the requested data block is returned from the NVM 120, the latency may be higher.
[0055] To reduce memory access latency of the storage device 102, the work process 304 may include a storage pre-fetch function 306 that causes the storage device 102 to pre-fetch data block (n+1) from the NVM 120 to the storage memory 118 before requesting data for running the computing function 310. In this way, when the storage device 102 receives a load command for data block (n) when the computing function 310 is called, the requested data block may have been pre-fetched and resides in the storage device 102, thereby allowing the data to be retrieved and returned from the storage device 102 instead of the NVM 120.
[0056] In some embodiments, execution of the storage prefetch function 306 calls an application program interface (API) function 308, which launches a prefetcher kernel (e.g., a compiled version of the software prefetcher source code 300) onto the storage device 102. In some embodiments, the API function 308 calls the host interface 110 to establish a communication path with the storage device 102 via, for example, CXL.io. The prefetcher kernel can be loaded into the storage processor 206 as executable prefetch code 212a via the established communication path.
[0057] Once loaded, the storage processor 206 runs the executable prefetch code 212a to prefetch the requested storage block (e.g., block n+1). At this point, the storage processor 206 may send a command to the cache controller 202 (e.g., via the request merger 204) to prefetch the requested storage block to the storage memory 118. The cache controller 202 may be configured with instructions to implement the data movement from the NVM 120 to the storage memory 118. That is, the user does not need to explicitly encode the data movement instructions. The instructions to implement the data movement may remain hidden from the user.
[0058] In some embodiments, other cache management functions are generated by the user to manage other aspects of the cache instead of or in addition to the storage prefetch function 306. For example, the user may generate cache management instructions such as cache flush instructions, cache replacement instructions, cache locality hints, etc. via the code generator 114 and load them into the storage processor 206 to be run thereon.
[0059] Figure 4 Depicted is example source code for a second working process 400 including a second cache management function 402 in accordance with one or more embodiments. The second cache management function 402 may be, for example, a storage refresh function for causing the storage device 102 to refresh data blocks used in a previous computing function 404. For example, a refresh may be desirable to modify (e.g., remove) data blocks that are used in a streaming fashion and are not expected to be used again from the storage memory 118. In this case, it may not be necessary to keep the data in the storage memory 118.
[0060] Compiled code for the flush functionality may be enabled via an API function (similar to API function 308) onto storage device 102. Storage processor 206 may execute the compiled code to implement a cache flush from storage device 102. In some embodiments, storage processor 206 may execute one or more compiled codes to implement one or more cache management operations.
[0061] Figure 5 Depicted is example source code for a third operating process 500 including a third cache management function 502 in accordance with one or more embodiments. The third cache management function 502 may be, for example, a cache locality hint function that indicates the locality (or lack of locality) of data to be used in a compute function 504. For example, a non-temporal (NTA) hint for a block of data may indicate a lack of locality for the block, causing the storage processor 206 to discard the block after use in the compute function 504.
[0062] Compiled code for the cache locality hint function may be launched onto the storage device 102 via an API function similar to API function 308. The storage processor 206 may execute compiled code for discarding (in the event of an NTA hint) the block after use in the compute function 504.
[0063] Figure 6 A flow chart of a process for generating source code for a cache management function according to one or more embodiments is depicted. The process begins, and in act 600, a user accesses a code generator 114 (which may include a user interface) to generate source code for a desired cache management function (600). The generated source code may be referenced in a work process run by an application 112. In some embodiments, the cache management function programmed by the user may depend on properties of the application 112 and / or the storage device 102. In this regard, the user may customize the cache management function on a per-application basis.
[0064] The source code is compiled by a compiler at act 602. The output of the compiler may be, for example, machine-readable code.
[0065] At action 604, the compiled machine-readable code is unloaded or provided to the storage device 102 to be run thereon. In this regard, the storage device 102 may load the code onto the storage processor 206 via a command to the NVM controller 200. The command may comply with the CXL.io protocol, for example. The loaded code may then be executed by the storage processor 206.
[0066] Figure 7 A flow chart of a process for running cache management code according to one or more embodiments is depicted. The process begins, and in act 700, the storage device 102 receives a first cache management code and stores it in the storage processor 206 (e.g., in a local memory accessible to the storage processor). The first code can be, for example, a pre-fetch code, a cache flush code, a cache replacement code, a cache locality hint, etc.
[0067] In action 702, the storage processor 206 runs the first code. The storage processor 206 running the first code can avoid consuming host CPU resources to run the code. In some embodiments, the running of the first code causes an update (e.g., a first update) of the storage memory 118 (e.g., a cache). Depending on the type of code running, the update can add one or more data blocks to the storage memory 118, modify one or more data blocks from the storage memory, remove one or more data blocks from the storage memory, etc.
[0068] At act 704, the storage processor 206 performs the update based on the first code. For example, if the update is to add data to the storage memory 118, the storage processor 206 may send a corresponding request to the request consolidator 204. The request manager may send one or more other corresponding commands to other components of the storage device 102 to implement the data movement from the NVM 120 to the storage memory 118. In response to the one or more other corresponding commands, the cache controller 202 may identify a cache address of the storage data, the FTL 208 may convert the requested storage block address into a flash block address, and the NVM 120 may retrieve the data from the flash block address.
[0069] At act 706, the storage device 102 receives the second cache management code and stores it in the storage processor 206 (e.g., in a local memory accessible to the storage processor). For example, if the first code is a pre-fetch code, the second code may be a different pre-fetch code or a code for performing a different type of cache management function (e.g., cache flush).
[0070] In action 708, the storage processor 206 executes the second code. The storage processor 206 executing the second code can avoid consuming host CPU resources to execute the code. In some embodiments, the execution of the second code causes an update (e.g., a second update) of the storage memory 118 (e.g., a cache). For example, the second update can add one or more data blocks to the storage memory 118, modify one or more data blocks from the storage memory, remove one or more data blocks from the storage memory, etc.
[0071] At act 710, the storage processor 206 performs an update based on the second code.
[0072] It should be appreciated that the systems and methods for cache management of storage devices described herein provide various advantages, including: 1) they allow a user to manage a cache in a storage device (e.g., dual-mode persistent memory); 2) they allow a user to implement software-based cache prefetch algorithms and other customized cache management policies that can be executed by a storage device (e.g., dual-mode persistent memory); 3) they allow the details of data movement functions (e.g., in and out of the cache) to remain hidden, instead exposing a data movement API (e.g., an instruction library) for access by the user when generating cache management instructions; 4) they help reduce memory access latency (e.g., in the event of a cache hit), and can further help reduce first cold miss penalties; and 5) they improve overall system performance and responsiveness due to reduced memory access latency.
[0073] One or more embodiments of the present disclosure may be implemented in one or more processors. The term processor may refer to one or more processors and / or one or more processing cores. One or more processors may be hosted in a single device or distributed across multiple devices (e.g., on a cloud system). Processors may include, for example, application specific integrated circuits (ASICs), general or dedicated central processing units (CPUs), digital signal processors (DSPs), graphics processing units (GPUs), and programmable logic devices such as field programmable gate arrays (FPGAs). As used herein, in a processor, each function is either performed by hardware configured to (i.e., hardwired) perform the function, or by more general hardware (such as a CPU) configured to run instructions stored in a non-temporary storage medium (e.g., memory). The processor may be manufactured on a single printed circuit board (PCB) or distributed across several interconnected PCBs. The processor may include other processing circuits; for example, a processing circuit may include two processing circuits (FPGA and CPU) interconnected on a PCB.
[0074] It should be understood that although the terms "first", "second", "third", etc., may be used herein to describe various elements, components, regions, layers and / or parts, these elements, components, regions, layers and / or parts should not be limited by these terms. These terms are only used to distinguish one element, component, region, layer or part from another element, component, region, layer or part. Therefore, without departing from the spirit and scope of the present invention, the first element, component, region, layer or part discussed herein may be referred to as a second element, component, region, layer or part.
[0075] The terms used herein are only used for the purpose of describing specific embodiments and are not intended to limit the concept of the present invention. In addition, unless explicitly stated, the embodiments described herein are not mutually exclusive. The various aspects of the embodiments described herein can be combined in some implementations.
[0076] As used herein, the terms "substantially," "approximately," and similar terms are used as terms of approximation rather than terms of degree, and are intended to account for the inherent variations in measurements or calculations that those of ordinary skill in the art would recognize.
[0077] As used herein, the singular forms "one" and "an" are also intended to include plural forms, unless the context clearly indicates otherwise. It will also be understood that the terms "including" and / or "comprising" when used in this specification specify the presence of features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or their combinations. As used herein, the term "and / or" includes any and all combinations of one or more related listed items. When located in front of an element list, expressions such as "at least one" modify the entire element list without modifying a single element of the list. In addition, when describing an embodiment of the inventive concept, the use of "may" refers to "one or more embodiments of the present disclosure". In addition, the term "exemplary" is intended to refer to an example or description. As used herein, the terms "use", "in use" and "used" may be considered to be synonymous with the terms "utilize", "in use" and "utilized", respectively.
[0078] Although exemplary embodiments of systems and methods for cache management of storage devices have been specifically described and illustrated herein, many modifications and variations will be apparent to those skilled in the art. Therefore, it should be understood that systems and methods for cache management of storage devices constructed according to the principles of the present disclosure may be implemented in a manner other than that specifically described herein. The present disclosure is also defined in the following claims and their equivalents.
[0079] The system and method for processing storage transactions may include one or more combinations of the statements set forth in the following statements.
[0080] Statement 1. A storage device comprising: a first storage medium; a processor configured to communicate with the first storage medium; and a memory coupled to the processor, the memory storing instructions that, when executed by the processor, cause the processor to: receive a first code provided by a computing device; execute the first code; perform a first update of the first storage medium based on the first code; receive a second code provided by the computing device; execute the second code; and perform a second update of the first storage medium based on the second code.
[0081] Statement 2. The storage device of statement 1, wherein the first code is for retrieving the first data from the second storage medium and storing the first data in the first storage medium.
[0082] Statement 3. The storage device of statement 2, wherein the second code is used to modify the first data from the first storage medium.
[0083] Statement 4. The storage device of statement 2, wherein the second code is for retrieving the second data from the second storage medium and storing the second data in the first storage medium.
[0084] Statement 5. The storage device of statement 2, wherein the first storage medium comprises volatile memory and the second storage medium comprises non-volatile memory.
[0085] Statement 6. A storage device according to statement 2, wherein the instructions further cause the processor to: receive a first command from a computing device; access a first storage medium for first data based on the first command; determine a first state of the first data associated with the first storage medium; and retrieve the first data from the first storage medium.
[0086] Statement 7. A storage device as described in statement 6, wherein the instructions further cause the processor to: receive a second command from the computing device; check the first storage medium for the first data based on the second command; determine a second state of the first data associated with the first storage medium; and retrieve the first data from the second storage medium.
[0087] Statement 8. The storage device of statement 2, wherein the storage device includes a cache controller that handles the movement of data from the second storage medium to the first storage medium.
[0088] Statement 9. The storage device of statement 1 wherein the first code comprises compiled machine-readable code.
[0089] Statement 10. The storage device of statement 1, wherein the computing device is configured to provide an interface for generating source code, wherein the source code is compiled into the first code.
[0090] Statement 11. A method comprises: receiving a first code provided by a computing device; executing the first code; performing a first update of a first storage medium based on the first code; receiving a second code provided by the computing device; executing the second code; and performing a second update of the first storage medium based on the second code.
[0091] Statement 12. The method of statement 11 wherein the first code is used to retrieve the first data from the second storage medium and store the first data in the first storage medium.
[0092] Statement 13. The method of statement 12 wherein the second code is used to modify the first data from the first storage medium.
[0093] Statement 14. The method of statement 12 wherein the second code is for retrieving the second data from the second storage medium and storing the second data in the first storage medium.
[0094] Statement 15. The method of statement 12 wherein the first storage medium comprises volatile memory and the second storage medium comprises non-volatile memory.
[0095] Statement 16. The method of claim 12 further comprising: receiving a first command from a computing device; accessing a first storage medium for first data based on the first command; determining a first state of the first data associated with the first storage medium; and retrieving the first data from the first storage medium.
[0096] Statement 17. The method of claim 16 further comprising: receiving a second command from a computing device; checking a first storage medium for the first data based on the second command; determining a second state of the first data associated with the first storage medium; and retrieving the first data from the second storage medium.
[0097] Statement 18. The method of statement 12 wherein the storage device includes a cache controller that handles the movement of data from the second storage medium to the first storage medium.
[0098] Statement 19. The method of statement 11 wherein the first code comprises compiled machine readable code.
[0099] Statement 20. The method of statement 11, wherein the computing device is configured to provide an interface for generating source code, wherein the source code is compiled into the first code. .
Claims
1. A storage device comprising a cache management, include: a first storage medium; a processor configured to communicate with a first storage medium; and a memory coupled to the processor, the memory storing instructions that, when executed by the processor, cause the processor to: receiving a first code provided by a computing device; Run the first code; performing a first update of a first storage medium based on the first code; receiving a second code provided by a computing device; Run the second code; and A second update of the first storage medium is performed based on the second code.
2. The storage device according to claim 1, in, The first code is for retrieving the first data from the second storage medium and storing the first data in the first storage medium.
3. The storage device according to claim 2, in, The second code is used to modify the first data from the first storage medium.
4. The storage device according to claim 2, in, The second code is for retrieving second data from the second storage medium and storing the second data in the first storage medium.
5. The storage device according to claim 2, in, The first storage medium includes a volatile memory, and the second storage medium includes a non-volatile memory.
6. The storage device according to claim 2, in, The instructions further cause the processor to: receiving a first command from a computing device; accessing a first storage medium for first data based on a first command; determining a first state of first data associated with a first storage medium; and First data is retrieved from a first storage medium.
7. The storage device according to claim 6, in, The instructions further cause the processor to: receiving a second command from the computing device; checking the first storage medium for the first data based on the second command; determining a second state of first data associated with a first storage medium; and The first data is retrieved from the second storage medium.
8. The storage device according to claim 2, in, The storage device includes a cache controller for handling the movement of data from the second storage medium to the first storage medium.
9. The storage device according to claim 1, in, The first code includes compiled machine readable code.
10. The storage device according to claim 1, in, The computing device is configured to provide an interface for generating source code, wherein the source code is compiled into a first code.
11. A method for cache management of a storage device, include: receiving a first code provided by a computing device; Run the first code; performing a first update of a first storage medium based on the first code; receiving a second code provided by a computing device; Run the second code; and A second update of the first storage medium is performed based on the second code.
12. The method according to claim 11, in, The first code is for retrieving the first data from the second storage medium and storing the first data in the first storage medium.
13. The method according to claim 12, in, The second code is used to modify the first data from the first storage medium.
14. The method according to claim 12, in, The second code is for retrieving second data from the second storage medium and storing the second data in the first storage medium.
15. The method according to claim 12, in, The first storage medium includes a volatile memory, and the second storage medium includes a non-volatile memory.
16. The method according to claim 12, further comprising: include: receiving a first command from a computing device; accessing a first storage medium for first data based on a first command; determining a first state of first data associated with a first storage medium; and First data is retrieved from a first storage medium.
17. The method according to claim 16, further comprising: include: receiving a second command from the computing device; checking the first storage medium for the first data based on the second command; determining a second state of first data associated with a first storage medium; and The first data is retrieved from the second storage medium.
18. The method according to claim 12, in, The storage device includes a cache controller for handling the movement of data from the second storage medium to the first storage medium.
19. The method according to claim 11, in, The first code includes compiled machine readable code.
20. The method according to claim 11, in, The computing device is configured to provide an interface for generating source code, wherein the source code is compiled into a first code.
Citation Information
Patent Citations
Host assisted memory side prefetcher
CN115516437A
Memory device firmware update and activation without memory access quiescence
US20210011706A1
Systems and methods for reordering data in a storage device based on data access patterns
US20230004318A1
