System and method for memory representation and management
By using processors and memories in the storage system to track memory address activities and move node associations, the problem of memory hierarchy management in the storage system is solved, more efficient data retrieval and memory tiering operations are achieved, and system performance and flexibility are improved.
Patent Information
- Application Number
- CN202410266030.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-04-25
- Filing Date
- 2024-03-08
- Publication Date
- 2024-09-13
AI Technical Summary
Existing storage systems have latency issues during access, especially due to the latency characteristics of different storage devices that result in low data retrieval efficiency and difficulty in effectively managing the memory hierarchy to optimize performance.
Select appropriate storage media for allocation by introducing processors and memories into the storage system, identifying memory requests, using data structures to track activity at memory addresses, updating node ordering based on activity, and moving node associations from one tier to another. Memory, which implements memory tiering operations to optimize data storage and retrieval.
Effectively manage memory hierarchies, reduce memory access latency, improve data retrieval efficiency, adapt to the performance requirements of different applications, and implement memory hierarchical operations in user space to improve flexibility and control.
Smart Images

Figure CN118642648A_ABST
Abstract
Description
Technical Field
[0001] One or more aspects of embodiments according to the present disclosure relate to a storage system, and in particular, to a system and method for representing and managing data in a storage system. Background Art
[0002] Applications may interact with storage systems for reading and writing data. Delays are often involved when accessing storage systems. The type of delay involved may depend on the type of storage devices included in the storage system. Some storage devices have lower latency than other storage devices. Therefore, it may be desirable to store data in appropriate data storage devices for efficient data retrieval.
[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 form the prior art. Summary of the invention
[0004] One or more embodiments of the present disclosure relate to a storage system, which includes a first storage medium, a processor configured to communicate with the first storage medium, and a memory coupled to the processor. In some embodiments, the memory stores instructions that, when executed by the processor, cause the processor to: identify a request to allocate memory in the first storage medium, wherein the first storage medium is associated with a first layer of a memory hierarchy; in response to the request, represent the memory via at least a first node of a first data structure, wherein the first data structure is associated with the first layer; track activities associated with the memory address represented by the first node; update the order of the first node in the first data structure based on the activities; and move the association of the first node from the first data structure to a second data structure, wherein the second data structure is associated with a second layer of the memory hierarchy.
[0005] According to some embodiments, the second data structure is associated with a second storage medium.
[0006] According to some embodiments, the instructions further cause the processor to send a command to move data stored in the memory address from the first storage medium to the second storage medium based on moving the association of the first node from the first data structure to the second data structure.
[0007] According to some embodiments, the instructions further cause the processor to select the first storage medium to allocate the memory based on a preference associated with the process making the request.
[0008] According to some embodiments, the first node represents a first chunk of memory, wherein the first chunk is associated with a first page of memory and a second page of memory.
[0009] According to some embodiments, the first node stores a first bit of the first page for identifying whether the first page is associated with the first layer or the second layer.
[0010] According to some embodiments, the instructions to cause the processor to track activity include instructions to cause the processor to: identify accesses to at least one of the first page of memory or the second page of memory; and calculate a percentage of the memory pages identified as accessed.
[0011] According to some embodiments, instructions executed by a processor are stored in user space of a memory.
[0012] According to some embodiments, the processor is configured to move an association of the first node from the first data structure to the second data structure in response to detecting that a total number of pages represented by the first data structure exceeds a threshold number of pages.
[0013] According to some embodiments, the processor is configured to maintain a bit for a memory address in the memory, wherein the bit indicates whether the memory address has been accessed.
[0014] One or more embodiments of the present disclosure also relate to a method, the method comprising identifying a request to allocate memory in a first storage medium. The first storage medium may be associated with a first layer of a memory hierarchy. The method comprises representing the memory via at least a first node of a first data structure in response to the request. The first data structure may be associated with the first layer. Activities associated with the memory address represented by the first node may be tracked, and the order of the first node in the first data structure may be updated based on the activities. The association of the first node may be moved from the first data structure to a second data structure. The second data structure may be associated with a second layer of the memory hierarchy.
[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 memory representation and management according to one or more embodiments;
[0018] Figure 2 depicts a block diagram of a storage manager according to one or more embodiments;
[0019] Figure 3depicts a conceptual layout diagram of components involved in memory allocation and allocation representation according to one or more embodiments;
[0020] Figure 4 A conceptual layout diagram depicting migration of one or more pages represented by nodes according to one or more embodiments;
[0021] Figure 5 A conceptual layout diagram depicting nodes of a data structure in different states according to one or more embodiments;
[0022] Figure 6 depicts a conceptual layout diagram of a translation table maintained by a memory management unit according to one or more embodiments;
[0023] Figure 7 depicts a flowchart of a process for performing memory hierarchy operations according to one or more embodiments;
[0024] Figure 8 depicts a flow chart of a process for identifying a storage medium for allocating memory to an application in accordance with one or more embodiments;
[0025] Fig. 9 depicts a screen displaying preference information for selecting a storage medium according to one or more embodiments;
[0026] Fig.10 depicts a screen showing an exemplary memory allocation request intercepted by a memory allocation and list builder module in accordance with one or more embodiments;
[0027] Fig.11 depicts a flow chart of a process for page activeness tracking and data structure reordering according to one or more embodiments;
[0028] Fig.12 Depicting a screen displaying a list of page numbers that have been accessed (eg, touched) and for which access bits have been set in accordance with one or more embodiments;
[0029] Fig.13 depicts a flow chart of a process for making a page migration decision according to one or more embodiments;
[0030] Fig.14 depicts a screen displaying information about pages to be promoted from a lower-level data structure to a top-level data structure in accordance with one or more embodiments;
[0031] Fig.15depicts a screen displaying information regarding pages to be demoted from a top-level data structure to a lower-level data structure in accordance with one or more embodiments;
[0032] Fig.16 depicts a screen displaying information regarding pages locked and unlocked for demotion according to one or more embodiments;
[0033] Fig.17 depicts a conceptual layout diagram of a first data structure (referred to as the "top level") and a second data structure (referred to as the "lower level") in accordance with one or more embodiments;
[0034] Fig.18 depicts metadata stored in a chunk according to one or more embodiments;
[0035] Fig.19 depicts a conceptual layout diagram of activity data detected for individual pages represented by chunks according to one or more embodiments;
[0036] Fig. 20 A conceptual layout diagram depicting chunk activity values for chunks in top and lower layers according to one or more embodiments;
[0037] Fig.21 depicts a screen showing information of an example chunk generated in response to a memory allocation request in accordance with one or more embodiments;
[0038] Fig. 22 Depicting a screen showing exemplary information of chunks in top and lower tiers prior to a demotion decision in accordance with one or more embodiments;
[0039] Fig.23 Depicted is a display based on a Fig. 22 A screen of exemplary information of blocks in the top and lower layers after an exemplary downgrade decision;
[0040] Fig.24 Depicting a screen showing exemplary information of blocks in top and lower tiers prior to an upgrade decision in accordance with one or more embodiments;
[0041] Fig.25 Describes an embodiment of the present invention according to one or more embodiments based on Fig.24 A screen showing exemplary information of blocks in the top and lower layers after an example upgrade decision;
[0042] Fig.26 is a flow chart of a process for performing memory hierarchy operations according to one or more embodiments;
[0043] Fig. 27is a flow chart of a process for generating a chunk in response to a memory allocation request according to one or more embodiments;
[0044] Fig.28 A flowchart depicting a process for tracking activity of a chunk according to one or more embodiments; and
[0045] Fig.29 Depicted is a flow diagram of a process for migrating pages from one tier to another tier in accordance with one or more embodiments. DETAILED DESCRIPTION
[0046] Hereinafter, example embodiments will be described in more detail with reference to the accompanying drawings, wherein 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 person of ordinary skill in the art to fully understand the aspects and features of the present disclosure 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 may not be repeated. In addition, in the drawings, for clarity, the relative sizes of elements, layers and regions may be exaggerated and / or simplified.
[0047] Embodiments of the present disclosure are described below with reference to block diagrams and flow charts. Therefore, it should be understood that each frame 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, etc., which execute instructions, operations, steps and interchangeable similar words (e.g., executable instructions, instructions for execution, program codes, etc.) on computer-readable storage media to run. For example, the retrieval, loading and execution of code can be performed sequentially so that one instruction is retrieved, loaded and executed at a time. In some example embodiments, retrieval, loading and / or execution can be performed in parallel so that multiple instructions are retrieved, loaded and / or executed together. Therefore, such embodiments can produce a specially configured machine that performs the steps or operations specified in block diagrams and flow charts. Therefore, block diagrams and flow charts support various combinations of embodiments for executing specified instructions, operations or steps.
[0048] Generally speaking, an application running on a host computing device may need to write data to and read data from a storage medium. Delays are often involved when accessing a storage medium. The delays involved may vary depending on the type of storage medium being accessed. For example, a storage medium (e.g., dynamic random access memory (DRAM)) attached to a central computing unit (CPU) of a computing device may have a lower latency than a storage medium (e.g., compute express link (CXL) memory) attached via a data communication link. Although storage media such as DRAM may provide lower latency, they may also be expensive and offer limited capacity.
[0049] It may be desirable to have a storage system with different types of memory (e.g., a combination of DRAM and CXL memory) arranged in memory hierarchies or tiers, where the tier assigned to a storage medium may be based on characteristics of the storage medium (e.g., latency). Using latency as an example, the tier assigned to a storage medium may increase as the latency associated with the medium decreases. A tiered memory system may allow data to be distributed in such a way that blocks, chunks, or pages (collectively referred to as "pages" or "memory pages") of data that are accessed more frequently than other memory pages are stored in (or promoted to) a higher memory tier (e.g., DRAM), and less frequently accessed memory pages are stored in (or demoted to) a lower memory tier (e.g., CXL memory).
[0050] Embodiments of the present disclosure relate to systems and methods for representing application memory spaces and managing data storage for applications via memory tiering operations. Memory tiering operations may include memory allocation based on the hardware topology of the application or user configuration preferences, generating representations of memory allocations, tracking memory accesses, reordering representations of memory allocations based on tracking, and / or making memory migration decisions. In some embodiments, memory tiering operations are performed on a per-application (or process) basis.
[0051] In some embodiments, memory layers and associated memory layering operations are implemented in user space (as opposed to kernel space) in a manner that is transparent to applications in terms of performance and application code. Some benefits of configuring and managing memory layers in user space include, but are not limited to: 1) applying memory layers to selected processes or virtual machines (VMs), allowing memory layers to be customized based on the needs of the process or VM; 2) better user space control; 3) configuring memory layers on a per-process basis after kernel boot; and 4) making changes (e.g., changes to memory layers) relatively easy in user space (e.g., no permissions required) compared to kernel space.
[0052] In some embodiments, instructions for memory tiering operations are included in a programming library, such as a memory tiering library that can be loaded before a memory allocation library. The memory tiering library can be configured to intercept memory allocation requests for applications and store memory allocation information in one or more data structures. The storage medium selected for memory allocation can depend on the requirements and / or preferences (collectively referred to as preferences) identified for the application. In some embodiments, a first data structure can represent (or map) memory allocated in a first storage medium in a first memory layer, and a second data structure can represent memory allocated in a second storage medium in a second memory layer. The first memory layer can be higher than the second memory layer.
[0053] In some embodiments, the nodes of the first data structure and the second data structure may represent one or more memory pages in the corresponding storage medium. The nodes may be used to track the access of an application to one or more pages. In this regard, a page tracking process or thread may track page activity (or activity) information, including when a page is accessed and / or the number of accesses, and reorder the corresponding nodes based on the tracked information. For example, a node corresponding to one or more active pages or hot pages may be moved to the top or head of a data structure, and a node corresponding to one or more inactive pages or cold pages may be moved to the bottom or tail of a data structure.
[0054] In some embodiments, the hot page at the head of the second data structure can be further upgraded to the first data structure, and / or the cold page at the tail of the first data structure can be downgraded to the second data structure. The physical memory page corresponding to the migrated node can also be upgraded or downgraded based on the upgrade or downgrade of the corresponding node.
[0055] Figure 1 A block diagram of a system for memory representation and management according to one or more embodiments is depicted. The system includes a host computing device (referred to as a "host") 100 coupled to one or more endpoints (e.g., one or more storage devices or memory devices 102a-102c (collectively referred to as "storage devices" 102)).
[0056] The host 100 includes a processor (such as a central processing unit (CPU)) 105, a main memory 104, a memory management unit (MMU) 108, and a root complex (RC) interface 112. The processor 105 may include one or more central processing unit (CPU) cores 116, which are configured to execute computer program instructions and process data stored in a cache 118 (also referred to as "memory" or "cache" for short). The cache 118 may be dedicated to one of the CPU cores 116 or shared by various CPU cores in the CPU cores 116.
[0057] Cache 118 may be coupled to memory controller 120, which in turn is coupled to main memory 104. Main memory 104 may include, for example, dynamic random access memory (DRAM) that stores computer program instructions and / or data (collectively, data) used by processes executed by kernel 116. Data may be loaded into cache 118, and the process may consume the data directly from cache memory. If the data to be consumed is not already in the cache, the process may need to query other memory devices in the memory hierarchy to find the data. For example, if the data sought is not in cache 118, the process may query main memory 104, and if not in main memory 104, query storage device 102.
[0058] In some embodiments, cache 118, main memory 104, and / or storage device 102 may be included in a memory system that allows for memory tiering to deliver an appropriate cost or performance profile. In this regard, different types of storage media may be organized in memory hierarchies or layers based on the characteristics of the storage media. The characteristic may be access latency. In some embodiments, the layers or levels of storage media increase as access latency decreases.
[0059] In some embodiments, one or more of the storage devices 102 are storage devices of the same or different types aggregated into a storage pool. For example, a storage pool may include one or more CXL memory devices and one or more SSDs. The tier of one type of storage device in the pool (e.g., CXL memory device) may be higher than the tier of another type of storage device in the pool (e.g., SSD).
[0060] In some embodiments, host 100 may support one or more virtual machines (VMs), which may have their own instances of processor 105, MMU 108, and / or main memory 104. One of the one or more VMs may execute a process or application, such as a big data analytics application, an e-commerce application, a database application, a machine learning application, etc. In some embodiments, a first VM executes a first process concurrently with a second process executed by a second VM.
[0061] In some embodiments, the host 100 includes a storage or memory manager 124 for implementing memory allocation and tiering operations for one or more applications. The storage manager 124 may be implemented via hardware, firmware (e.g., via an application specific integrated circuit (ASIC)), software, or any combination of software, firmware, and / or hardware. For example, the storage (or memory) manager 124 may be implemented as a memory tier programming library that is loaded by an application (e.g., at runtime). In some embodiments, the memory tiering library is loaded before other libraries (such as a memory allocation library) are loaded.
[0062] In some embodiments, the storage manager 124 is configured to identify memory allocation requests of applications and store the memory allocation requests in a queue. The memory allocation requests may also continue to be executed. In this regard, in response to the allocation request, memory may be allocated in the main memory 104 or in one of the storage devices 102. The selection of the storage medium to which the memory is to be allocated may be based on the preferences identified for the application.
[0063] In some embodiments, the storage manager 124 dequeues queued memory allocation requests and generates one or more nodes representing memory allocations. The generated nodes may be stored in one or more data structures, such as one or more linked lists. For example, a node in a first data structure may represent (also often referred to as contain) a memory page stored in a first storage medium (e.g., main memory 104) assigned a first (e.g., top or fast) memory tier. A node in a second data structure may represent a memory page stored in a second storage medium (e.g., storage device 102) assigned a second (e.g., low or slow) memory tier.
[0064] In some embodiments, the storage manager 124 is configured to check the activity of the page represented by the node. The activity information of the page may indicate whether the page has been accessed (e.g., is a "hot" page) or has not been accessed (e.g., is a "cold" page). In some embodiments, the activity information of the page indicates the number of accesses to the page. The number of accesses may be maintained by the storage medium (e.g., storage device 102) using a counter and provided to the storage manager 124 in response to a host command, as further described in detail in U.S. patent application entitled "SYSTEM AND METHOD FOR MONITORING MEMORY ACCESSES" filed on the same date as this application, the contents of which are incorporated herein by reference.
[0065] In some embodiments, the storage manager 124 rearranges nodes in the data structure in response to the page activity information. For example, a node with one or more hot pages can be moved to the head of the data structure, and a node with one or more cold pages can be moved to the tail of the data structure. Page migration (e.g., promotion or demotion) decisions can also be made on a periodic (regular or irregular) basis. For example, a node representing a first page at the tail of a first (top-level) data structure can be moved (e.g., demoted) to the tail of a second (lower-level) data structure, and / or a node representing a second page at the head of a second (lower-level) data structure can be moved (e.g., promoted) to the head of the first (top-level) data structure. Promotion and / or demotion decisions can be based on a comparison of the current number of pages in a layer with a threshold number of allowed pages.
[0066] In some embodiments, the processor 105 (e.g., an application executed by a VM) generates a request to the storage device 102. The request may include a request to read / load data, write / store data, erase / refresh data, etc. One or more of the requests may be associated with a virtual memory address. In some embodiments, the processor may call the MMU 108 to convert the virtual address to a physical address. The MMU 108 may include a translation table 110 that maps the virtual address to the physical address. The request sent to the storage device 102 may include a physical address corresponding to the virtual address.
[0067] In some embodiments, the processor 105 sends requests to the storage device 102 via the RC interface 112 and the interface connections 106a-106c (collectively referred to as 106). The request may include a data access request, a memory count information request, etc. A message from the storage device 102 to the processor 105, such as a response to a request from the processor 105, is delivered to the RC interface 112 via the interface connection 106, and the RC interface 112 delivers the response to the processor 105.
[0068] In some embodiments, the interface connection 106 (e.g., a connector and its protocol) includes various common interfaces, such as Ethernet, Universal Serial Bus (USB), etc. In some embodiments, the interface connection 106 (e.g., a connector and its protocol) may include (or may conform to) Compute Express Link (CXL), Cache Coherent Interconnect for Accelerators (CCIX), Dual In-line Memory Module (DIMM) interface, Small Computer System Interface (SCSI), Non-Volatile Memory Express (NVMe), Peripheral Component Interconnect Express (PCIe), Remote Direct Memory Access (RDMA) over Ethernet, Serial Advanced Technology Attachment (SATA), Fibre Channel, Serial Attached SCSI (SAS), NVMe over Fabric (NVMe-oF), iWARP protocol, InfiniBand protocol, 5G wireless protocol, Wi-Fi protocol, Bluetooth protocol, etc.
[0069] The RC interface 112 may be, for example, a PCIe interface configured to implement a root complex for connecting the processor 105 and the main memory 104 to the storage device 102. The RC interface 112 may include one or more ports 114a-114c to connect one or more storage devices 102 to the RC. In some embodiments, the MMU 108 and / or the translation table 110 may be integrated into the RC interface 112 to allow address translation to be implemented by the RC interface 112.
[0070] The storage device 102 may include one or more of a volatile computer-readable storage medium and / or a non-volatile computer-readable storage medium. In some embodiments, one or more of the storage devices 102 include any type of memory attached to a CPU or GPU, such as, for example, a CXL-attached memory device (including volatile and persistent memory devices), an RDMA-attached memory device, etc., but the embodiments are not limited thereto. The CXL-attached memory device (referred to as CXL memory for short) may comply with the CXL.mem protocol, where the host 100 may access the device using commands such as load and store commands. In this regard, the host 100 may act as a requester, and the CXL memory may act as a slave.
[0071] In some embodiments, one or more of the storage devices 102 may also include volatile computer-readable storage media, such as random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), fast page mode dynamic random access memory (FPM DRAM), extended data output dynamic random access memory (EDO DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), double data rate type dual synchronous dynamic random access memory (DDR2 SDRAM), double data rate type triple synchronous dynamic random access memory (DDR3 SDRAM), Rambus dynamic random access memory (RDRAM), two-transistor RAM (TTRAM), thyristor RAM (T-RAM), zero capacitor (Z-RAM), Rambus in-line memory module (RIMM), dual in-line memory module (DIMM), single in-line memory module (SIMM), video random access memory (VRAM), cache memory (including various levels), flash memory, register memory, etc.
[0072] The one or more storage devices 102 may include non-volatile computer-readable storage media, such as a floppy disk, a flexible disk, a hard disk, a solid-state storage device (SSS) (e.g., a solid-state drive (SSD)), a solid-state card (SSC), a solid-state module (SSM), an enterprise flash drive, a magnetic tape, or any other non-transitory magnetic media, etc. Non-volatile computer-readable storage media may also include punched cards, paper tapes, optical marker sheets (or any other physical media with hole patterns or other optically recognizable markings), compact disk read-only memory (CD-ROM), compact disk rewritable (CD-RW), digital versatile disk (DVD), Blu-ray disk (BD), any other non-transitory optical media, etc. Such non-volatile computer-readable storage media may also include read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), flash memory (e.g., serial, NAND, NOR, etc.), multimedia memory card (MMC), secure digital (SD) memory card, smart media (SmartMedia) card, compact flash (CompactFlash, CF) card, memory stick, etc. In addition, the non-volatile computer-readable storage medium may also include a conductive bridging random access memory (CBRAM), a phase change random access memory (PR AM), a ferroelectric random access memory (FeRAM), a non-volatile random access memory (NVR AM), a magnetoresistive random access memory (MRAM), a resistive random access memory (RRAM), a silicon-oxide-nitride-oxide-silicon memory (SONOS), a floating junction gate random access memory (FJG RAM), a millipede memory, a racetrack memory, and the like.
[0073] Figure 2 A block diagram of a storage manager 124 is depicted in accordance with one or more embodiments. In some embodiments, the storage manager 124 is configured to execute in a user space of the main memory 104. Execution in user space may allow for customization of memory allocation and tiering operations on a per-process basis. In some embodiments, the storage manager 124 is called for memory allocation and tiering for a first application, while the storage manager 124 is not called for a second application. As a result, the second application may not be able to obtain the same benefits of memory tiering as the first application.
[0074] In some embodiments, the storage manager 124 includes a storage identifier module 200, a memory allocation and list builder module 202, a page tracking and list management module 204, and a page migration module 206. One or more modules 200-206 can be executed simultaneously via one or more processing threads. In addition, although one or more modules 200-206 can be implemented as separate functional units, those skilled in the art will recognize that the functions of the modules can be combined or integrated into a single module, or further subdivided into additional sub-modules without departing from the spirit and scope of the present inventive concept.
[0075] In some embodiments, the storage identifier module 200 is configured to identify storage media based on the preferences and / or needs (collectively, preferences) of the application to which the memory is to be allocated. The application preferences may be stored, for example, in a configuration file associated with the application. The configuration file may identify the preferred storage parameters including one or more storage parameters of bandwidth, latency, capacity, etc.
[0076] In some embodiments, the storage identifier module 200 collects information about one or more storage media (e.g., main memory 104 and / or storage device 102) available to the application. The collected information may correspond to storage parameters in a configuration file. For example, the storage identifier module 200 may collect capacity, bandwidth, and latency properties of the identified storage media. The storage identifier module 200 may select one of the identified storage media based on the preference information in the configuration file and the storage parameters of the identified storage media.
[0077] For example, if the first application identifies a preference for bandwidth, the storage identifier module 200 identifies the storage medium that provides the best bandwidth among the identified storage media. In another example, the second application may identify a preference for storage capacity, and the storage identifier module 200 may identify the storage medium that provides the best storage capacity among the identified storage media. In some embodiments, if no configuration file is provided for the application, the storage identifier module 200 may select a default storage medium, such as a storage medium that is closest to the processor 105.
[0078] The memory allocation and list builder module 202 is configured to intercept the memory allocation request of the application and store the request in a queue. The memory allocation can be performed as requested by the application. When executing the request, a memory corresponding to the requested size can be allocated in the storage medium identified by the storage identifier module 200.
[0079] In some embodiments, the memory allocation and list builder module 202 retrieves the memory request from the queue and generates one or more nodes representing the memory allocated. In some embodiments, the node corresponds to a page of the memory allocated. In some embodiments, the node corresponds to two or more pages. The generated nodes can be stored in a data structure, such as a linked list. The data structure can be identified for the memory layer of the data structure selected for allocation or associated with the memory layer of the data structure selected for allocation.
[0080] The page tracking and list manager module 204 may be called from time to time to track page activity data and manage data structures based on the activity of the pages. For example, the page tracking and list manager module 204 may traverse the nodes of the data structure to retrieve activity information for one or more pages represented by the nodes. In this regard, the page tracking and list manager module 204 may search the translation table 110 for the virtual address of the page and retrieve the access bit of the page. In some embodiments, if the access bit has been set, the page is considered hot. If the access bit has not been set, the page may be considered cold.
[0081] The page access information can be used to rearrange the nodes in the data structure. In some embodiments, the nodes are arranged from active to inactive, so that nodes identified as active are placed at the head of the data structure and nodes identified as inactive are placed at the tail of the data structure. In some embodiments, the nodes are arranged based on the activity level (e.g., number of accesses) of one or more pages represented by the nodes.
[0082] The page migration module 206 can be configured to make memory migration decisions based on the activity of the pages represented by the data structure and also based on a set threshold. In some embodiments, the page migration decision is triggered based on a comparison of the current number of pages represented by the nodes of the data structure with the threshold. For example, the page migration module 206 can determine that the number of pages mapped to the first (top) data structure exceeds the maximum threshold number, and downgrade one or more pages represented by one or more nodes at the tail of the first data structure to the second (lower) data structure so as not to exceed the maximum threshold number. In another example, the page migration module 206 can determine that the number of pages mapped to the top data structure is lower than the minimum threshold number, and upgrade one or more pages represented by one or more nodes at the head of the lower data structure to the top data structure so as to meet the minimum threshold number.
[0083] In some embodiments, the page migration module 206 supports a page locking feature for one or more applications. For example, an application may indicate (e.g., in a configuration file) that a certain percentage of pages (e.g., 50%) will remain locked in the fast tier memory and not be demoted to the lower tier memory. The page migration module 206 may identify the activity of the pages in the fast tier memory and lock the indicated percentage of the most active pages. The remaining pages in the fast tier may be considered unlocked and eligible for demoting to the lower tier memory.
[0084] In some embodiments, in response to the migration of a page (which should be understood as a representation of a page in a node) from one data structure or layer to another data structure or layer, the page migration module 206 sends a signal to the corresponding storage medium for physically moving the corresponding page from one storage medium to another storage medium. The physical movement of the page can be performed by the page migration module 206 to the storage medium via one or more read / load and write / store commands.
[0085] Figure 3 Depicted is a conceptual layout diagram of components involved in memory allocation and allocation representation according to one or more embodiments. An application 314 executed by processor 105 (or a VM hosted by processor 105) may make one or more memory allocation requests 304. The memory allocation request may include, for example, the size of the requested memory.
[0086] In some embodiments, the storage manager 124 (e.g., via the memory allocation and list builder module 202) intercepts (or identifies) 316 a memory allocation request 304 and stores the request in a queue 306. In some embodiments, the memory allocation and list builder module 202 represents the memory allocation via the top-level data structure 300 and / or the lower-level data structure 302. In this regard, the memory allocation and list builder module 202 dequeues a queue entry 308 from the queue 306 and generates at least a first node 310a in the top-level data structure 300 and / or at least a second node 310c in the lower-level data structure 302. The selection of a tier may depend on the preferences identified for the application. Although Figure 3 The embodiment includes two data structures 300, 302, but additional data structures corresponding to other types of storage media may also be generated, as will be understood by those skilled in the art.
[0087] In one embodiment, a node 310a-310d (collectively referred to as 310) of the data structure 300, 302 represents a memory page. In this embodiment, the node 310 stores information associated with the corresponding memory page. The information may include, for example, the virtual address and size of the memory page. In an embodiment where the data structure 300, 302 is a linked list, the node (e.g., node 310a) may also include a pointer to the next (adjacent) node (e.g., node 310b).
[0088] In some embodiments, processor 105 executes the memory allocation request and allocates the requested memory in first storage medium 318 and / or second storage medium 320. The selection of storage medium may be based on preferences identified for application 314 (eg, by storage identifier module 200).
[0089] In some embodiments, memory page accesses are tracked, and the nodes 310 of the data structures 300, 302 can be reorganized based on the accesses. In this regard, the data structures 300, 302 can be implemented as a least recently used (LRU) list. For example, a node (e.g., node 310b) in one of the data structures (e.g., the top-level data structure 300) can be moved from a current position to a head 322 of the same data structure based on the activity of the memory page represented by the node 310b. In another example, a node (e.g., node 310d) in one of the data structures (e.g., the lower-level data structure 302) can be moved from a current position toward a tail 324 of the same data structure based on a lack of activity of the memory page represented by the node 310d.
[0090] In some embodiments, a node (which should be understood as a page represented by a node) can be promoted from a lower-level data structure 302 to a top-level data structure 300, or demoted from a top-level data structure 300 to a lower-level data structure 302. Promotion and demotion can be based on a maximum and / or minimum threshold number of pages set for a layer (e.g., top layer). In response to the promotion and / or demotion of a node 310 between data structures 300, 302, the physical memory pages corresponding to the migrated pages are also promoted 328 and / or demoted 330 between the first storage medium 318 and the second storage medium 320.
[0091] Figure 4 A conceptual layout diagram of the migration of one or more pages represented by nodes 400a, 400b is depicted in accordance with one or more embodiments. Figure 4 In the example of , the terms node and memory page can be used interchangeably because one node corresponds to one memory page. Promotion and demotion decisions can be based on the activity (eg, hotness or coldness) tracked for the corresponding memory page.
[0092] In some embodiments, the promotion or demotion of a node includes, for example, removing a node from one layer and inserting a node into another layer (e.g., by removing and reconnecting pointers or linking pointers from / to adjacent nodes). In some embodiments, the number and nodes (which should be understood as pages represented by the nodes) selected for demotion from the top-level data structure 300 to the lower-level data structure 302 may depend on, for example, a threshold 402. The threshold 402 may be a maximum number of pages to be stored in the top level. Figure 4 In the example of , promoting hot pages (e.g., node 400a) to the top-level data structure 300 may cause the total number of nodes / pages to exceed the threshold 402. In this case, one or more cold pages (e.g., node 400b) at the tail of the top-level data structure 300 may be selected to be demoted to the lower-level data structure 302.
[0093] When node 400a is promoted to the top-level data structure 300, the pointer to the next node 400c maintained in node 400a may be changed to identify node 400d. When node 400b is demoted from the top-level data structure 300 to the lower-level data structure 302, the pointer to node 400b maintained in node 400e may be removed, and a pointer in node 400f pointing to node 400b may be added.
[0094] Figure 5 A conceptual layout diagram of a node 500 of a data structure (e.g., data structures 300, 302) in different states 502a-502d is depicted in accordance with one or more embodiments. In some embodiments, an access bit is maintained for the address of the memory page represented by the node (e.g., in the MMU 108). The page tracking and list manager module 204 may periodically retrieve the access bit to determine whether the page is hot (the access bit is "1") or cold (the access bit is "0").
[0095] In state 502a, the access bit of the page represented by the data structure is set to "1". After a period of time, in state 502b, the access bit of the page is reset to "0".
[0096] In state 502c, the application may request access to one or more memory pages. The MMU 108 may be called to retrieve the access bits for the requested memory pages. In response to the access bits being "0", a page fault may be raised, and in response to the page fault, the access bits may be set to "1". Figure 5 In the example of , nodes 500a and 500b represent pages whose access bits are set to "1", and nodes 500c, 500d, and 500e represent pages whose access bits are set to "0".
[0097] In state 502d, the page tracking and list manager module 204 can reorganize the nodes based on the activity of the represented pages. For example, nodes associated with hot pages (e.g., nodes 500a, 500b) can be moved to the head of the data structure, and nodes 500c-500e can be moved (or remain) at the end of the data structure.
[0098] Figure 6 A conceptual layout diagram of a translation table 110 maintained by an MMU 108 is depicted in accordance with one or more embodiments. The translation table 110 stores translations of virtual addresses 600 to physical memory addresses 602. In some embodiments, the translation table 110 stores access bits 604 associated with virtual and physical memory addresses. A read / load or write / store request by an application to a page whose access bit is set to a value of "0" may trigger a page fault. In response to the triggering of a page fault, the access bit 604 of the requested memory address may be set to "1". The processor 105 may periodically reset the access bit 604 to "0".
[0099] In some embodiments, the page tracking and list manager module 204 periodically reads the access bit 604 for determining the activity of the memory page associated with the memory address 600, 602. The page tracking and list manager module 204 may mark the page as hot in response to the access bit of the page having a value of "1". The page tracking and list manager module 204 may mark the page as cold in response to the access bit of the page having a value of "0".
[0100] Figure 7 A flow chart of a process for performing a memory hierarchy operation according to one or more embodiments is depicted. In act 700, the storage manager 124 (e.g., via the memory allocation and list builder module 202) identifies a first memory allocation. For example, the storage manager 124 may intercept a memory allocation request of an application and store the request in a queue (e.g., the queue 306).
[0101] In act 702, storage manager 124 may represent memory allocation via a first node of a first data structure (eg, top-level data structure 300) associated with a first tier of a memory hierarchy. Selection of a data structure (and associated memory tier) may be based on preferences set for an application.
[0102] In action 704, the storage manager 124 (e.g., the page tracking and list manager module 204) may track the activity of the allocated memory address. Activity tracking may be used for a memory page identified by a memory address. In some embodiments, the storage manager 124 retrieves an access bit associated with the memory address for use in determining the activity of the page. In some embodiments, in response to the access bit being set to "1", the page is identified as "hot", and in response to the access bit being set to "0", the page is identified as "cold". In some embodiments, the page activity information is provided by the storage device 102. In this regard, the storage device 102 maintains a counter that is incremented for the memory address in response to detecting an access to the memory address. The counter value may be provided to the storage manager 124 upon request and used to determine the activity of the page.
[0103] In action 706, the storage manager 124 updates the ordering of the first nodes in the first data structure based on the retrieved activity information. For example, nodes representing hot pages may be moved to the head of the first data structure, and nodes representing cold pages may be moved to the tail of the first data structure. In embodiments where the activity information includes a plurality of accesses, the nodes may be organized in descending order based on the number of accesses, with nodes representing pages with the greatest number of accesses being placed at the head of the first data structure, and nodes representing pages with the least number of accesses being placed at the tail of the first data structure.
[0104] In action 708, the storage manager 124 (e.g., via the page migration module 206) may determine that a page migration trigger has been satisfied and move an association of the first node from the first data structure to a second data structure. The second data structure may be associated with a second tier of the memory hierarchy. For example, in response to detecting that a total number of pages represented by the first data structure exceeds a threshold maximum number of pages, the page migration trigger may be satisfied.
[0105] Figure 8 A flow chart of a process for identifying a storage medium for allocating memory for an application is depicted in accordance with one or more embodiments. The process begins, and in act 800, the storage manager 124 (eg, via the storage identifier module 200) detects and parses a configuration file associated with an application.
[0106] In action 802, the storage manager 124 extracts preference information set for the application. The preference information may identify which of the one or more storage parameters is preferred for the application. The storage parameters may include, but are not limited to, bandwidth, latency, capacity, capacity threshold, etc. In one example, bandwidth may be selected as a preferred storage parameter for the application.
[0107] In some embodiments, the storage manager 124 also obtains topology information of available storage media in act 804. For example, the storage manager may identify a first storage medium (e.g., DRAM included in the main memory 104) as having a first tier level, and identify a second storage medium (e.g., CXL memory included in the storage device 102) as having a second tier level.
[0108] In act 806, the storage manager 124 further identifies attributes of the identified storage medium. For example, the storage manager 124 may identify the bandwidth, latency, and / or capacity of the identified storage medium.
[0109] In action 808, the storage manager 124 compares the identified application's preferences with the identified storage medium's attributes and selects at least one storage medium that satisfies the identified preferences. For example, if the preference is for bandwidth, the storage manager 124 selects the storage medium that provides the highest bandwidth.
[0110] In act 810, the storage manager 124 (eg, via the kernel) allocates memory of the requested size on the selected storage medium.
[0111] In some embodiments, the application may not have a preference information set. In this case, a default storage medium may be assigned to the application. The default storage medium may be the storage medium that is closest to the application.
[0112] Fig. 9 A screen showing preference information for selecting a storage medium is depicted according to one or more embodiments. The preference information may be associated with an application and stored in a file 900 (e.g., a JSON file). The storage identifier module 200 may parse the file 900 and retrieve preference information 902 for the application. The preference information 902 may include, for example, preferences for bandwidth, latency, or capacity. Fig. 9 In the example of , file 900 indicates a preference for bandwidth.
[0113] The storage identifier module 200 may also retrieve and display storage medium information 904 of the local storage medium. The local storage medium may be a non-uniform memory access (NUMA) node. The storage medium information may include, for example, the bandwidth, latency, and capacity of the identified storage medium. The storage identifier module 200 is able to identify the appropriate storage medium for memory allocation based on the storage medium information and the preference information of the application. Fig. 9 In the example of , screen identifies information 906 of storage media that best caters to particular preferred attributes (eg, bandwidth, latency, or capacity).
[0114] Fig.10Depicted is a screen showing an exemplary memory allocation request intercepted by the memory allocation and list builder module 202 in accordance with one or more embodiments. The intercepted memory request may include a size 1000 of the memory allocation and an address 1002 of a first allocation page in a storage medium.
[0115] Fig.11 A flow chart of a process for page activity tracking and data structure reordering according to one or more embodiments is depicted. The process begins, and in act 1100, the storage manager 124 (e.g., via the page tracking and list manager module 202) determines whether a trigger for resetting an access bit associated with a page has been detected. The trigger may be, for example, the passage of a certain amount of time.
[0116] If the answer is yes, then in act 1102 the access bit (eg, Figure 6 The access bits 604 are stored in the translation table 110 in the MMU 108, for example.
[0117] In action 1103, storage manager 124 may perform bookkeeping actions, such as counting the number of pages mapped to top-level data structure 300 and the number of pages mapped to lower-level data structure 302, for use in determining whether to make a page migration decision.
[0118] In action 1104, the storage manager 124 tracks accesses to one or more memory pages. In this regard, the storage manager 124 receives a request to access a memory address and determines whether an access bit for the memory address is set (e.g., set to a value of "1"). If the answer is no, a page fault is triggered, and in action 1106, the processor 105 (e.g., core) sets the access bit for the memory address. In some embodiments, the accessed page is also included in an active list maintained by the storage manager 124.
[0119] In action 1108, the storage manager 124 determines, on a cyclic basis, the activity of the pages represented by the nodes 310 of the data structures 300, 302. The nodes may be rearranged based on the activity information. For example, nodes representing pages with set access bits may be moved toward the head of the data structure, and nodes representing pages with reset access bits may be moved toward the tail of the data structure.
[0120] Fig.12 Depicted are screens displaying lists 1200a - 1200d of page numbers that have been accessed (eg, touched) and for which access bits have been set, in accordance with one or more embodiments.
[0121] Fig.13A flow chart of a process for making a page migration decision according to one or more embodiments is depicted. The process begins, and in act 1300, the storage manager 124 (e.g., via the page migration module 206) identifies the number of pages represented by nodes in the top-level data structure 300 and the number of pages represented by nodes in the lower-level data structure 302.
[0122] In action 1302, the storage manager 124 identifies one or more thresholds. The thresholds may include, for example, a maximum threshold number indicating a maximum number of pages to be mapped for the corresponding data structure 300, 302. The thresholds may also include, for example, a minimum threshold number indicating a minimum number of pages to be mapped for the corresponding data structure 300, 302.
[0123] In action 1304, one or more pages are selected to be promoted or demoted based on the current number of pages represented in the one or more layers and one or more thresholds. In some embodiments, the storage manager 124 identifies the number of pages mapped to the layer that exceeds the maximum threshold number, and selects pages to be migrated from the layer based on the identified number. For example, if the number of pages mapped to the top-level data structure 300 exceeds the maximum threshold of 5 pages, the storage manager 124 selects 5 pages mapped to the tail of the data structure 300 to migrate (e.g., demote) to the lower-level data structure 302.
[0124] In some embodiments, the storage manager 124 determines that the number of pages represented in the top-level data structure 300 is below a minimum threshold number. In this case, the storage manager 124 identifies pages from the lower-level data structure 302 to migrate (eg, upgrade) to the top-level data structure 300.
[0125] In action 1306, the storage manager 124 promotes or demotes the selected page between the top-level data structure and the lower-level data structures 300, 302. In some embodiments, promoting or demoting includes removing and reconnecting pointers or links to / from adjacent nodes between the top-level data structure and the lower-level data structures 300, 302. In some embodiments, the physical page corresponding to the promotion or demote decision is also moved from one storage medium to another storage medium.
[0126] Fig.14 Depicted is a screen displaying information about pages to be upgraded from a lower level data structure 302 to a top level data structure 300 in accordance with one or more embodiments. Fig.14 In the example of , the count 1400 of the top-level data structure 300 indicates that 132 pages have been mapped to the top level, and the count 1402 of the low-level data structure 302 indicates that 21 pages have been mapped to the low level. Fig.14In the example of , the maximum threshold number 1404 is 1000. Because the number of pages mapped to the top layer is below the maximum threshold number, the storage manager 124 selects the upgrade count 1406 corresponding to all 21 pages from the lower layer data structure for upgrading to the top layer data structure. After the upgrade, the count 1408 of the top layer is updated to 153 pages.
[0127] Fig.15 Depicted is a screen displaying information about pages to be demoted from a top-level data structure 300 to a lower-level data structure 302, according to one or more embodiments. Fig.15 In the example of , the count 1410 of the top-level data structure 300 indicates that 1266 pages have been mapped to the top level, and the count 1412 of the low-level data structure 302 indicates that 3523 pages have been mapped to the low level. Fig.15 In the example of , the maximum threshold number 1414 is 1000. Because the pages mapped to the top layer exceed the maximum threshold number, the storage manager 124 selects 266 pages to be demoted to the lower layer, as indicated via the demote number 1416.
[0128] In some embodiments, the storage manager 124 provides a page locking feature for one or more applications. An application that subscribes to the page locking option may indicate (e.g., in a configuration file) the amount of memory (or pages) to be retained in the top-level data structure 300. For example, the configuration file may specify that 500 pages (or 2MB of memory, assuming each page is 4KB) will stay in the top layer. In this case, the storage manager 124 identifies the hottest 500 pages toward the head of the top-level data structure and identifies the pages as "locked". In some embodiments, "locked" pages are prevented from being demoted to the lower-level data structure 302 even in the presence of memory pressure. In some embodiments, the remaining pages mapped to the top-level data structure 300 are identified as "unlocked" and may be eligible to be demoted to the lower-level data structure 302.
[0129] In some embodiments, the configuration file may specify a percentage of pages to remain locked. For example, if the percentage is 50%, the storage manager 124 locks 50% of the pages in the top layer (e.g., the hottest 50% of the pages). The remaining 50% of the pages are unlocked and eligible for demotion.
[0130] Fig.16 Depicted are screens displaying information about pages that are locked and unlocked for demotion according to one or more embodiments. Fig.16In the example of , two pages (represented via corresponding nodes) are in unlocked (U) state 1500a, 1502a. Assuming that 50% of the allocated pages are to be locked, the storage manager 124 places node 1 with a set access bit in locked (L) state 1500b, and node 0 with an unset access bit remains in unlocked state 1502b.
[0131] exist Fig.16 , four more pages (nodes 5, 4, 3, and 2) 1504 are mapped to the top-level data structure 300. The storage manager 124 checks the activity of the mapped pages 1506 and identifies the active (hot) nodes (nodes 3, 2, 5, and 1). Assuming that only 50% of the pages are to be locked, the storage manager 124 identifies three of the active pages toward the head of the data structure (represented via nodes 2, 3, and 1) 1508 as locked, and the remaining pages (represented via nodes 0, 5, and 4) 1510 are marked as unlocked.
[0132] Memory access tracking
[0133] In some embodiments, a node 310 of a data structure (e.g., a linked list) 300, 302 represents a page of allocated memory, and the memory access tracking granularity is at the page level. However, generating and maintaining nodes for a single page may generate high overhead. For example, processing a "free" pointer request may require knowing the size of the page associated with the allocation. A hash map may be required to find the allocation size of the pointer. The allocation size can be divided by the page size to find the number of pages to be released. It may then be necessary to traverse the nodes of the linked list data structure to find the node representing the page to be released, and remove the node. The previous and next nodes linked to the removed node may also need to be reconnected.
[0134] Other problems with providing a memory tiering scheme using nodes representing individual memory pages include: 1) moving a page between memory tiers may require removing a node from a linked list in one tier and inserting the node into a linked list in another tier; 2) a page represented by a node may be identified as hot or cold without a fine-grained distinction; 3) the position of a page in a linked list may not indicate access frequency, as a page is hot or cold based on whether a corresponding access bit has been set; 4) determining the hotness of an individual page based on its access bit does not take advantage of locality, in which accesses to a page may also indicate access probabilities of surrounding pages; and 5) nodes are allocated for pages even if they are not physically allocated in the storage medium, thereby introducing high overhead and affecting tracking of pages that have been allocated.
[0135] In some embodiments, the memory hierarchy operation as described above can be efficiently processed by representing memory allocation via one or more chunk-sized nodes (hereinafter referred to as chunks) in the top-level data structure and the lower-level data structure. A chunk can represent one or more contiguous physical memory pages of a given page size. A chunk can have a starting address of a first memory page. The remaining memory pages can be accessed based on page size or offset.
[0136] In some embodiments, representing memory pages via chunks can minimize the space / capacity overhead required to track pages. In this regard, page activity can be tracked without physically allocating nodes to represent pages. In some embodiments, activity tracking is performed on a chunk-by-chunk basis that exploits the locality of memory pages. Memory locality assumes that if a page is accessed by a process, then there is a high probability that adjacent pages may also be accessed. In some embodiments, chunks are reordered based on their activity tracking, allowing reordering to occur on a group of pages rather than on individual pages.
[0137] In some embodiments, the migration of pages from one layer to another layer also occurs without physically adding nodes to the data structure or physically removing nodes from the data structure. In this regard, a first group of blocks generated in a first layer can be connected to a second group of blocks in a second layer. The second group of blocks in the second layer can represent the same page represented by the first group of blocks. First information (e.g., a first page mask) can be stored in the first group of blocks, and second information (e.g., a second page mask) can be stored in the second group of blocks. The first page mask can indicate whether one or more pages represented by the first and second groups of blocks belong to the first layer. The second page mask can indicate whether one or more pages belong to the second layer.
[0138] In some embodiments, a page is migrated from one tier to another tier by modifying the values in the first page mask and the second page mask. For example, a page may be downgraded from the first tier to the second tier by setting the bit corresponding to the downgraded page in the first page mask to "0" and the bit corresponding to the downgraded page in the second page mask to "1". A page may similarly be upgraded from the second tier to the first tier by setting the bit corresponding to the upgraded page in the first page mask to "1" and the bit corresponding to the upgraded page in the second page mask to "0".
[0139] Fig.17 A conceptual layout diagram of a first data structure (referred to as the "top layer") 1600 and a second data structure (referred to as the "lower layer") 1602 is depicted in accordance with one or more embodiments. The top layer 1600 may be similar to Figure 3 The top-level data structure 300, and the lower level 1602 may be similar to Figure 3 The low-level data structure 302.
[0140] In some embodiments, in response to a memory allocation request from an application, one or more chunks 1604a-1604d (collectively referred to as 1604) are generated in the top layer 1600 and the lower layer 1602. The chunk 1604 may represent a group of memory pages, where the memory page has a set page size. In some embodiments, the chunk size is a multiple of the page size (e.g., 64KB, 128KB, etc.).
[0141] In some embodiments, the chunks in the top layer 1600 are linked to the chunks in the lower layer 1602. For example, chunk 1604a may be linked to chunk 1604b, and chunk 1604c may be linked to chunk 1604d. In some embodiments, the same group of memory pages represented by a chunk in the top layer (e.g., chunk 1604a) is also represented by a corresponding chunk in the lower layer (e.g., chunk 1604b). In some embodiments, a chunk (e.g., chunk 1604a) is further linked to the next chunk in the layer (e.g., chunk 1604c).
[0142] In some embodiments, the group block 1604 includes a page mask 1606. The size of the page mask corresponds to the number of pages represented by the group block. For example, the size of the page mask for a group block representing 5 pages is 5 bits in length. In some embodiments, the bits of the page mask are set to "1" or "0" depending on whether the associated pages are stored in the top layer 1600 or the lower layer 1602. For example, for pages stored in the top layer 1600, the group block 1604a sets the bits of the page mask 1606a to "1", and for pages stored in the lower layer 1602, the group block 1604a sets the bits of the page mask 1606a to "0". The corresponding group block 1604b sets the bits of the page mask 1606b to "0" for the pages stored in the top layer 1600, and sets the bits of the page mask 1606b to "1" for the pages stored in the lower layer 1606.
[0143] Pages may be promoted or demoted from one layer to another layer by modifying corresponding bits in the page masks in the two layers. For example, a page represented by mask bit 1608a in block 1604c in the top layer 1600 may be “moved” (e.g., demoted) to the lower layer by changing the value of mask bit 1608a to “0” and changing the value of mask bit 1608b in corresponding block 1604d in the lower layer 1602 to “1”. In another example, a page represented by mask bit 1610b in block 1604f in the lower layer 1602 may be “moved” (e.g., promoted) to the top layer by changing the value of mask bit 1610b to “0” and changing the value of mask bit 1610a in corresponding block 1604e in the top layer 1600 to “1”.
[0144] In some embodiments, the storage manager 124 determines the number of chunks required for the allocation based on the size of the allocation and the size of the chunk. For example, if the chunk size is 64K and the allocation size is 128K, the allocation is divided into two 64K chunks in each layer 1600, 1602. In this regard, the storage manager 124 generates two chunks in the top layer 1600 and two chunks in the lower layer 1602. In addition, assuming that the page size is 4K, each chunk includes 16 pages represented by 16 bits of the page mask. The pages in the chunk can be accessed using the virtual address of the first memory page (chunk_ptr) and the page size or offset as shown below:
[0145]
[0146] Assuming that for an initial allocation, memory is allocated in the storage medium associated with the top layer, the page masks stored in the two top layers are set to "1", and the page masks stored in the two bottom layers are set to "0".
[0147] Fig.18 Depicted is metadata 1700 stored in a chunk 1604 according to one or more embodiments. In some embodiments, the metadata 1700 includes an address (e.g., virtual address) 1702 (also referred to as chunk_ptr) of the first page of memory allocated and the size of the allocation 1704. In some embodiments, the activity of the chunk is stored as activity percentage metadata 1706. The metadata 1700 may also store a page mask 1708 indicating the location (e.g., top layer 1600 or lower layer 1602) of the page represented by the chunk 1604. In some embodiments, a page count 1710 provides a count of the number of valid pages that have been touched or accessed. In some embodiments, the metadata 1700 also includes a pointer 1712 to the next chunk in the same layer and a pointer 1714 to the corresponding chunk in a different layer.
[0148] In some embodiments, the storage manager 124 is configured to track the activity of the chunk 1604 for use in determining whether the location of the chunk in the tier should be modified. In this regard, the storage manager (e.g., via the page tracking list manager module 202) determines the activity of the individual pages mapped to the chunk and calculates the chunk activity value based on the activity of the individual pages. For example, if 4 of 5 pages of the chunk are detected as hot, the activity of the chunk is calculated to be 80%. The activity percentage can be saved in the chunk as percentage metadata 1706.
[0149] Fig.19A conceptual layout diagram of activity data detected for individual pages represented by chunks is depicted in accordance with one or more embodiments. Because the same page is represented via corresponding chunks in the top layer 1600 and the lower layer 1602 (e.g., chunk 1604a and chunk 1604b), the storage manager 124 traverses the chunks in either layer once to retrieve activity information for the individual page. The address of the individual page may be identified based on the address 1702 of the first page of memory stored as chunk metadata 1700 and the page size 1704. For example, if chunk 1604 has 5 pages, the address of the page to be checked for activity may be calculated as follows:
[0150] Page 4=(chunk_ptr+(PAGE_SIZE)*4)
[0151] Page 3=(chunk_ptr+(PAGE_SIZE)*3)
[0152] Page 2=(chunk_ptr+(PAGE_SIZE)*2)
[0153] Page 1=(chunk_ptr+(PAGE_SIZE)*1)
[0154] Page 0=(chunk_ptr+(PAGE_SIZE)*0)
[0155] When checking the activity of a page, the storage manager 124 may Figure 6 ) and determine whether the access bits 604 of the page address have been marked as accessed (hot) or unaccessed (cold). The page mask 1606 can be used to determine whether the page is in the top layer 1600 or in the lower layer 1602. In response to determining that the looked-up page has a set access bit, a count variable for the appropriate chunk 1604 in the top layer 1600 or the lower layer 1602 can be incremented.
[0156] exist Fig.19 In the example of , the page represented via page mask bits 1800a and 1800b is identified by top page mask 1606a for chunk 1604a as being in the top layer (e.g., having corresponding bits in the page mask set). The page represented via mask bits 1800a and 1800b is identified as a hot page (e.g., having an access bit set in translation table 110), and is therefore added to the access count of chunk 1604a.
[0157] The pages represented by page mask bits 1800c are not set in the top page mask 1606a, indicating that the pages are in the lower layer 1602. These pages are represented via page mask bits 1802a and 1802b in chunk 1604b in the lower layer. The storage manager 124 performs a lookup for the page represented by page mask bits 1800c in the translation table 110 and determines whether the page is hot or cold. Fig.19 In the example of , the pages represented by page mask 1802a are hot, while the pages represented by page mask 1802b are cold.
[0158] In some embodiments, the storage manager 124 calculates the activity percentages of the chunks 1604a and 1604b based on the corresponding access counts. For example, assuming that all three pages represented by the chunk have been accessed, then according to Fig.19 The activity value of chunk 1604a of the example is 100%. Assuming that only one of the two pages represented by the chunk has been accessed, the activity value of chunk 1604b is 50%.
[0159] Fig. 20 A conceptual layout diagram of chunk activity values for chunks 1604 in top and lower layers 1600, 1602 is depicted in accordance with one or more embodiments. The chunk activity values may be stored in the corresponding chunks as percentage metadata 1706. The activity values may be used to reorder the chunks in a layer. In some embodiments, an algorithm such as a merge sort algorithm is used to reorder the chunks based on the calculated activity values.
[0160] exist Fig. 20 In the example of , chunk 1604a has an activity value of 90% and is placed at the head of the top-level data structure 1600, while chunk 1604g has an activity value of 2% and is placed at the tail of the top-level data structure. Chunk 1604b in the lower level 1602 has a tracked activity value of 94% and is placed at the head of the lower level data structure, while chunk 1604f has a tracked activity value of 2% and is placed at the tail of the lower level data structure.
[0161] Fig.21 Depicted is a screen showing information of an exemplary group block generated in response to a memory allocation request according to one or more embodiments. Figure 20-Figure 22 , assuming that each chunk contains one page (e.g., chunk size = 4K, and page size = 4K). In response to a memory allocation request, four pages 2000 are allocated in a data storage medium in the top layer. Four chunks 2002 are generated in the top layer to represent the allocated pages. The chunks include addresses 2004 of the pages represented by the chunks. A page mask associated with the chunks 2002 may also be set in response to identifying a memory allocation in the top layer.
[0162] The chunk 2006 corresponding to the chunk 2002 in the top layer is also generated in the lower layer. Fig.21 In the example of FIG. 1 , it is assumed that pages are allocated to the top layer and that chunks in the lower layers do not contain pages.
[0163] Fig. 22 Depicted is a screen showing exemplary information of blocks 2102a, 2104a in the top and lower layers prior to a demotion decision in accordance with one or more embodiments. Fig.21 and 22 In the example in , the maximum threshold for storing pages in the top level is 4. Fig. 22 In the example of , the top layer contains a total of six pages 2100, which exceeds the maximum threshold of two. Therefore, the number of pages identified for destaging 2104 is two.
[0164] Fig.23 Depicted is a display based on a Fig. 22 A screen of exemplary information of blocks 2102b, 2104b in the top and lower layers after an exemplary downgrade decision. Fig.23 In the example of , the page represented by the chunk 2106a, 2108a having the lowest activity percentage value is selected to be demoted to the lower tier. The demoted page is "moved" to the lower tier and associated with the chunk 2106b, 2108b by changing the page mask bits associated with the demoted page to identify the lower tier instead of the top tier.
[0165] Fig.24 Depicted is a screen showing exemplary information of blocks 2200a, 2202a in the top and lower layers prior to an upgrade decision in accordance with one or more embodiments. Fig.24 In the example of , three pages are represented by chunk 2200a in the top layer. The lower layer contains one page represented by chunk 2204a. Assuming there is room for one or more pages in the top layer, the page represented by chunk 2204a in the lower layer is selected to be promoted to the top layer.
[0166] Fig.25 Depicted is a display based on a Fig.24 2200b, 2202b in the top and lower tiers after an example upgrade decision. When the page represented by chunk 2204a is upgraded, the upgraded page is "moved" to the top tier and associated with chunk 2204b by changing the mask bits associated with the upgraded page to identify the top tier rather than the lower tier.
[0167] Fig.26is a flow diagram of a process for performing memory hierarchy operations according to one or more embodiments. In act 2302, the storage manager 124 (eg, via the memory allocation and list builder module 202) identifies a first memory allocation.
[0168] In action 2304, the storage manager 124 represents the memory allocation via a node (first node) of at least a first chunk size of a first data structure (e.g., top-level data structure 1600) associated with a first tier of the memory hierarchy. The selection of the data structure (and associated memory tier) may be based on preferences set for the application.
[0169] In some embodiments, the first node stores first information of a first page (a first portion of memory) and a second page (a second portion of memory). The first information may include, for example, a virtual address of the first page (e.g., address 1702), a percentage of activity of a group block (e.g., activity percentage metadata 1706), a page location mask (e.g., page mask 1708), the number of valid contact pages in the group block (e.g., page count 1710), a pointer to the next group block in the same layer (e.g., pointer 1712), and a pointer to a corresponding group block in a different layer (e.g., pointer 1714).
[0170] In some embodiments, in addition to allocating the first node in the first data structure, a second node is also allocated in a second data structure associated with a second layer of the memory hierarchy (e.g., low-level data structure 1602). The second node can store second information of the same first page and second page represented by the first node. The first node can be connected to the second node via a pointer 1714.
[0171] In action 2306, the storage manager 124 monitors criteria for at least the first page or the second page. The criteria may be, for example, an application's access to the first page and / or the second page. In this regard, the page tracking and list manager module 204 may be called to determine whether the first page and / or the second page have been accessed, and a percentage of the chunk activity may be calculated based on the determination. Although, according to one or more embodiments, the monitoring of criteria is used to make page migration decisions, it will be appreciated by those skilled in the art that the monitoring may be used for other purposes. For example, the storage manager 124 may monitor activity to determine pages that should be cached or prefetched for faster access, monitor pages that should be locked to prevent them from being moved to swap space, and / or monitor the number of times pages in a chunk have been accessed (access frequency count), and calculate a percentage value for the chunk based on other monitored activity.
[0172] In act 2308, the storage manager 124 updates the order of the first node in the first data structure based on the chunk activity percentage. For example, the chunks may be organized in decreasing chunk activity percentage, with the chunks with the highest activity percentage being placed at the head of the first data structure and the chunks with the lowest activity percentage being placed at the tail of the first data structure. Thus, chunk activity may allow for the representation of the degree or frequency of memory access (referred to as "warmth"), rather than simply representing activity as hot / accessed or cold / unaccessed.
[0173] Fig. 27 24 is a flow chart of a process for generating a group block in response to a memory allocation request according to one or more embodiments. The process begins, and in action 2402, the storage manager 124 (e.g., via the memory allocation and list builder module 202) intercepts the application's memory allocation request and stores the request in a queue (e.g., Figure 3 in queue 306).
[0174] In act 2404, the storage manager 124 identifies the allocation size.
[0175] In action 2406, the storage manager generates one or more first chunks in the top layer based on the allocation size, the chunk size, and the page size. For example, if the allocation size is 128K, the chunk size is 64K, and the page size is 4K, two chunks are generated, each of which represents 16 memory pages.
[0176] In action 2408, one or more second chunks are generated in the lower layer corresponding to the chunks generated in the top layer. For example, if two chunks are generated in the top layer, two corresponding chunks are generated in the lower layer.
[0177] In act 2410, metadata for the represented page is stored in the generated first group block and the second group block. For example, the metadata may identify the address of the first page represented by the group block, and further identify whether the represented page is in the top layer or in the lower layer. If the represented page is in the top layer, the page mask in the top group block is set to "1", and the page mask in the corresponding bottom group block is set to "0". If the represented page is in the bottom layer, the page mask in the bottom group block is set to "1", and the page mask in the corresponding top group block is set to "0"
[0178] The metadata may also include a pointer to the next chunk in the same layer, and a pointer to the corresponding chunk in a different layer.
[0179] Fig.28A flow diagram of a process for tracking activity of chunks 1604 according to one or more embodiments is depicted. The process begins, and in act 2500, the storage manager 124 (e.g., via the page tracking and list manager 204) determines whether there are more chunks to review to determine activity. In some embodiments, the process reviews chunks 1604 in one of the layers (e.g., the top layer 1600) without also reviewing chunks in another layer (e.g., the lower layer 1602).
[0180] If there are more chunks 1604 to review, then in action 2502, the storage manager 124 identifies the page address of the page associated with the chunk. The page address can be calculated based on the address of the starting page, the page offset, and the page number of the seek address as follows:
[0181] Address of page number = chunk_ptr + (PAGE_SIZE * page number)
[0182] In act 2504, the storage manager 124 uses the calculated address to check the activity of the page. In some embodiments, the storage manager 124 performs a lookup of the address in the translation table 110 and determines the value of the corresponding access bit 604. In some embodiments, in response to the access bit being set to "1", the page is identified as a hot page, and in response to the access bit being set to "0", the page is identified as a "cold" page.
[0183] In action 2506, the storage manager 124 reviews the page mask 1606 to identify the layer associated with the page. For example, if the page is associated with the top layer 1600, the corresponding bit in the page mask stored in the top layer block has a value of "1". If the page is associated with the bottom layer 1602, the corresponding bit in the page mask has a value of "0".
[0184] In action 2508, the storage manager 124 increases the temporary activity variable of the chunk 1604 in the top tier 1600 in response to the page being identified as a hot page in the top tier, or increases the temporary activity variable of the corresponding chunk in the lower tier 1602 in response to the page being identified as a hot page in the lower tier.
[0185] In act 2510, the storage manager 124 determines whether there are additional pages in chunk 1604. If the answer is yes, the process continues to act 2502 for determining the activity of the next page in chunk 1604.
[0186] If the answer is no, the storage manager 124 calculates a chunk activity value in action 2512. The chunk activity values for the chunks 1604 in the top layer 1600 and the chunks in the lower layer 1602 may be calculated based on the counts of the corresponding activity variables. In some embodiments, the chunk activity value is a percentage of hot pages in the chunk 1604. The percentage may be calculated by dividing the value of the activity counter by the total number of pages in the chunk 1604 (identified via the page mask bits 1606). The activity value may be stored as activity percentage metadata 1706 for the chunk 1604.
[0187] Referring again to act 2500, if there are no more chunks 1604 to review in the tier, then in act 2514, the storage manager 124 reorders the chunks 1604 based on the chunk activity values. For example, the chunks 1604 may be sorted in descending order of activity, with the chunks with the highest activity values being placed at the head of the data structure.
[0188] Fig.29 A flow diagram of a process for migrating pages from one tier to another tier according to one or more embodiments is depicted. For example, the migration process may be triggered by a determination by the storage manager 124 that the number of pages in the top tier 1600 exceeds a maximum threshold number and should therefore be demoted to the lower tier 1602. The migration process may also be triggered by a determination that the number of pages in the top tier 1600 is below a minimum threshold number and one or more pages from the lower tier 1602 should be promoted to the top tier 1600.
[0189] The process begins, and in act 2600, the storage manager 124 identifies pages to be promoted or demoted. For example, the storage manager 124 may identify the number of pages to be migrated based on a comparison with a threshold number. The pages to be demoted may be, for example, pages from the chunks with the lowest chunk activity value at the tail of the top layer 1600. The pages to be promoted may be, for example, pages from the chunks with the highest chunk activity value at the head of the low layer 1602.
[0190] In act 2602, the storage manager 124 identifies bits of the page mask 1606 in the top chunk and bottom chunk that represent pages to be migrated.
[0191] In action 2604, the storage manager 124 modifies the identified bits of the page mask 1606 in the top chunk and the bottom chunk. Fig.17In the example of FIG. 1 , a page represented by mask bit 1608a in block 1604c in the top layer 1600 may be “moved” (e.g., demoted) to the lower layer by changing the value of mask bit 1608a to “0” and changing the value of mask bit 1608b in corresponding block 1604d in the lower layer 1602 to “1”. In another example, a page represented by mask bit 1610b in block 1604f in the lower layer 1602 may be “moved” (e.g., promoted) to the top layer by changing the value of mask bit 1610b to “0” and changing the value of mask bit 1610a in corresponding block 1604e in the top layer 1600 to “1”.
[0192] In some embodiments, the benefits of tracking chunks representing groupings of memory pages rather than individual pages represented via separate nodes include: 1) nodes are assigned to chunks rather than physical nodes for each page, thereby reducing space overhead; 2) because corresponding chunks are assigned in the top and lower layers, moving a page between layers is simply a change of bits in a page mask, where if a page is moved from a lower layer to a top layer, the page mask bit in the lower layer is cleared and the page mask bit in the top layer is set; 3) merge sort can be used to rearrange chunks based on the calculated access percentage of the chunks; 4) chunk access percentages (0-100%) are calculated Allows for hotness determination, providing a finer-grained distinction between two active chunks; 5) The position of a chunk in a linked list implies access frequency, since the position is based on a percentage of access calculation rather than a hot or cold (one or zero) determination; 6) Corresponding chunks in the top and lower levels are connected, allowing for efficient freeing of pages based on chunks in both the top and lower levels; 7) Memory locality can be exploited to efficiently group pages into chunks, and to make move decisions on groups of pages within a chunk; and 8) Chunk tracking does not require physical allocation of individual pages, since pages can be accessed using a pointer to the starting memory address, using a page offset value.
[0193] 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). The processor may include, for example, an application specific integrated circuit (ASIC), a general or dedicated central processing unit (CPU), a digital signal processor (DSP), a graphics processing unit (GPU), and a programmable logic device, such as a field programmable gate array (FPGA). In a processor, as used herein, each function is performed by hardware (i.e., hardwired) configured to perform the function, or by more general hardware (such as a CPU) configured to execute 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 on several interconnected PCBs. The processor may include other processing circuits; for example, the processing circuit may include two processing circuits interconnected on a PCB: an FPGA and a CPU.
[0194] 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.
[0195] The terms used herein are only used for the purpose of describing specific embodiments and are not intended to limit the inventive concept. In addition, unless explicitly stated, the embodiments described herein are not mutually exclusive. In some embodiments, the various aspects of the embodiments described herein can be combined.
[0196] As used herein, the singular forms "a" and "an" are intended to also include plural forms, unless the context clearly states otherwise. It will be further understood that when used in this specification, the terms "including" and / or "including" specify the presence of the features, integers, steps, operations, elements and / or parts, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, parts and / or their groups. As used herein, the term "and / or" includes any and all combinations of one or more associated listed items. Expressions such as "at least one of..." modify the entire element list when following the element list, rather than modifying the individual elements in the list. In addition, when describing the embodiments of the present invention, the use of "can" 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", "using" and "used" can be considered to be synonymous with the terms "utilize", "utilize" and "utilize" respectively.
[0197] Although exemplary embodiments of systems and methods for on-demand data storage management 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 on-demand data storage management constructed in accordance with the principles of the present disclosure may be embodied in a manner other than that specifically described herein. The present disclosure is further defined in the appended claims and their equivalents.
[0198] Systems and methods for processing storage transactions may include one or more combinations of the features set forth in the following claims.
[0199] Statement 1: A storage system 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: identify a request to allocate memory in the first storage medium, wherein the first storage medium is associated with a first layer of a memory hierarchy; in response to the request, represent the memory via at least a first node of a first data structure, wherein the first data structure is associated with the first layer; track activity associated with a memory address represented by the first node; update an order of the first node in the first data structure based on the activity; and move the association of the first node from the first data structure to a second data structure, wherein the second data structure is associated with a second layer of the memory hierarchy.
[0200] Statement 2: In the storage system of statement 1, wherein the second data structure is associated with the second storage medium.
[0201] Statement 3: In a storage system as described in statement 2, wherein the instructions further cause the processor to: send a command for moving data stored in the memory address from the first storage medium to the second storage medium based on moving the association of the first node from the first data structure to the second data structure.
[0202] Statement 4: In the storage system of statement 1, wherein the instructions further cause the processor to: select the first storage medium to allocate the memory based on a preference associated with a process making the request.
[0203] Statement 5: In the memory system of statement 1, wherein the first node represents a first group of blocks of memory, wherein the first group of blocks is associated with a first page of memory and a second page of memory.
[0204] Statement 6: In the storage system of statement 5, wherein the first node stores a first bit for the first page, the first bit used to identify whether the first page is associated with the first layer or the second layer.
[0205] Statement 7: In a memory system as described in statement 5, wherein the instructions to cause the processor to track activity include instructions to cause the processor to perform the following operations: identify accesses to at least one of the first page of memory or the second page of memory; and calculate a percentage of memory pages identified as being accessed.
[0206] Statement 8: In the memory system of statement 1, wherein the instructions executed by the processor are stored in a user space of the memory.
[0207] Statement 9: In the storage system of statement 1, wherein the processor is configured to move the association of the first node from the first data structure to the second data structure in response to detecting that the total number of pages represented by the first data structure exceeds a threshold number of pages.
[0208] Statement 10: In the memory system of statement 1, the processor is configured to maintain a bit for a memory address in the memory, wherein the bit indicates whether the memory address has been accessed.
[0209] Statement 11: A method comprising: identifying a request to allocate memory in a first storage medium, wherein the first storage medium is associated with a first layer of a memory hierarchy; in response to the request, representing the memory via at least a first node of a first data structure, wherein the first data structure is associated with the first layer; tracking activity associated with a memory address represented by the first node; updating an order of the first node in the first data structure based on the activity; and moving an association of the first node from the first data structure to a second data structure, wherein the second data structure is associated with a second layer of the memory hierarchy.
[0210] Statement 12: In the method of statement 11, wherein the second data structure is associated with a second storage medium.
[0211] Statement 13: In the method of statement 12, the method further comprises: based on moving the association of the first node from the first data structure to the second data structure, sending a command for moving the data stored in the memory address from the first storage medium to the second storage medium.
[0212] Statement 14: In the method of statement 11, the method further comprises: selecting the first storage medium to allocate the memory based on a preference associated with the process making the request.
[0213] Statement 15: In the method of statement 11, wherein the first node represents a first group of blocks of memory, wherein the first group of blocks is associated with a first page of memory and a second page of memory.
[0214] Statement 16: In the method of statement 15, wherein the first node stores a first bit for the first page, the first bit used to identify whether the first page is associated with the first layer or the second layer.
[0215] Statement 17: In the method of statement 15, wherein tracking activity comprises: identifying accesses to at least one of the first page of memory or the second page of memory; and calculating a percentage of the memory pages identified as being accessed.
[0216] Statement 18: The method of statement 11, wherein computer program instructions for performing one or more steps of the method are stored in a user space of a memory.
[0217] Statement 19: In the method of statement 11, the method further comprises: in response to detecting that the total number of pages represented by the first data structure exceeds a threshold number of pages, moving the association of the first node from the first data structure to the second data structure.
[0218] Statement 20: In the method of statement 11, the method further comprises: maintaining a bit for the memory address in the memory, wherein the bit indicates whether the memory address has been accessed.
Claims
1. A storage system, include: a first storage medium; a processor configured to communicate with the first storage medium; as well as a memory coupled to the processor, the memory storing instructions that, when executed by the processor, cause the processor to: identifying a request to allocate memory in the first storage medium, wherein the first storage medium is associated with a first tier of a memory hierarchy; In response to the request, representing the memory via at least a first node of a first data structure, wherein the first data structure is associated with the first layer; tracking activity associated with a memory address represented by the first node; updating an order of the first node in the first data structure based on the activity; and An association for the first node is moved from the first data structure to a second data structure, wherein the second data structure is associated with a second level of the memory hierarchy.
2. The storage system according to claim 1, in, The second data structure is associated with a second storage medium.
3. The storage system according to claim 2, in, The instructions further cause the processor to: Based on moving the association of the first node from the first data structure to the second data structure, a command is sent to move the data stored in the memory address from the first storage medium to the second storage medium.
4. The storage system according to claim 1, in, The instructions further cause the processor to: The first storage medium is selected to allocate the memory based on a preference associated with a process making the request.
5. The storage system according to claim 1, in, The first node represents a first group of blocks of memory, wherein the first group of blocks is associated with a first page of memory and a second page of memory.
6. The storage system according to claim 5, in, The first node stores a first bit for a first page, the first bit being used to identify whether the first page is associated with the first layer or the second layer.
7. The storage system according to claim 5, in, The instructions causing the processor to track the activity include instructions causing the processor to: identifying an access to at least one of the first page of memory or the second page of memory; and A percentage of memory pages identified as being accessed is calculated.
8. The storage system according to claim 1, in, The instructions executed by the processor are stored in a user space of the memory.
9. The storage system according to claim 1, in, The processor is configured to move the association of the first node from the first data structure to the second data structure in response to detecting that a total number of pages represented by the first data structure exceeds a threshold number of pages.
10. The storage system according to claim 1, in, The processor is configured to maintain a bit in a memory for the memory address, wherein the bit indicates whether the memory address has been accessed.
11. A method for storing, include: identifying a request to allocate memory in a first storage medium, wherein the first storage medium is associated with a first tier of a memory hierarchy; In response to the request, representing the memory via at least a first node of a first data structure, wherein the first data structure is associated with the first layer; tracking activity associated with a memory address represented by the first node; updating an order of the first node in the first data structure based on the activity; and An association for the first node is moved from the first data structure to a second data structure, wherein the second data structure is associated with a second level of the memory hierarchy.
12. The method according to claim 11, in, The second data structure is associated with a second storage medium.
13. The method according to claim 12, further comprising: include: Based on moving the association of the first node from the first data structure to the second data structure, a command is sent to move the data stored in the memory address from the first storage medium to the second storage medium.
14. The method according to claim 11, further comprising: include: The first storage medium is selected to allocate the memory based on a preference associated with a process making the request.
15. The method according to claim 11, in, The first node represents a first group of blocks of memory, wherein the first group of blocks is associated with a first page of memory and a second page of memory.
16. The method according to claim 15, in, The first node stores a first bit for a first page, the first bit being used to identify whether the first page is associated with the first layer or the second layer.
17. The method according to claim 15, in, Tracking of said activities includes: identifying an access to at least one of the first page of memory or the second page of memory; and A percentage of memory pages identified as being accessed is calculated.
18. The method according to claim 11, in, Computer program instructions for performing one or more steps of the method are stored in user space of the memory.
19. The method according to claim 11, further comprising: include: The association for the first node is moved from the first data structure to the second data structure in response to detecting that a total number of pages represented by the first data structure exceeds a threshold number of pages.
20. The method according to claim 11, further comprising: include: A bit is maintained in a memory for the memory address, wherein the bit indicates whether the memory address has been accessed.
