Metric tracking for tiered memory

A memory controller-based metric tracker addresses the latency issue in non-native memory tiers by tracking access statistics and proactively moving data between memory tiers, enhancing computing system performance and efficiency.

US12817797B1Active Publication Date: 2026-12-01ASTERA LABS INC
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
US18/986242
Authority / Receiving Office
US · United States
Patent Type
Patents(United States)
Current Assignee / Owner
Priority Date
2024-10-18
Filing Date
2024-12-18
Publication Date
2026-12-01
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

Computing systems experience degraded processor performance due to higher latency in accessing non-native memory tiers, which is exacerbated by additional delays in data format and protocol translations, leading to inefficient host-based memory management solutions that incur computational and storage overhead.

Method used

Implementing a metric tracker on a memory controller to monitor and track access statistics of non-native memory tiers, allowing for proactive data movement between near and far memory tiers based on access frequencies, reducing latency by moving frequently accessed data to native memory.

Benefits of technology

This approach reduces overhead and improves memory efficiency by minimizing processor loading and latency, enabling more precise tracking without computational and storage-intensive operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure US12817797-D00000_ABST
    Figure US12817797-D00000_ABST
Patent Text Reader

Abstract

The present disclosure describes aspects of metric tracking for tiered memory. In various aspects, a memory controller includes a metric tracker for tracking access activity of non-native host memory. The metric tracker can monitor reads or writes of data by a host to various address ranges, which may correspond with pages or cache lines in a tier of the non-native memory. The metric tracker may aggregate the access statistics to determine respective temperature values for the address ranges, indicative of hot pages or cold pages of memory. Based on the respective temperatures, the metric tracker can rank the address ranges (e.g., pages) within the memory tier and the memory controller can expose these temperature rankings (e.g., hot to cold) to the host. The host may then move data from a particular address range (e.g., hot pages) to a native memory tier to reduce access latency and improve host processor performance.
Need to check novelty before this filing date? Find Prior Art

Description

CROSS REFERENCE TO RELATED APPLICATION

[0001] This present disclosure claims priority to U.S. Provisional Patent Application Ser. No. 63 / 709,297 filed Oct. 18, 2024, the disclosure of which is incorporated by reference herein in its entirety.BACKGROUND

[0002] Computing systems and servers often include multiple levels of memory for storing working data of a processor. Generally, natively attached memory of the processor has a lower latency than other memories connected to the processor through an auxiliary channel or peripheral bus channel of the computing system. Whereas the natively attached memory has a baseline latency, the use of an auxiliary channel or peripheral bus to access non-native memory incurs additional latency. For example, the additional latency of non-native memory access can include delays associated with various data format and protocol translations at components along a data path between the processor and the other memory. As such, data read and data write operations to the non-native memories typically have a higher overall latency, which degrades processor performance due to longer thread stall times associated with the increase latency.SUMMARY

[0003] This summary is provided to introduce subject matter that is further described in the Detailed Description and Drawings. Accordingly, this Summary should not be considered to describe essential features nor used to limit the scope of the claimed subject matter.

[0004] In some aspects, a method for tracking a metric of memory access includes receiving, by a memory controller and via a host interconnect, a memory command from a host for access to a memory device coupled to the memory controller via a memory interconnect. The method compares an address of the memory command to an address range of the memory device that a metric tracker is configured to monitor. In response to the address of the memory command matching the address range of the metric tracker, the method alters a value of the metric tracker that corresponds to the address range. The method includes reporting, via the host interconnect and to the host, the value of the metric tracker that corresponds to the address range. In some implementations, a memory tier manager of the host moves data from the memory device to a local memory of the host based on the value (e.g., page temperature) of the metric tracker.

[0005] In other aspects, an apparatus includes a host interface configured to communicate via a host interconnect, a memory interface configured to communicate via a memory protocol, and a memory controller configured to process memory commands received, via the host interface, from a host for access to a memory device coupled to the memory interface. The apparatus also includes a metric tracker configured to compare a memory address of a memory command processed by the memory controller with an address range of the memory device that the metric tracker is configured to monitor. The metric tracker can alter a value of the metric tracker that corresponds with the address range in response to the address of the memory command matching the address range of the metric tracker. The metric tracker is also configured to expose, via the host interface, the value of the metric tracker that corresponds to the address range.

[0006] In yet other aspects, an apparatus includes a host device and a first memory device configured as a first memory tier of the host device, the first memory device coupled to the host device via a first memory interconnect. The apparatus also includes a second device memory configured as a second memory tier of the host device and a memory controller to process memory commands of the host device for access to the second memory device. The memory controller is coupled to the host device via a host interconnect, coupled to the second memory device via a second memory interconnect, and includes a metric tracker for monitoring an address range of the second memory device. The metric tracker is configured to compare a memory address of a memory command processed by the memory controller with an address range of the second memory device. In response to the address of the memory command matching the address range of the metric tracker, the metric tracker alters a value of the metric tracker that corresponds with the address range. The metric tracker may also expose, via the host interconnect and to the host device, the value of the metric tracker that corresponds to the address range.BRIEF DESCRIPTION OF THE DRAWINGS

[0007] Apparatuses for and techniques of metric tracking for tiered memory are described with reference to the following drawings. The use of same numbers in the drawings and associated description may reference like features and elements:

[0008] FIG. 1 illustrates an example environment in which aspects of metric tracking for tiered memory can be implemented;

[0009] FIG. 2 illustrates example configurations of computing systems that can implement aspects of metric tracking for tiered memory;

[0010] FIG. 3-1 illustrates an example memory system configured in accordance with one or more aspects of metric tracking for tiered memory;

[0011] FIG. 3-2 illustrates an example metric tracker with counters configured in accordance with one or more aspects;

[0012] FIG. 3-3 illustrates examples of data compression and address space mappings through which one or more aspects of metric tracking for tiered memory can be implemented;

[0013] FIG. 4 illustrates an example memory tier architecture implemented with a hardware-based memory tier manager;

[0014] FIG. 5 illustrates an example memory tier architecture implemented with a software-based memory tier manager;

[0015] FIG. 6 illustrates an example memory tier architecture implemented with a far memory formed from multiple non-native memories;

[0016] FIG. 7 illustrates an example memory tier architecture implemented with a non-native memory with multiple metric trackers;

[0017] FIG. 8 illustrates an example memory tier architecture implemented with a compute express link (CXL) switch through which multiple non-native memories are accessible;

[0018] FIG. 9 depicts an example method for tracking a metric based on an address range of a memory accessed by a host memory command;

[0019] FIG. 10 depicts an example method for tracking respective temperatures of address ranges within a non-native memory;

[0020] FIG. 11-1 depicts an example method for implementing a hierarchical search of non-native memory to identify memory areas for migration to another memory;

[0021] FIG. 11-2 illustrates example configurations of metric tracker counters in accordance with one or more aspects.

[0022] FIG. 12 depicts an example method for monitoring access of a memory by multiple processors on a per port basis;

[0023] FIG. 13 depicts an example method for verifying metadata of memory access commands based on metadata criteria of an address range within a memory;

[0024] FIG. 14 depicts an example method for moving data between memory tiers based on metrics provided by a metric tracker of a memory tier; and

[0025] FIG. 15 illustrates an example integrated circuit environment in which aspects of metric tracking for tiered memory can be implemented.DETAILED DESCRIPTION

[0026] Computing systems and servers often include multiple tiers of memory for storing working data of a processor. Generally, natively attached memory of the processor has a lower access latency than other memories connected to the processor through an auxiliary channel or peripheral of the computing system. For example, natively attached double data rate (DDR) dual inline memory modules (DIMMs) of a processor may an access latency of N and peripheral component interconnect (PCI) attached DIMMs of the processor have an access latency of N+Y, where Y represents the additional latency for data traversing the PCI bus. As such, the non-native host memory has measurably higher access latencies for read and write operations. This higher access latency impacts processor core performance as processor threads stall while waiting for memory transactions to complete. To mitigate the effects of increased latency associated with non-native memory, memory of the computing system can be partitioned into separate memory tiers, a local memory tier and remote memory tier. In preceding techniques of tier management, the memory tiers are managed by host processor hardware or software executing on a host processor. These host-based management solutions have drawbacks, however, because the criteria and data used for moving data between memory tiers are computationally and storage intensive, such as when tracking, calculating, and storing data on a per page basis across memory tiers. While the granularity of the tracking may be reduced to lower resource processor loading, less precise tracking results in more copy and move operations between memory tiers. Thus, the preceding techniques for host-based memory management are expensive in terms of computational and storage resources of host processors or degrade memory performance with excessive copy and move operations due to inaccurate tracking.

[0027] This disclosure describes apparatuses for and techniques of metric tracking for tiered memory that can reduce overhead and improve memory efficiency. In contrast with preceding host-based techniques, the described aspects of metric tracking for tiered memory may implement a metric tracker on a memory controller of a tier of non-native host memory. The metric tracker can be configured to monitor reads or writes of data by a host (e.g., processor) to various address ranges (e.g., pages) in the memory tier. In some cases, the metric tracker aggregates the access statistics to determine respective access frequencies for the address ranges, indicative of frequently accessed pages (i.e., hot pages) or infrequently accessed pages (i.e., cold pages) of memory. Based on the respective temperatures (i.e., hot or cold), the metric tracker can rank the address ranges (e.g., pages, cache lines) within the memory tier and expose or report these temperature rankings (e.g., hot to cold) to the host. A memory tier manager of the host may then move data from a particular address range (e.g., hot page, hot cache line) to a native memory tier of the host to reduce access latency and improve host processor performance.

[0028] In various aspects, a host can implement a memory tier manager in processor hardware and / or software executing on the host (e.g., application, operating system (OS), kernel) to implement memory tiers. For example, a memory tier manager of a host can allocate native memory of a processor as a tier of near memory (e.g., native memory tier, direct attached memory) and allocate CXL-coupled memory as a tier of far memory (e.g., non-native memory tier, locally attached and shared memory tier). The memory tier manager of the host can then expose low latency native memory (e.g., per CPU or processor socket) and higher latency CXL memory as separate nonuniform memory access (NUMA) nodes that form respective near and far memory tiers. The memory tier manager can be configured to move inactive or cold memory pages from the tier of near memory to the tier of far memory (e.g., page demotion). Alternatively, the memory tier manager can be configured to move active or hot memory pages form the tier of far memory to the tier of near memory (e.g., page promotion). A metric tracker implemented by a memory controller (e.g., CXL memory controller) of the far memory can track host access on a per address range basis (e.g., pages, cache lines) and provide a list of the hottest address ranges or pages within the non-native (e.g., , CXL-coupled memory). In some implementations, the far memory coupled with the memory controller is configured for storing blocks of compressed data that are accessed through a compressed address space (e.g., memory organized into blocks smaller than pages or lines of native memory). In such cases, the metric tracker of the memory controller can be configured to track access on a per address range in the compressed address space. Because the host or host-side memory controller is not aware of the compressed address space downstream of the memory controller, the metric tracker may use an address translation table for the compressed address space to convert address of a host access command to the compressed address space of the far memory. Returning to the list of hottest address ranges or pages within the non-native memory, the memory tier manager of the host can access registers of the memory controller (e.g., CXL-linked memory controller) to retrieve a list of temperature-ranked address ranges, which the memory tier manager can use to proactively move memory contents (e.g., page data, cache line data) from the far memory to the near memory tier of native host memory to reduce access latency. Thus, the latency impact of accessing the far memory tier can be mitigated by using access statistics generated by the metric tracker to move frequently accessed data (e.g., hot data) to the tier of near memory earlier (e.g., to avoid page misses).

[0029] Further, by implementing the metric tracker on the non-native memory controller (e.g., CXL memory controller), a host-side OS, kernel, or application does not need to actively collect and maintain statistics on a per memory page (or finer) granularity, which avoids adding processor overhead. Additionally, a host-side kernel or host memory controller cannot track access of non-native or far memory through a compressed address space because a host typically implements an uncompressed address space that is different from the non-native memory controller (CXL controller) address space. The described metric tracker of a non-native memory controller may be highly configurable and able to track memory with a level of granularity, detail, and / or flexibility that host-side trackers lack. Additionally, for large memory footprints that implement multiple non-native coupled memories (e.g., far memory tiers) with respective memory controllers, aspects of metric tracking for tiered memory can scale to track and report memory temperature (e.g., hotness) across the multiple memories to reduce tracking overhead. For example, a metric tracker can be implemented on a per-controller basis and selectively configured for a given controller and associated memory deployment, which may include one or more memories with different address space formats (e.g., uncompressed address spaces, compressed address spaces). Thus, with a host managing multiple memory spaces, it can be more efficient to implement the metric tracking in the non-native memory controllers, which need to manage only one memory space (e.g., smaller memory blocks of a compressed address range).

[0030] In aspects, a metric tracker can be configured to track address ranges for some, all, or none of a memory coupled with the memory controller. Alternatively or additionally, a metric tracker can be implemented with any suitable number of counters (e.g., metric value counters, registers, or bank of counters) to track access statistics of an address range. Thus, settings or parameters of a metric tracker are configurable to specify the number of counters implemented by a metric tracker, how frequently the counters are updated or cleared, or a size of the memory range or memory area tracked per counter. Various heuristics reported by the metric tracker are also configurable and may include a histogram for duration of time over the number of hottest memory areas (e.g., N seconds of the hottest Y pages), minimum access rates, maximum access rates, average access rates, page refreshes, page hits, or the like. The aspects may also adaptively select which heuristics to use for tracking memory access, from which memory devices to track metrics, and how to aggregate metric values to improve memory allocation decisions across multiple tiers of memory. In some implementations, one or more metric trackers may be implemented or configured to align with separate memory partitions (e.g., FIG. 7), with the memory partitions being connected to a same or different processor. These are but a few example implementations of and technical advantages provided by metric tracking for tiered memory, which are further described throughout this disclosure. The following discussion describes an operating environment, techniques that may be employed in the operating environment, an integrated circuit, and various memory systems in which components of the operating environment may be embodied. In the context of the present disclosure, reference is made to the operating environment, techniques, or various elements by way of example only.

[0031] FIG. 1 illustrates an example operating environment 100 having computing systems 102 in which aspects of metric tracking for tiered memory may be implemented. Examples of the computing system 102 include a computing cluster 104 of a cloud, servers 106 of a data center, and a computing workstation 108. Other examples of a computing system 102 may include a data storage device, an Internet-of-Things (IoT) device, a router, a wireless access point, a network-attached-storage (NAS) device, a smart-phone, a netbook, a tablet computer, an access point, a network-attached storage, a camera, a smart appliance, a printer, a set-top box, a server, a solid-state drive (SSD), an automotive computing system, or any other suitable type of device. A computing system 102 may process, communicate, or store data for any suitable purpose, such as to enable functionalities of a particular type of a device, an application, a virtual machine (VM), cloud service, memory system, cache system, storage system, or the like.

[0032] In example implementations, the computing system 102 includes a host device 110, an interconnect 112, and a memory system 114. In some implementations, functions of the computing system 102 may be distributed across multiple electronic devices, such as the host device 110 being incorporated as part of a computing main board (e.g., server or workstation main board) while the memory system 114 is incorporated as part of a discrete, packaged component (e.g., peripheral card), or as part of a memory module of a device. The host device 110 (e.g., a host apparatus) can include a processor 116 (e.g., central processing unit (CPU)), computer-readable media 118 (CRM 118), and a memory tier manager 120. Although not shown, the host device 110 or processor 116 may also include a memory controller to enable memory access operations of the host device 110 with the CRM 118. In some implementations, the processor 116 is coupled to cache memory, and the cache memory coupled to the memory controller of the host device 110. Thus, the processor 116 may be coupled, directly or indirectly, to the memory controller and / or the CRM 118. The processor 116 may be configured as a processor core, a multi-core processor, application processor, a central processing unit (CPU), a graphics processing unit (GPU), a neural network engine or accelerator, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), integrated circuit (IC), a communications processor (e.g., a modem or baseband processor), a system-on-chip (SoC), and so forth.

[0033] The CRM 118 of the host device 110 may be realized, for example, with a dynamic random-access memory (DRAM) die or module, including a three-dimensional (3D) stacked DRAM device, such as a high bandwidth memory (HBM) device or a hybrid memory cube (HMC) device. In aspects, the CRM 118 may include one or more DRAM modules configured or operate as natively attached memory for the processor 116. The DRAM modules may be coupled to the processor 116 by a memory bus configured to operate in compliance with a memory access protocol or specification (e.g., protocols of a Double Data Rate 5 (DDR5), Double Data Rate 6 (DDR6), or subsequent DDR specifications). The CRM 118 may operate as a cache and / or main memory (e.g., low latency memory, direct attached memory, near memory) of the host device 110 or processor 116. Although not shown, the host device 110 can also include storage memory ( ) The storage memory may be realized, for example, with a storage-class memory device, such as one employing 3D XPoint™ or phase-change memory (PCM), a solid-state drive, or flash memory. Generally, the host device 110 may store data to the CRM 118 and / or read the data from the CRM 118 when processing the data of an OS, applications, VM, cloud service, or the like.

[0034] The memory tier manager 120 of the host device 110 may be implemented using hardware of the processor 116, firmware executing on the host device (e.g., memory controller firmware), and / or software (e.g., application, operating system (OS), kernel) executing on the processor 116 or another processor of the host device. For example, a software version of the memory tier manager 120 may be implemented at an application level for applications configured to directly control memory page placement to memory tiers or data movement between memory tiers. In other cases, the memory tier manager 120 can be implemented as part of an OS kernel of the host device to abstract memory page management operations from the applications. In aspects, the memory tier manager 120 can allocate, partition, or manage memories coupled to the processor 116 of the host device 110 to provide two or more tiers of memory. For example, the memory tier manager 120 can allocate DRAM of the CRM 118 as a tier of near memory and other memory of or coupled to the memory system 114 as one or more tiers of far memory. To implement memory management, the memory tier manager 120 can move memory pages of cache lines (e.g., inactive, cold data) from the near memory to the far memory tier (e.g., page demotion) or move other memory pages of cache lines (e.g., active, hot data) from the far memory to the near memory (e.g., page promotion). Alternatively or additionally, the memory tier manager 120 can provide metrics, information, or indicators to a memory controller (e.g., adaptive page policy of the memory controller) to enable the memory controller to keep hot pages open longer. As described herein, the memory tier manager 120 may receive access metrics, temperature values, or page rankings from one or more metric trackers of a memory system and implement memory management between memory tiers based on the access metrics provided by the metric tracker for CXL-coupled memories.

[0035] The interconnect 112 (e.g., host interconnect) couples the host device 110 with the memory system 114 of the computing system. In some implementations, the interconnect 112 is configured as a CXL interconnect over a peripheral component interconnect express (PCIe) interface. Thus, the host device 110 and the memory system 114 may communicate using transaction packets or “flits” compliant with a CXL input / output (CXL.io) protocol, CXL memory (CXL.mem) protocol, or any other suitable CXL protocol. In some aspects, one or more processors 116 issue load and / or store commands to the memory system 114 over the interconnect 112 as CXL.mem transactions packets to store data (e.g., memory pages) to the memory system 114. Alternatively or additionally, the memory tier manager 120 of the host device may access registers of the memory system 114 using CXL.io commands or transactions, such as to configure components of the memory system 114 or obtain access metrics relating to memory coupled with the memory system. In other cases, the memory tier manager 120 may communicate with the memory system 114 or metric tracker 126 using a side channel or an auxiliary data interface, through which the memory tier manager can configure the memory system or the obtain access metrics.

[0036] The memory system 114, which in this example is illustrated as a memory peripheral card 122, includes a memory controller 124 that is operably coupled with the host device 110 via the interconnect 112. In aspects, the memory controller 124 may represent an apparatus configured to process commands that enable a host to access memory devices coupled to the apparatus. The memory controller 124 can include or be configured with a metric tracker 126, metric tracker parameters 128 (tracker parameters 128), and metric tracker data 130 (tracker data 130) for implementing the aspects described throughout this disclosure. The memory system 114 includes or is configured to couple with a memory 132, which may be implemented as one or more modules of DRAM 134. Generally, the memory controller 124 can be coupled to a physical interface (e.g., a high-level, logical interface) of the host device 110 and to at least one memory 132 of the memory system 114. The memory controller 124 can, for example, communicate memory commands (e.g., CXL.mem commands) or requests with the host device 110 and provide corresponding memory requests to a memory module or device with appropriate formatting, addressing, timing, and reordering in accordance with a memory access protocol or specification (e.g., protocols of a DDR4, DDR5, DDR6, or subsequent DDR specifications). Although illustrated as DRAM 134, the memory 132 may include various types of random-access memory (RAM), static RAM (SRAM), or the like. Alternatively or additionally, the memory 132 may include read-only memory (ROM), electronically erasable programmable ROM (EEPROM) or Flash memory (e.g., NOR Flash or NAND Flash). These memories, individually or in combination, may be used by the memory system 114 to store data associated with applications, tenants, workloads, initiators, virtual machines, and / or an operating system of the host device 110.

[0037] In various implementations, the memory system 114 can be configured as a memory resource for the host device 110 or components thereof. For example, the memory controller 124 can be configured to provide memory expansion, memory pooling, or memory sharing functionalities to one or more processors 116 of a host device 110 using the memory 132 and / or other memory devices coupled to the memory controller 124. In some aspects, the memory tier manager 120 can configure the memory 132 as one or more tiers of non-native memory (e.g., far memory) for use by the host device 110 or the processor 116. For example, the memory tier manager 120 can allocate DRAM of CRM 118 (e.g., native memory) a tier of near memory and allocate DRAM 134 (e.g., non-native memory, CXL-coupled memory) of the memory system 114 as a tier of far memory. In some aspects, the memory system 114 is configured to store data of a host as compressed data, and the memory controller 124 may include a compression engine and / or an address translation table (not shown). Thus, the memory controller 124 can compress pages of host data for storage as compressed data to blocks of the memory 132 or DRAM 134. To access or fetch the compressed data from the memory system 114, the host device 110 may use a page address associated the data (e.g., uncompressed address space), which the memory controller 124 and / or components thereof (e.g., metric tracker 126) translate to an address (e.g., a compressed address space) of the blocks of compressed data written to the memory 128. Accordingly, the memory system 114 or memory controller 124 may include or maintain the address indirection table (and / or translation lookaside buffer (TLB)) to map data page addresses to corresponding block addresses in the memory 132 or DRAM 134 at which the compressed data is stored. For example, a CXL memory controller may implement a compressed memory space for attached memory and a metric tracker of the CXL memory controller can be configured to monitor access statistics through the compressed memory space, operations that a host-side memory controller is unable to implement due to a difference in address spaces (e.g., uncompressed host space versus CXL controller mapped compressed address space).

[0038] In aspects, the metric tracker 126 can be configured to monitor access of the DRAM 134 based on tracker parameters 128 and generate counter values, temperature values, or other access metrics as tracker data 130. The metric tracker 126 may include one or more banks of counters (e.g., logical address-based counters, physical address-based counters) that can be configured or assigned as needed to track respective ranges or areas of memory. In some implementations, the metric tracker 126 tracks host access to the DRAM 134 on a per address range basis (e.g., memory areas, pages, cache lines) and generates a list of frequently accessed (e.g., hot or hottest) address ranges within the DRAM 134. The tracked memory areas, memory pages, or cache lines may be set using default settings, user defined settings or ranges, or with settings adaptively determined by the metric tracker. The list of hot address ranges (e.g., temperature-ranked page list) can be reported to the memory tier manager 120, which may then use the list to implement movements of active address ranges (e.g., pages, cache lines) from the DRAM 134 to the native DRAM of CRM 118. Alternatively, the metric tracker 126 or a memory controller may use the hot list of address ranges to initiate or trigger data movements from the DRAM 134 to the DRAM of CRM 118. As such, the list of hot address ranges generated by the metric tracker 126 can be used to reduce the latency impact of accessing the memory tier of DRAM 134 by moving the frequently accessed data (e.g., hot pages) to the memory tier of CRM 118 earlier (e.g., before page misses). As described herein, a memory tier of near memory (e.g., native memory, directly attached memory) may include memory having lower latency or higher performance that a memory tier of far memory (non-native memory, CXL-coupled memory). A computing system may include multiple tiers of memory that range from near memory to tiers of far memory, with varying levels of latency and / or performance between the multiple tiers.

[0039] The tracker parameters 128 may include any settings or information useful to configure the metric tracker 126 to implement various aspects described herein. In some cases, the tracker parameters 128 includes information for configuring one or more counters of the metric tracker 126 to monitor various types of activity of the DRAM 134. For example, the metric tracker 126 can use the tracker parameters 128 to configure multiple counters for monitoring read access, write access, or read / write access of respective address ranges of the DRAM 134. Generally, a counter for an address range may include a count value that the metric tracker 126 increments in response to access or activity within the address range specified, which may include a read operation, write operation, refresh, page hit, cache line hit, or the like. A counter or the metric tracker 126 may be configured to monitor or track any suitable address range, such as a cache line of memory, a page of memory, a memory region, a maximum memory area, a memory die, a memory module, and so forth. The tracker parameters 128 may include default settings, user defined settings, iterative settings, or adaptive settings for assigned counters to respective areas, regions, pages, or cache lines of memory.

[0040] Further, the metric tracker 126 may implement adaptive or hierarchical search of memory for hot memory regions, scoping down from terabyte size areas down to kilobyte regions or individual cache lines. In some cases, the metric tracker 126 tracks access on a per address range basis to enable identification of physical devices or devices pages of hot or active data. The metric tracker 126 may capture tracker data 130 (e.g., access metrics) over time, have configurable monitoring intervals, and / or generate temperature values or ratings based on the access metrics. Example tracker data 130 provided by the metric tracker 126 may include histograms, statistics (e.g., minimum, maximum, average, moving average, etc.), access rates (e.g., read, write, read / write), temperature trends (e.g., increasing temperature, decreasing temperature), hot page lists, hot cache line lists, and so forth. Thus, a counter of the metric tracker 126 may be configured to monitor a default memory range, a user defined memory range, an iteratively determined memory range (e.g., scaling down in range size), or an adaptively determined memory range (e.g., selectively tracking hot pages or cache lines of memory). As described herein, the memory tier manager 120 of the host or the metric tracker 126 can use the tracker data 130 to move hot address ranges of memory from the tier of far memory to a near memory tier of the host device 110 to reduce memory access latency and improve processor performance. Various configurations and operations implemented by or with the metric tracker 126 are described throughout this disclosure.

[0041] FIG. 2 illustrates at 200 example configurations of computing systems that can implement aspects of metric tracking for tiered memory. The computing systems 200 may represent example configurations of the host device 110, interconnect 112, and memory system 114 as described with reference to FIG. 1. As shown in FIG. 2, the host devices 110 in this example include a computing host 110-1, a graphical processing unit host 110-2 (GPU host 110-2), and an accelerator host 110-3. Generally, a computing system 102 can be configured to include one or more host devices 110, a memory system 114, and one or more memories 132. In various aspects, the memory system 114 may be configured to implement memory expansion to expand host memory, memory pooling for multiple host devices, or memory sharing between multiple host devices or processors thereof. The illustrated host devices 110 of FIG. 2 are presented as examples, and the memory system 114 may be coupled with other types of hosts or processing platforms to implement aspects of metric tracking for tiered memory.

[0042] With reference to the example host devices 110, the computing host 110-1 includes processors 116, which may be implemented as described with reference to FIG. 1, and native memory 202 (e.g., local memory, low latency memory). The native memory 202 can include any suitable type of volatile memory and / or non-volatile memory, such as cache memory or DRAM operably coupled with the processors 116 of the host device. The processors 116 may process instructions to implement various applications, workloads, initiators, virtual machines, or an operating system of the host device 110, any of which may store data to the memory system 114. For example, a memory tier manager 120 of the host device 110-1 may be implemented by a core of the processors 116 executing instructions (e.g., application, OS) and / or as hardware of one of the processors 116. The memory tier manager 120 may allocate memory of the host device as multiple memory tiers and manage data movement between the memory tiers based on tracker data 130 provided by a metric tracker 126. In this example, the computing host 110-1 includes a CXL controller 204 (e.g., CXL root port) configured to enable communication with the memory system 114 through the interconnect 112 and a PCIe physical interface 206 (PCIe PHY 206) over which the CXL controller 204 may implement various CXL protocols.

[0043] The GPU host 110-2 includes a GPU 208 and native memory 210 that is operably coupled with the GPU 208. The GPU 208 may include or be configured as an ASIC, artificial intelligence (AI) engine, a machine-learning (ML) engine, a digital signal processing (DSP) engine, a scalar engine, or the like. The native memory 210 of the GPU host 110-2 can include any suitable type of volatile memory and / or non-volatile memory, such as an HBM device or DRAM modules operably coupled with the GPU 208 and / or other engines of the GPU host 110-2. The GPU 208 may execute instructions from the native memory 210 to implement AI or ML workloads (e.g., models, networks, applications), which may process data stored to the memory system 114. Additionally, the GPU 208 or another processor core of the host 110-2 may execute instructions from the native memory 210 to implement a memory tier manager 120 (e.g., application, OS, kernel function). The memory tier manager 120 may also be implemented at least partially in hardware of the GPU 208, which may include registers and circuitry configured implement memory tier management. For example, the memory tier manager 120 can allocate memory of the host device 110-2 as multiple memory tiers and manage data movement between the memory tiers based on tracker data 130 provided by a metric tracker 126. In this example, the GPU host 110-2 includes an instance of a CXL controller 204 configured to enable communication with the memory system 114 and an instance of a PCIe PHY 206 over which the CXL controller 204 can implement various CXL protocols.

[0044] In various implementations, the accelerator host 110-3 includes an accelerator 212 and native memory 214, which may include a cache or DRAM operably coupled to the accelerator. The accelerator 212 may include application-specific architecture to optimize processing for various functions, such as communication (fifth-generation (5G) cellular networks), cybersecurity, AI, ML, automation, machine vision, and so forth. In some aspects, the accelerator host 110-3 stores data to the memory system 114 over the interconnect 112. The accelerator host 110-3 may execute instructions from the native memory 214 to implement a memory tier manager 120 (e.g., application, OS, kernel function). Alternatively or additionally, the memory tier manager 120 of the host device 110-3 can be implemented at least partially in hardware of the accelerator 212, which may include registers and circuitry configured implement memory tier management. For example, the memory tier manager 120 can allocate memory of the accelerator host 110-3 as multiple memory tiers and manage data movement between the memory tiers based on tracker data 130 provided by a metric tracker 126. In this example, the accelerator host 110-3 includes an instance of a CXL controller 204 configured to enable communication with the memory system 114 and an instance of a PCIe PHY 206 over which the CXL controller 204 can implement various CXL protocols.

[0045] The memory system 114 may be implemented with a PCIe PHY 216 and a CXL controller 218 to enable communication of data and commands with one or more host devices 110 through the interconnect 112. The memory system 114 also includes an instance of a memory controller 124 that includes a metric tracker 126, tracker parameters 128, and tracker data 130. Generally, the memory controller 124 may communicate with a host device 110 to execute commands to store data to and read data from the memory 132 operably coupled with the memory system 114 via a memory physical interface 220 (memory PHY 220). In this example, the memory 132 may include memory embodied as part of the memory system 114 or external memory coupled with the memory PHY 220. The memory 132 may include one or more DRAM modules soldered onto or coupled with a PCB assembly that forms the memory system 114. Alternatively or additionally, the interconnect 112 and memory system 114 may be embedded with a host device 110 as a PCB assembly (e.g., mainboard or server blade). The memory 132 can be configured as one or more tiers of non-native or far memory for a host device for which the memory controller 124 stores data as pages or cache lines of data to the memory 132. In aspects, the metric tracker 126 monitors access across multiple address ranges of the memory 132 and generates tracker data 130 (e.g., temperature-ranked page list), which enables preemptive movement of hot pages from the tier of far memory to a tier of near memory of the host device.

[0046] FIG. 3-1 illustrates at 300 an example memory system configured in accordance with one or more aspects of metric tracking for tiered memory. In this example, the memory controller 124 and metric tracker 126 are illustrated in the context of a memory system 114 that includes multiple DRAMs 134-1 through 134-n (e.g., DRAM modules, DRAM devices), where n can be any suitable integer. In some cases, the DRAM 134 includes or is configured as non-native memory or a tier of far memory of a host device 110. Alternatively or additionally, the memory system 114 may be operably coupled with external memory (e.g., non-native or CXL-coupled memory) through which the described aspects may be implemented. In various implementations, the metric tracker 126 can interact with a memory tier manager 120, memory controller 124, DRAM 134, and / or components of the memory system 114 to implement aspects of metric tracking for tiered or non-native memory.

[0047] To enable communication with a host device 110, the memory controller 124 includes a CXL interface 302, which may include a CXL controller for implementing CXL protocols and / or a PCIe PHY to provide a physical interface over which data (e.g., CXL.mem transactions) and CXL control information (e.g., CXL.io transactions), commands, and / or information are communicated. Alternatively or additionally, the memory system 114 may include a non-CXL interface to the host, such as a PCIe interface, USB interface, fiber-based interface, network-based interface, or the like. As such, the described aspects of metric tracking for tiered memory may be implemented using a CXL-based host interconnect or any other suitable type of host interconnect implemented between a host and a memory system. The memory controller 124 also includes a DRAM interface 304, which may be configured to implement a memory protocol (e.g., DDR4, DDR5, DDR6) for transferring data to and from the DRAMs 134-1 through 134-n. In aspects, the memory controller 124 can be implemented by executing processor-executable instructions (e.g., firmware) stored on a non-volatile memory (not shown, e.g., ROM, SRAM, or flash) of the memory controller that, responsive to execution, directs the memory controller or components thereof to perform operations or acts described herein. In some implementations, the metric tracker 126 operates as part of the memory controller 124 to perform aspects of metric tracking for tiered memory. Thus, the metric tracker 126 may be implemented by the processor core 306 executing the processor-executable instructions stored on a hardware-based memory (not shown) of the memory controller. The memory controller 124 also includes a fabric 308 (or other internal bus, crossbar) for transferring data and / or commands between components of the controller, the CXL interface 302, the DRAM interface 304, or other components of the memory controller.

[0048] In this example, the metric tracker 126 includes tracker parameters 128 and tracker data 130, as well as a page optimizer 310, debug and trace functions 312 (debug and trace 312), and predictive algorithms 314 for moving data between memory tiers. The tracker parameters 128 may include any settings (e.g., default, user defined, iterative, or adaptive settings) and / or information useful to configure the metric tracker 126 to implement various aspects described herein. For example, the tracker parameters 128 can include settings information for configuring one or more counters of the metric tracker 126 to monitor, for multiple address ranges, various types of activity of the DRAM 134. The tracker data 130 (e.g., access metrics) may include counts, temperature values, or temperature ratings (e.g., hot, warm, lukewarm, cold) computed by the metric tracker 126 for regions of memory (e.g., pages, cache lines). In various implementations, the tracker data 130 for a given address range may include histograms of access activity, access statistics (e.g., minimum, maximum, average, moving average, etc.), access rates (e.g., read, write, read / write), a number of cross-port accesses (e.g., unauthorized CXL port / link access), a number of cross-domain accesses (e.g., unauthorized host / VM accesses), temperature trends (e.g., increasing temperature, decreasing temperature), page temperature rank, cache line temperature rank, and so forth.

[0049] In aspects, the page optimizer 310 of the metric tracker 126 may use tracker data 130 to tune device physical address (DPA) to memory array (e.g., DRAM) row and column mappings and / or interleaving. For example, based on cache line temperature rankings, the page optimizer 310 can spread and / or interleave hot cache lines across different physical device banks to reduce latency or improve access metrics. In some cases, the page optimizer 310 coordinates with the memory tier manager 120 of the host device to update DRAM mappings and interleaving on page opening and / or page closing. The debug and trace functions 312 of the metric tracker 126 may be used for development or troubleshooting various conditions of memory access. In some implementations, the debug and trace functions 312 include port-based tracking for monitoring memory domain security or metadata verification (e.g., trusted execution keys or bits) for debugging host software or firmware. For example, the debug and trace functions 312 may include counters that are mapped on a per port basis to assigned memory tiers or memory domains, which may report security violations when a processor or application attempts to access an unauthorized memory domain (e.g. CPU1 accesses memory range of CPU0). In some aspects, the metric tracker 126 may be configured with a threshold for a number of port violations by which the metric tracker isolates or denies access of the offending processor or application in response to the number of accesses or attempts exceeding the threshold. In other cases, the debug and trace functions 312 may verify that metadata (security keys or flags) of memory commands received from a host match metadata criteria for memory being accessed. Thus, the metric tracker 126 may verify that trusted environment execution bits (TEE bits) of a memory command match or correspond with TE bits or keys set for an address range of a memory tier. In some implementations, the metric tracker 126 may be configured with a threshold for a number of security violations by which the metric tracker isolates or denies access of the offending initiator (e.g., application or VM) in response to the number of security violations exceeding the threshold.

[0050] In aspects, the predictive algorithms 314 may be implemented by the metric tracker 126 to initiate data movements between a tier of far memory and a tier of near memory. In some cases, a predictive algorithm monitors page temperatures or trends in page temperature and may issue preemptive or preventive page movements before a host requests (e.g., due to a page miss) the page to reduce access latency. For example, a predictive algorithm may rank and track a list of hot pages in a far memory and mark a page trending hotter for promotion to near memory of the host. Alternatively, the predictive algorithms may track cold pages of a first tier of far memory and mark a page trending colder for demotion to a second tier of far memory, which can be higher latency and lower performance than the first tier of far memory. In some cases, the predictive algorithms provide or control iterative tracking of memory activity, which may include providing updated tracking parameters for counters of the metric tracker. For example, based on a first iteration of using counters to track an area of memory, the predictive algorithms can provide updated or revised tracking parameters to focus subsequent tracking to a smaller area of the memory that includes the highest concentration of activity. In other implementations, a predictive algorithm may be configured to monitor security or cross-port violations and track trends in security or port violations on a per-port, per-initiator, or per link basis. In response to an upward trend in security or port violations, the predictive algorithm can shut down the port or link of the offending initiator and report the violation to the host. These and other operations implemented by the metric tracker 126 are described further with reference to the methods 900 through 1400 of FIGS. 9-13.

[0051] FIG. 3-2 illustrates at 301 illustrates an example metric tracker with counters configured in accordance with one or more aspects of metric tracking for tiered memory. In this example, a metric tracker 126 is configured with tracker parameters 128, counters 316, and tracker data 130. Although not shown, the metric tracker 126 of FIG. 3-2 may include other elements described herein, such as the page optimizer 310, debug and trace functions 312, and predictive algorithms 314 to implement various functions associated with those elements. The metric tracker 126 may be embodied as part of a memory controller or coupled with a memory controller, enabling the metric tracker 126 to monitor access activity (e.g., logical addresses, physical addresses) of one or more memories (e.g., one or more tiers of far memory) coupled with the memory controller. In various aspects, the metric tracker interacts with a memory tier manager 120, memory controller 124, DRAM 134, and / or components of the memory system 114 to implement aspects of metric tracking for tiered or non-native memory.

[0052] In aspects, the metric tracker 126 may include multiple counters 316 or sets of counters for tracking metrics of memory access or activity over respective addresses, address ranges, rows, pages, or areas of memory. The counters 316 may be implemented as hardware-based registers, which are configurable through the tracker parameters 128 to track metrics of memory access. The metrics tracked by the counters 316 can then be stored as tracker data 130 and / or provided to a memory controller or host. In some implementations, the metric tracker 126 can store multiple iterations of metrics tracked by the counters as tracker data 130 and provide the metrics of one or more iterations to the host or a memory controller in response to a request for the metrics. In this example, the counters 316 are organized into counter banks 318-0 through 318-m, each of which includes multiple counters 316 that can be selectively configured or assigned as needed to monitor one or more memory address ranges. Generally, a counter 316 can be configured to monitor or track a metric for any suitable address range, which may be configurable from a cache line (e.g., 64 bytes) up to multiple gigabytes (e.g., 32 GB) of memory. In various implementations, the counters 316 can be configured to track metrics related to access in relation to logical memory addresses (e.g., cache lines, pages) and / or physical memory addresses (e.g., DRAM rows, DRAM pages).

[0053] In aspects, the metric tracker 126, which may be configured as a function or widget of a memory controller, includes one or more sets of registers (e.g., configuration registers) of tracker parameters 128 through which counters 316 can be configured. These tracker parameters or register settings may allow for respective configuration of each widget, function, or counter bank for tracking different ports, logical address activity, physical address activity, or concurrently track read and write access within the memory area. Generally, the memory controller, metric tracker, or memory tier manager of a host may access and / or set the configuration registers or tracking parameters for the counters. As such, the memory tier manager may issue CXL.io commands that include an identifier of one of the registers and a corresponding configuration value. In aspects, one or more of the counters may be configured or assigned to monitor memory access associated with logical memory addresses, which may enable or correlate with tracking hot pages (e.g., active, frequently accessed pages) and / or cold pages (e.g., inactive, less frequently accessed pages) as related to the logical address space. The set of registers for tracking logical address access may include a tracking address mask register, a tracking address match register, a granularity offset register, a tracking enable register, a port number register, a read or write tracking register, and a tracking timer register. For example, the tracking address mask register (e.g., track_address_mask, 41 bits) and the tracking address match register (e.g., track_address_match, 41 bits), can be used by the metric tracker or counter to filter a device physical address (DPA) for tracking a specified metric (e.g., read, write). The granularity offset register (e.g., track_granularity_offset, 6 bits) can be used to derive an address for the counter. In aspects, the counter address may be derived from the granularity offset value, which can have a range of 6 to 35 for 2 terabyte capacity memories. Note, the lower 6 bits of the DPA may not be used when memory access is at 64-byte granularity (e.g., 64-byte cache line-based access).

[0054] In various implementations, the maximum value of the granularity offset can be changed to reflect a maximum capacity of a memory coupled to the memory controller, and firmware of the controller or metric tracker may alter the maximum or minimum granularity offset based on memory capacity or access granularity. The tracker enable, port number, and read / write registers can be set to configure counters of the metric tracker for per port monitoring, access type, or enabling specific counters. For example, to enable tracking of the counter, the tracking enable register (e.g., track_enable, 1 bit) can be set to one (enable) or zero (disabled). The port number register (e.g., port_number, 2 bits) may specify which port to track, such as no ports (00), port one and port zero (11), port zero (01), or port one (10). The read or write tracking register (track_rw, 1 bit) can be used to specify to whether the counter tracks writes (0) or reads (1) of an address range. To set timing or a time window of a counter, the tracking time register (track_timer_value, 32 bits) can be set to any suitable 32-bit value or set to zero for free running counters. The counters may saturate at a maximum value and the metric tracker may be configured to reset the counter after the count value is read. Alternatively or additionally, the metric tracker may be configured to alert the memory controller firmware or memory tier manager of the host of the saturation and / or reset the counter in response to reaching saturation.

[0055] In some aspects, the registers also include tracker parameters for tracking metrics related to access through physical memory addresses. These tracker parameters or configuration registers may include a tracking row mask register, a tracking row match register, a row granularity offset register, a physical address tracking enable register, row hit tracking register, a page miss tracking register, a refresh tracking register, or the like. Thus, one or more counters of the metric tracker 126 can be configured to track, based on physical addresses within a memory (e.g., across one or more rows), a number of row hits, a number of page misses, a number of refreshes, and / or a distribution of one or more of these metrics across different rows, regions, or areas of the memory. The counters 316 can monitor the activity over the physical address ranges (e.g., one or more rows of DRAM cells) and collect the specified metrics related to the activity to generate tracker data 130, which can be provided or reported to the host or memory controller to enable data or page movements as described herein. In some aspects, these physical metrics of the memory activity can be used to reallocate physical addressing or redistribute activity in a DRAM DIMM to improve performance, such as by spreading highly active rows or pages across the DRAM DIMM, e.g., to improve thermal performance. The metric tracker 126 can communicate the physical memory metrics directly to the memory controller of the DRAM DIMM, enabling the memory controller to implement the reallocation of physical memory addressing transparently to the host. In other cases, the metric tracker 126 can communicate the physical memory metrics to the host, which can use the metric data to determine a reallocation of the physical addressing of the memory. Alternatively or additionally, the metric tracker can communicate logical memory metrics (e.g., hot / cold page rankings) and physical memory metrics (e.g., row hits, page misses, refreshes) to the host, thereby enabling the host or memory manager of the host to optimize data movement and / or physical address reallocation to improve memory performance.

[0056] By way of example, consider the configuration of a metric tracker 126 at 303 which illustrates counters 316 that are configured as banks 318 that can be configured to track metrics related to access activity by logical memory addresses and / or by physical memory addresses. In aspects, the tracking parameters 128 can be selectively configured to set or assign one or more counters 316 to track a specified metric related to access of a range of memory addresses (e.g., ranges of uncompressed address space, ranges of compressed address space) or physical areas of the memory. The metric tracker 126 may store the tracked metrics (e.g., count information) generated by the counters as tracker data 130, which can be provided to a host or memory controller. In this example, the metric tracker includes two sets of components for tracking metrics associated with logical memory address access and physical memory address access, though these components may be implemented in combination in other configurations. For tracking metrics related to logical memory address access or activity, the metric tracker 126 includes tracking parameters 128 implemented as logical address counter configuration registers 320, a first counter bank 318-1 from which logical address counters 322 can be assigned, and tracker data implemented as logical address metrics 324 for storing metrics related to access or activity by logical memory address. For tracking metrics related to physical memory address access or activity, the metric tracker 126 includes tracking parameters 128 implemented as physical address counter configuration registers 326, a second counter bank 318-2 from which physical address counters 328 can be assigned, and tracker data implemented as physical address metrics 330 for storing metrics related to access or activity by physical memory addresses. Based on the respective tracking parameters 128 for the logical and physical memory addresses, the counter banks 318-1 and 318-2 can track the specified metrics to generate the corresponding logical address metrics 324 and physical address metrics 330 that relate to activity over the selected logical and physical memory addresses. The metric tracker 126 can then communicate the logical address metrics 324 and physical address metrics 330 to the host, thereby enabling the host or memory manager of the host to optimize data movement and / or physical address reallocation to improve memory performance.

[0057] FIG. 3-3 illustrates at 305 examples of data compression and address space mappings through which one or more aspects of metric tracking for tiered memory can be implemented. In various aspects, a non-native memory or far memory tier coupled with a memory controller (e.g., CXL-linked memory controller) may be configured to store data of a host device as compressed data. In other words, the memory controller 124 may implement a different address space (e.g., compressed address space) than the host, such that the host (or host-side agent) is not aware of or have visibility into the address space downstream of the memory controller. In some aspects, the metric tracker 126 of the memory controller is configured to monitor access of compressed data stored to the DRAM 134 based on tracker parameters 128 configured to monitor access address ranges of the compressed address space. Based on access of the compressed data or compressed address space, the metric tracker can generate counter values, temperature values, or other access metrics of tracker data 130 as described herein. Thus, the metric tracker 126 may include one or more banks of counters (e.g., logical address-based counters, physical address-based counters) that can be configured or assigned as needed to track respective ranges or areas of memory in the context of the compressed address space. For example, as shown at 305, a host memory 332 (e.g., local memory, native memory) may include or maintain one or more pages 334 of data associated with various workloads or applications executing on a host device. Generally, a page 334 of the data may include multiple cache lines 336 of data, which in this example are configured as 4 KB cache line(s) 338 of uncompressed host data. In various aspects, a host may send a page 334 of host data to the memory controller 124 for storage to a DRAM 130 (e.g., external memory) or other memory coupled to the memory controller. The memory controller 124 can use a compression engine 340 to compress the data and then write the compressed data of the page to blocks 342 of the DRAM 130. The DRAM 130 may be divided or configured with blocks of any suitable size, and in this example the DRAM 130 is divided into 1 KB blocks 344, though any block size may be used. The compression engine 310 may implement any suitable compression algorithm and a compression ratio of the data may vary depending on the algorithm and / or characteristics of the source data. In this example, assume the compression rate for the compression engine 340 is approximately 50 percent (50%+3-5%), such that the 4 KB cache line 338 yields 2 KB of compressed data, which the memory controller can write into the DRAM 130 as two 1 KB blocks of compressed data 346.

[0058] Due to a size difference between host pages and blocks of DRAM, the memory controller 124 may implement and maintain an address indirection table 348 for mapping page addresses used by a host to block addresses used by the memory controller 124 to access the DRAM 130. As shown in FIG. 3-3, the address indirection table 348 enables data access based on a translation of a page address space 350 to the block address space 352, which can be used by the memory controller to write data to and / or read data from (e.g., compressed data, address information) the DRAM 130. Generally, smaller block sizes of DRAM may enable more efficient utilization of the memory space, however, the smaller block size increases a number of blocks and corresponding block addresses, as indicated by the relative size of the block address space 352. In various aspects, a host may access data of local memory or the DRAM 130 based on a cache line address for data access. The host can determine a page address for the page that includes the cache line, and then lookup information in a page descriptor to determine if the page data is in local memory (e.g. native memory, host memory) or stored to the DRAM 130 (e.g., as compressed data). When the requested page has been stored to DRAM, the host can request the page from the memory controller 124 and the memory controller can use the address indirection table 348 to locate and read the compressed data from the blocks that correspond to the requested page. The memory controller 124 can then use compression engine 340 to decompress the data and return the uncompressed data of the requested cache line or page to the host. To write data to the DRAM 130, the host may determine whether data of a cache line or page is to be stored to the DRAM and send the cache line or page of data to the memory controller 124. The memory controller 124 can use the compression engine 340 to compress the data and write the compressed data to free blocks in the memory.

[0059] In the context of FIG. 3-3, counters 316 of the metric tracker 126 can be configured to monitor access of respective address ranges of the block address space 352 of the DRAM 134. Because hosts typically do not have visibility into the block address space, the memory controller 124 and / or metric tracker 126 may use the address indirection table 348 to translate addresses of data access, tracker configuration settings (e.g., page / line addresses to block ranges), or the like. Alternatively or additionally, the metric tracker 126 may be configured to monitor access statistics based on a geometry or organization of the block address space 352. For example, the metric tracker 126 may be configured to monitor ranges of block addresses, while a host-side metric tracker would instead monitor address ranges for lines or pages of data in native memory. To monitor access statistics of the block address space 352, the metric tracker 126 can obtain a host-based address of an access command and use the address indirection table 348 to translate that address (e.g., address in uncompressed address space) to an address of the block address space 352 at which the data is stored. Alternatively or additionally, the metric tracker 124 and / or counters 316 may be disposed downstream of the address translation such that the memory controller 124 provides addresses of data access to the metric tracker 124 and / or counter 316 as addresses in the block address space 352. These are but a few examples of how the memory controller 124 and metric tracker 126 may use the address indirection table 248 to enable aspects of metric tracking for an address space (e.g., block address space 352) for compressed data of non-native memory.

[0060] FIG. 4 illustrates at 400 an example memory tier architecture implemented with a hardware-based memory tier manager in accordance with one or more aspects. The memory architecture may include native host memory configured as a tier of near memory and non-native memory configured as a tier of far memory. In some implementations, one or more of the memories of the far memory tiers may be implemented with or through a compressed address space. In this example, a processor 116 of a host includes an instance of a memory tier manager 120 implemented as a hardware-based memory tier manager 402 (HW tier manager 402). The hardware tier manager 402, or hardware-based tiering mechanism, may be implemented in circuitry and / or firmware of a processor (e.g., CPU, GPU, ASIC) and interact with one or more metric trackers 126 to move data between a tier of near memory and a tier of far memory. As shown in FIG. 4, a DDR interconnect 404 or memory bus couples the processor 116 with DRAM DIMMs 406, which the hardware tier manager 402 can allocate or expose near memory 408 as a tier of lower latency and / or higher performance memory.

[0061] In some implementations, a CXL interconnect 410 couples the processor 116 with a memory controller 124, which includes an instance of a metric tracker 126. The memory controller 124 enables host access to DIMMs of DRAM 134 through a DDR interconnect 412 (e.g., memory bus), which may be configured similarly to or differently from the DDR interconnect 404. The hardware tier manager 402 can allocate or expose the DRAM DIMMs 134 as a tier of far memory 414 (e.g., CXL-coupled memory). As one or more applications execute on the processor 116, an OS or kernel of the processor 116 may allocate memory pages across both the tier of near memory 408 and the tier of far memory 414. For example, the kernel executing on the processor 116 may allocate memory pages to the near memory 408 until the near memory is occupied (e.g., memory capacity reaches a high watermark), then allocate memory pages to the far memory 414. In aspects, the metric tracker 126 can be configured with one or more counters to track access metrics for respective address ranges (e.g., memory pages, compressed blocks) in the tier of far memory 414 formed from one or more memory arrays of the DRAM DIMMs 134. As the memory pages or blocks are allocated and accessed in the far memory 414, the counters of the metric tracker 126 can track access metrics (e.g., host-related activity) in the respective address ranges of the counters. The access metrics tracked by a counter for a specific address range in the tier of far memory 414 may include reads, writes, reads and writes, page hits, refreshes, security violations, port violations, or the like.

[0062] Based on the access metrics (e.g., tracker data 130), the metric tracker 126 can compute respective temperature values or rankings for address ranges of the tier of far memory 414 or DRAM DIMMs 134. For example, the metric tracker 126 can generate a list of memory pages, cache lines, or block areas ranked by access activity (temperature) and expose a list 416 of hot memory pages (e.g., temperature-ranked page list), cache lines, or block areas to the hardware tier manager 402. Alternatively or additionally, the metric tracker 126 may expose or send the tracker data 130 to the hardware tier manager 402. Based on the list of hot memory pages, cache lines, or block areas (or other metrics), the hardware tier manager 402 can preemptively move a hot memory page (hot page 418), cache line, or block area from the tier of far memory 414 to the tier of hot memory 408 of the processor. In other cases, a predictive algorithm of the metric tracker 126 may initiate a move of a hot memory page, cache line, block area from the tier of far memory 414 to the tier of near memory 408. By so doing, the hardware tier manager 402 may preclude the need for a memory controller of the processor 116 to fetch the hot page 418 from the far memory 414 and reduce latency access time of the processor. The hardware tier manager 402 may also move cold pages (e.g., cold memory page 420, rarely accessed data) from the tier of near memory 408 to the tier of far memory 414 (e.g., as block of compressed data) to free up space for migrating other hot memory pages from the far memory 414 to the near memory 408 of the host.

[0063] FIG. 5 illustrates at 500 an example memory tier architecture implemented with a software-based memory tier manager in accordance with one or more aspects. The memory architecture 500 may be implemented similar to the memory architecture described with reference to FIG. 4, with a native host memory configured as a tier of near memory 508 and non-native memory configured as a tier of far memory 514. In some implementations, one or more of the memories of the far memory tiers may be implemented with or through a compressed address space. In this example, a processor 116 of a host device includes an instance of a memory tier manager 120 implemented as a software-based memory tier manager 502 (SW tier manager 502). In various aspects, the software tier manager 502, or software tiering mechanism, can be implemented by the processor 116 executing code or instructions stored on a memory of the host to implement memory tier management functions. For example, the software tier manager 502 may be implemented at an application level for applications of a host that want direct control of memory management (e.g., page or cache line placement), or as part of an OS kernel to abstract the memory management from the applications. The software tier manager 502 can interact with one or more metric trackers 126 to move data between the tier of far memory 514 and the tier of near memory 508. As shown in FIG. 5, a DDR interconnect 504 couples the processor 116 with DRAM DIMMs 506, which the software tier manager 502 allocates or exposes as a tier of near memory 508.

[0064] In some implementations, a CXL interconnect 510 couples the processor 116 with a memory controller 124, which includes an instance of a metric tracker 126. The memory controller 124 enables access to DIMMs of DRAM 134 through a DDR interconnect 512 (e.g., memory bus), which may be configured similarly to or differently from the DDR interconnect 504. Alternatively or additionally, the memory controller 124 may configure the DRAM DIMMs 134 as blocks for storing compressed data using a compressed address space. When implementing a compressed address space, the memory controller 124 and / or 126 may enable and / or track access of data stored in the compressed address space. The software tier manager 502 can allocate or expose the DDR DIMMs 134 as a tier of far memory 514 (e.g., CXL-coupled memory) of the host. As one or more applications execute on the processor 116, an OS or kernel of the processor 116 may allocate memory pages across both the near memory 508 and the far memory 514. For example, the kernel executing on the processor 116 may allocate memory pages to the tier of near memory 508 until the near memory is occupied, then allocate memory pages to the tier of far memory 514 through the memory controller 124. In aspects, the metric tracker 126 can be configured with one or more counters to track access metrics for respective address ranges (e.g., memory pages, cache lines, block areas) in the tier of the far memory 514 formed from one or more memory arrays of the DRAM DIMMs 134. As the memory pages are allocated and accessed in the tier of far memory 514, the counters of the metric tracker 126 can track access metrics (e.g., host-related activity) in the respective address ranges of the counters. The access metrics tracked by a counter for a specific address range in the tier of far memory 514 may include reads, writes, reads and writes, page hits, refreshes, security violations, port violations, or the like.

[0065] Based on the access metrics (e.g., tracker data 130), the metric tracker 126 can compute respective temperature values or rankings for address ranges of the tier of far memory 514 or DRAM DIMMs 134. For example, the metric tracker 126 can generate a list of memory pages, cache lines, block areas ranked by access activity (temperature) and expose a list 516 of hot memory pages, cache lines, or blocks to the software tier manager 502 of the processor 116. Alternatively or additionally, the metric tracker 126 may expose or send any of the tracker data 130 to the software tier manager 502. Based on the list of hot memory pages, cache lines, or blocks (or other metrics), the software tier manager 502 can preemptively move a hot memory page (hot page 518), cache lines, or blocks from the tier of far memory 514 to the tier of near memory 508 of the processor. In other cases, a predictive algorithm of the metric tracker 126 may initiate a move of a hot memory page, cache line, or block area from the tier of far memory 514 to the tier of near memory 508. By so doing, the software tier manager 502 may preclude the need for a memory controller of the processor 116 to fetch the hot page 518 from the far memory 514 and reduce latency access time of the processor. The software tier manager 502 may also move cold pages (e.g., cold memory page 520) from the tier of near memory 508 to the tier of far memory 514 to free up space for migrating other hot memory pages from the far memory 514 to the near memory 508 of the host.

[0066] FIG. 6 illustrates at 600 an example memory tier architecture implemented with a far memory formed from multiple non-native memories in accordance with one or more aspects. The memory architecture 600 may be implemented with a native host memory configured as a tier of near memory and one or more non-native memories configured as tiers of far memory. In some implementations, one or more of the memories of the far memory tiers may be implemented with or through a compressed address space. In this example, a processor 116 of a host device includes an instance of a memory tier manager 120 implemented as a software-based memory tier manager 602, which may be implemented similar to the software tier manager 502 as described with reference to FIG. 5 or throughout the disclosure. As shown in FIG. 6, a DDR interconnect 604 couples the processor 116 with DRAM DIMMs 606, which the software tier manager 602 allocates or exposes as a tier of near memory 608.

[0067] The processor 116 may include or be coupled with multiple CXL interfaces (not shown) to support respective CXL links with one or more memory controllers 124. In this example, CXL interconnects 610-1 through 610-n couple the processor 116 with respective memory controllers 124-1 through 124-n, where n is any suitable integer. As shown in FIG. 6, the memory controllers 124-1 through 124-n may include a respective instance of a metric tracker 126-1 through 126-n. The memory controllers 124-1 through 124-n enable host access to DIMMs of DRAM 134-1 through 134-n via a DDR interconnect 612-1 through 612-n (e.g., memory bus), which may be configured similarly to or differently from the DDR interconnect 604. In various aspects, the software tier manager 602 can expose any suitable number of the DDR DIMMs 134-1 through 134-n as one or more tiers of far memory 614 (e.g., CXL-coupled memory) of the host or processor 116. In some cases, the software tier manager 602 configures all of the DDR DIMMs 134-1 through 134-n (e.g., similar performance memory) as one tier of far memory 614. In other cases, the software tier manager 602 configures respective DIMMS of the DDR DIMMs 134-1 through 134-n (e.g., different performance memory) as respective tiers of far memory that have a range of latency, access time, and / or performance. Thus, in some aspects, a memory tier manager may move hot pages and cold pages to appropriate tiers of the near and the far memory based on specified metrics, including migrating hot pages and cold pages between different tiers of the far memory 614.

[0068] As one or more applications execute on the processor 116, an OS or kernel of the processor 116 may allocate memory pages across both near memory 608 and the far memory 614 (e.g., pages 616 in the nth tier of far memory). In aspects, a metric tracker 126 of each memory controller 124-1 through 124-n can be configured with one or more counters to track access metrics for respective address ranges (e.g., memory pages) in the DRAM DIMMs 134 managed by that respective controller to form the tier of far memory 614. Based on the access metrics (e.g., tracker data 130) collected by one or more metric trackers 126, the metric trackers can compute respective temperature values or rankings for address ranges (e.g., blocks of compressed data) of the tier of far memory 614. For example, the metric trackers 126-1 through 126-n can generate respective lists of memory pages or cache lines ranked by access activity (temperature) and expose lists 618-1 through 618-n of hot memory pages or cache lines to the software tier manager 602 of the processor 116. Alternatively or additionally, any of the metric trackers 126-1 through 126-n may expose or send any of the tracker data 130 to the software tier manager 602. Thus, instead of a host memory function having to capture and track access metrics across several physical memories (e.g., multiple CXL-memories), the described aspects enable the host tier manager to efficiently receive aggregate and detailed access metrics from multiple memory controllers, thereby offloading the computational and storage costs of access tracking from the host. Based on the lists of hot memory pages or cache lines (or other metrics), the software tier manager 602 can preemptively move a hot memory page (hot page 620), cache line, or block area from the tier of far memory 614 to the tier of near memory 608 coupled with the processor. The software tier manager 602 may also move cold pages (e.g., cold memory page 622) from the tier of near memory 608 to the tier of far memory 614 to free up space for migrating other hot memory pages from the far memory to the near memory of the host.

[0069] FIG. 7 illustrates at 700 an example memory tier architecture implemented with a non-native memory with multiple metric trackers in accordance with one or more aspects. The memory architecture 700 may be implemented with native host memory configured as tiers of near memory and one or more non-native memories configured as a tier of far memory. In some implementations, one or more of the memories of the far memory tiers may be implemented with or through a compressed address space. In this example, a host device is configured as a multi-processor (e.g., multi-CPU) device with a processor 116-1 and a processor 116-2, each of which may independently execute respective applications, workloads, VMs, kernels, or the like. The processors 116-1 and 116-2, or another processor of the host, may include an instance of a memory tier manager 120 implemented as a software-based memory tier manager 702, which may be implemented similar to the software tier manager 502 as described with reference to FIG. 5 or throughout the disclosure. As shown in FIG. 7, the processors 116-1 and 116-2 may each be coupled with a native memory and a non-native memory or partition thereof. In this example, a first DDR interconnect 704-1 couples the processor 116-1 with first DRAM DIMMs 706-1 as native memory and a second DDR interconnect 704-2 couples the processor 116-2 with second DRAM DIMMs 706-2 as native memory. The software tier manager 702 may allocate or expose these native memories as respective tiers of near memory 708-1 and 708-2 for the processors 116-1 and 116-2.

[0070] The processors 116-1 and 116-2 may include or be coupled with at least one CXL interface (not shown) to support a respective CXL link with one or more memory controllers 124. In this example, respective CXL interconnects 710-1, 710-2 couple each of the processors 116-1 and 116-2 with a memory controller 124. As shown in FIG. 7, the memory controller 124 includes multiple instances a metric tracker, metric tracker 126-1 and metric tracker 126-2. In various aspects, one or more metric trackers 126 may be implemented, or may be partitioned, to align with separate partitions of memory coupled with a memory controller. Alternatively or additionally, the memory partitions managed by the memory controller 124 may be connected or allocated to different processors or CPUs of a host device. Here, the memory controller 124 enables the processor 116-1 to access a first partition of memory allocated from DRAM DIMMs 134 via a DDR interconnect 712 and enables the processor 116-2 to access a second partition of the memory via the DDR interconnect (e.g., DDR5 memory bus). In various aspects, the software tier manager 702 can expose any suitable portion or number of the DRAM DIMMs 134 as a respective tier of far memory 714 of CXL-coupled memory to the processor 116-1 and / or processor 116-2. As respective applications or workloads execute on the processor 116-1 or processor 116-2, an OS or kernel of each processor may allocate memory pages across both tiers of near memory 708-1, 708-2 and respective partitions of the tier of far memory 714.

[0071] In aspects, the metric trackers 126-1 and 126-2 may be configured with one or more counters to track access metrics for respective address ranges (e.g., memory pages) in the partition of the tier of far memory 714 allocated to a corresponding one of processor 116-1 and processor 116-2. Based on the access metrics (e.g., tracker data 130) collected by each metric tracker 126, the metric trackers 126-1, 126-2 can compute respective temperature values or rankings for address ranges of their partition in the tier of far memory 714. For example, the metric tracker 126-1 and metric tracker 126-2 can generate respective lists of memory pages, cache lines, or block areas ranked by access activity (temperature) for each memory partition and expose lists 716-1 and 716-2 of hot memory pages or cache lines to the software tier manager 702 of the processor 116-1 and processor 116-2. Alternatively or additionally, the metric tracker 126-1 and / or metric tracker 126-2 may expose or send any of the tracker data 130 to the software tier manager 702. Based on the lists of hot memory pages, cache lines, or block areas (or other metrics), the software tier manager 702 can preemptively move a hot memory page (hot page 718-1 and hot page 718-2), cache line, or block area from the tier of far memory 714 to the respective tier of near memory 708-1 of the processor 116-1 and tier of near memory 708-2 of processor 116-2. The software tier manager 702 may also move cold pages (e.g., cold memory page 720-1 and cold memory page 720-2) from the tier of near memory 708-1 and tier of near memory 708-2 to the tier of far memory 714 to free up space for migrating other hot memory pages from the far memory to the near memories of the host.

[0072] FIG. 8 illustrates an example memory tier architecture implemented with a CXL switch through which multiple non-native memories (e.g., far memories) are accessible in accordance with one or more aspects. The memory architecture 800 may be implemented with native host memory configured as tiers of near memory and multiple non-native memories coupled to a host through the CXL switch as multiple tiers of far memory. In some implementations, one or more of the memories of the far memory tiers may be implemented with or through a compressed address space. In some implementations, the non-native memories coupled to each memory controller can have a different latency and / or performance level and a tier manager can assign or configure these memories as respective tiers of far memory. In aspects, the host can use a metric tracker of each memory controller of the far memory to promote hot pages and / or demote cold pages between the tiers of far memory. In this example, a host device is configured as a multi-processor (e.g., multi-CPU) device with a processor 116-1 and a processor 116-2, each of which may independently execute respective applications, workloads, VMs, kernels, or the like. The processors 116-1 and 116-2, or another processor of the host, may include an instance of a memory tier manager 120 implemented as a software-based memory tier manager 802, which may be implemented similar to the software tier manager 502 as described with reference to FIG. 5 or throughout the disclosure. As shown in FIG. 8, the processors 116-1 and 116-2 may each be coupled with a native memory and a CXL switch through which non-native memories are accessible. In this example, a first DDR interconnect 804-1 couples the processor 116-1 with first DRAM DIMMs 806-1 as native memory and a second DDR interconnect 804-2 couples the processor 116-2 with second DRAM DIMMs 806-2 as native memory. The software tier manager 802 may allocate or expose these native memories as respective tiers of near memory 808-1 and 808-2 for the processors 116-1 and 116-2.

[0073] The processors 116-1 and 116-2 may include or be coupled with at least one CXL interface (not shown) to support a respective CXL link with the CXL switch through which one or more memory controllers 124 and respective far memories are accessible. In this example, respective CXL interconnects 810-1, 810-2 couple each of the processors 116-1 and 116-2 with a CXL switch 812, which is coupled with multiple memory controllers 124-1, 124-2, through 124-n via respective CXL interconnects 810-3, 810-4, through 810-k, where k is any suitable integer. As shown in FIG. 8, each of the memory controllers 124-1, 124-2, through 124-n may include a respective instance of a metric tracker, metric tracker 126-1, metric tracker 126-2, through metric tracker 126-n. In various aspects, one or more metric trackers 126 may be implemented, or partitioned, to align with a partition or tier of far memory coupled with a memory controller. Alternatively or additionally, the memory partitions managed by the memory controller 124 may be connected or allocated to different processors or CPUs of a host device. Here, the CXL switch 812 enables the processor 116-1 and the processor 116-2 to access one or more tiers of memory allocated from DRAM DIMMs 134-1, 134-2, through 134-n via respective DDR interconnects 814-1, 814-2, through 814-n. In some implementations, the respective DRAM DIMMs 134 coupled to each of the memory controllers 124 may have different latencies, compression ratios, bandwidth, and / or levels of performance, such that memory tiers of varying performance can be formed form the non-native or far memory of a memory system. In various aspects, the software tier manager 802 can expose any suitable portion or number of the DRAM DIMMs 134 through 134-n as a respective tier of far memory 816 of CXL-coupled memory to the processor 116-1 and / or processor 116-2. In this example, assume the software tier manager 802 manager exposes each set of DRAM DIMMs 134-1, 134-2, through 134-n as separate tiers of far memory 816-1, 816-2, through 816-n with different levels of performance, where the first tier of far memory 816-1 has the highest level of performance (e.g., lowest access latency) and the last tier of far memory 816-n has the lowest level of performance (e.g., highest access latency). As respective applications or workloads execute on the processor 116-1 or processor 116-2, an OS or kernel of each processor may allocate memory pages across both tiers of near memory 808-1, 808-2 and respective tiers of far memory 816-1, 816-2, through 816-n.

[0074] In aspects, the metric trackers 126-1, 126-2, through 126-n may be configured with one or more counters to track access metrics for respective address ranges (e.g., memory pages, blocks of compressed data) in the respective tiers of far memory 816-1, 816-2, through 816-n used by the processor 116-1 and / or the processor 116-2. Based on the access metrics (e.g., tracker data 130) collected by each metric tracker, the metric trackers 126-1, 126-2, through 126-n can compute respective temperature values or rankings for address ranges of their tier of the far memory 816. For example, the metric trackers 126-1, 126-2, through 126-n can generate respective lists of memory pages, cache lines, or block areas ranked by access activity (temperature) for each tier of far memory and expose lists 818-1, 818-2, through 818-n of hot memory pages or cache lines to the software tier manager 802 of the processor 116-1 and processor 116-2. Alternatively or additionally, the metric trackers 126-1, 126-2, through 126-n may expose or send any of the tracker data 130 to the software tier manager 802. Based on the lists of hot memory pages or cache lines (or other metrics), the software tier manager 802 can preemptively move hot memory pages (e.g., hot memory page 820) or cache line from a lower performance tier of far memory (e.g., far memory tier 816-n) to a higher performance tier of far memory (e.g., far memory tier 816-2). The software tier manager 802 may also move cold pages (e.g., cold memory page 822) from a higher performance tier of far memory (e.g., far memory tier 816-2) to a lower performance tier of far memory (e.g., far memory tier 816-n) to free up space for migrating other hot memory pages from the lower performance far memory tiers.

[0075] FIGS. 9-13 depict various techniques of metric tracking for tiered memory which are described with reference to methods 900 through 1400. These techniques may be implemented using any of the environments and entities described herein, such as the memory tier manager 120, memory controller 124, metric tracker 126, tracker parameters 128, tracker data 130, page optimizer 310, debug and trace functions 312, and / or predictive algorithms 314. The techniques include various methods depicted in FIGS. 9-14, which include operations that may be performed by one or more entities of a memory system. In some implementations, these entities and associated structure described herein provide means for implementing the operations of one or more of the methods 900 through 1400. In some aspects, the entities or actors described herein, such as the memory tier manager 120 or metric tracker 126, may be implemented by a processor of a memory controller configured to execute instructions or code stored in a hardware-based memory to implement the corresponding function(s) performed by the actor. The example methods 900 through 1400 are depicted as sets of operations (or acts) performed but not necessarily limited to the order or combinations in which the operations are shown herein. Further, any of the operations may be repeated, combined, omitted, reorganized, or linked to implement a wide array of methods in accordance with aspects described herein. In portions of the following discussion, reference may be made to the operating environment 100 of FIG. 1, various entities, configurations, or components of FIGS. 2-8, or the integrated circuit of FIG. 15, reference to which is made by way of example only. The described techniques are not limited to performance by one entity or multiple entities operating on one device and may be implemented by shared or distributed components or functions.

[0076] FIG. 9 depicts an example method 900 for tracking a metric based on an address range of a memory accessed by a host. In some aspects, the operations of the method 900 are performed by or with a metric tracker of a memory controller. The metric tracker can be implemented as a module or widget of the memory controller (e.g., CXL-enabled memory controller) with multiple counters for tracking access of a memory over respective address ranges (e.g., logical address ranges or physical address ranges). In some implementations, the metric tracker may be configured to access metrics of data access of a compressed address space, such as when a memory controller implements data compression to store host data in a non-native memory or far tier.

[0077] At 902, a memory controller receives, via a host interconnect (e.g., CXL interconnect), a memory command from a host for access to a memory coupled to the memory controller via a memory interconnect. The host or a processor of the host may include a first memory configured as a first memory tier of a host physical address (HPA) range and the memory coupled to the memory controller may be implemented as a second memory configured as a second memory tier of the HPA range. In some cases, a device physical address (DPA) range of the memory coupled to the memory controller is mapped, as part of an interleave set, to a portion of a HPA range of the host or processor. Alternatively or additionally, the memory controller may be configured to implement data storage through a compressed address space for smaller blocks compressed data. Thus, the memory controller may implement address translation from the host address range to the compressed address range of the blocks of compressed data. The memory interconnect between the memory controller and the memory may be configured to operate in compliance with a DDR memory protocol or standard. The memory command may include any suitable type of command that specifies access or activity for at least one address of the memory. For example, the memory command (e.g., CXL.mem command) may include a write command, store command, read command, or load command for data at one or more addresses within the memory.

[0078] At 904, an address of the memory command is compared to one or more address ranges of the memory that the metric tracker is configured to monitor. The metric tracker may be configured to implement multiple counters for tracking access to respective address ranges of the memory. The counters may be configured to track different types of access, such as read access, write access, or both read / write access. For example, the counters of the metric tracker may be configured to track respective access statistics or temperature values for regions, pages, cache lines, or block areas of the memory. In some implementations, memory controller or metric tracker translates an HPA of the memory command to a DPA of the memory and compares the DPA of the access command to respective address ranges of the counters of the metric tracker. Alternatively, the metric tracker may monitor or track access activity to the address range (e.g., physical address range), such as by monitoring activation of row or column addresses of a memory page.

[0079] At 906, a value of the metric tracker is altered in response to the address of the memory command matching or falling within the address range of the metric tracker. For example, based on a type of access to the memory address range, a read counter, a write counter, or a read / write counter of the metric tracker may be updated to reflect the type of access made by the host. Alternatively or additionally, a counter value for a row hit, page miss, or refresh may be updated to reflect activity related to access of a physical memory address range. The value of the metric tracker counters may be stored in a register of the metric tracker or memory controller. In some implementations, registers of the metric tracker are accessible by host through the use of CXL.io commands. Thus, the host (e.g., host tier manager) may configure the counters of the metric tracker and / or access data or statistics generated by the counter of the metric tracker.

[0080] At 908, the memory controller reports, via the CXL interconnect, the value of the metric tracker for the memory to the host. The memory controller or metric tracker may report the value of the counter through a register of the metric tracker that are exposed to the host. Alternatively or additionally, the memory controller or metric tracker may receive, via the CXL interconnect, a request (e.g., a CXL.io flit) from the host to report the value of the metric tracker. The metric tracker may report the value of the metric tracker or the counter in response to the request received from the host. Based on the value of the metric tracker, the host may initiate a move of data from the memory coupled to the memory controller to a native memory of the host. For example, the host may move a memory page from a tier of CXL-coupled memory (far memory tier) to a tier of native host memory to decrease access latency. Alternatively or additionally, the metric tracker may compare the value of its counter to a threshold configured to initiate data movement from the second memory tier to the first memory tier. Based on the value of the metric tracker exceeding the threshold, the metric tracker can indicate, to the host, a request to move data from the address range of the tracker to the first memory tier. In yet other aspects, a memory controller or host may reallocate physical addresses of the memory based on the value of the metric tracker counter to optimize memory performance.

[0081] FIG. 10 depicts an example method 1000 for tracking respective temperatures of address ranges within a non-native memory. In some aspects, the operations of the method 1000 are performed by or with a metric tracker of a memory controller. The metric tracker can be implemented as a module or widget of the memory controller (e.g., CXL memory controller) with multiple counters for tracking access metrics over respective address ranges of non-native memory. In some implementations, the metric tracker may be configured to access metrics of data access of a compressed address space, such as when a memory controller implements data compression to store host data in a non-native memory or far tier.

[0082] At 1002, a metric tracker is configured to monitor multiple address ranges of a memory tier of non-native host memory. The metric tracker may implement or include multiple counters that are configurable to track specified access metrics across respective address ranges assigned to the counters. For example, the counters of the metric tracker can be configured to monitor read access, write access, or combined read and write access to the respective address ranges in the non-native memory. The address ranges may be configured to monitor any suitable size of memory area, including an entire memory area, a fraction of memory area, memory pages, memory cache lines, blocks (e.g., compressed address space), block areas, block ranges, and so forth. The non-native memory may include memory coupled to a memory controller that communicates with the host over a CXL interface or interconnect. In aspects, the non-native memory may be configured as one or more tiers of far memory accessible by the host, and the host, or processors thereof, may be directly coupled to native memory configured as a tier of near or local memory.

[0083] At 1004, the metric tracker updates corresponding metric values of the multiple address ranges in response to access of the address ranges by a host. The metric tracker may alter or update count values that correspond to each time the host or processor accesses one of the address ranges. When a metric tracker implements counters for the address ranges, a count value of a counter may be updated or altered responsive to access to the address range with which the counter corresponds. In some cases, two or more counters may cover or overlap a same address range, such as when a first counter is configured to track read operations from an address range and a second counter is configured to track write operations to the address range.

[0084] At 1006, the metric tracker determines respective temperature values for the multiple address ranges of the memory tier based on the corresponding metric values of the address ranges. The metric tracker may compute or generate a temperature value for an address range based on one or more metric values, which may include a number of accesses in the address range, a rate of accesses in the address range, a frequency of access in the address range, page hits in the address range, or the like. Alternatively or additionally, the computation or determination of a temperature value for an address range may be filtered to include only read access, only write access, or combined read and write access. The temperature values may be numerical values and / or classified into predefined temperature ranges or ratings for the memory areas (e.g., hot, warm, lukewarm, cold, or other predefined ranges of a histogram plot).

[0085] At 1008, the metric tracker ranks the multiple address ranges based on the respective temperature values to provide a temperature-ranked list of the multiple address ranges. The metric tracker may be configured to rank a predefined number of address ranges, which may include a number of the hottest memory areas (e.g., memory pages, cache lines, block areas) for which metrics are tracked. For example, the metric tracker may be configured to identify and rank the hottest 16 address ranges within a tier of non-native memory. From operation 1008, the method 1000 may proceed to operation 1010 to provide the temperature-ranked list to the host or to operation 1012 to initiate data movement based on the temperature-ranked list.

[0086] Optionally at 1010, the metric tracker provides the temperature-ranked list of the address ranges to the host. The metric tracker may provide the temperature-ranked list to the host or a memory tier manager by storing the temperature-ranked list (e.g., tracker data) in one or more registers and exposing those registers to the host. In some cases, the host or memory tier managers sends a request (CXL request) to the metric tracker for the temperature-ranked list and the metric tracker communicates the temperature-ranked list as a response (CXL response) to the request. Optionally at 1012, the metric tracker requests that the host move data of an address range based on the ranked temperature list. For example, the metric tracker may be configured to send, based on the temperature-ranked list, address ranges for migration from the non-native memory to a native memory of the host. In some implementations, the metric tracker is configured to initiate or trigger movements of hot data from the non-native memory at predefined intervals of time or responsive to host access activity (e.g., access frequency, access rate, bandwidth limit) that exceeds an access threshold of an address range.

[0087] At 1014, the memory controller moves data from one of the address ranges in the memory tier to native host memory. The memory controller of the non-native memory may implement the data movement in response to a command received from the host or a memory controller of the processor. In some cases, the memory tier manager moves, based on the temperature-ranked list of address ranges, the data of the address range (e.g., memory page) from the non-native memory to a native memory of the host. Alternatively, the memory tier manager of the host may implement the movement of the data in response to a request issued by the metric tracker to move the data from the tier of non-native memory to the tier of native host memory.

[0088] At 1016, the temperature-ranked list is updated to reflect the removal of one of the address ranges. The temperature-ranked list may be updated in host memory and / or registers of the metric tracker on the memory controller for the non-native memory. For example, the memory tier manager of the host may update a local instance of the temperature-ranked list in response to moving the data of the address range (e.g., memory page) from the tier of non-native memory (far memory tier) to the native memory (e.g., near memory tier) of the host. Alternatively or additionally, the metric tracker may update registers storing the temperature-ranked list in response to requesting that the host move the data of one of the address ranges or in response to the memory controller processing a memory command to move the data from the non-native memory to the native memory of the host. From operation 1016, the method 1000 may return to any preceding operation (e.g., operation 1004, operation 1008) to implement subsequent iterations of the method to move data from the non-native memory to the native memory of the host.

[0089] FIG. 11-1 depicts an example method 1100 for implementing a hierarchical search of non-native memory to identify memory areas for migration to another memory. In some aspects, a metric tracker can be implemented to support flexible hot page tracking to enable a host memory tier manager to move the hot pages from a non-native memory to local host memory. For example, a metric tracker may be implemented as widgets or functions of a memory controller for a given memory region and configured to track CXL.mem reads and writes while ignoring other types of memory access. In some implementations, the metric tracker may be configured to access metrics of data access of a compressed address space, such as when a memory controller implements data compression to store host data in a non-native memory or far tier. In some aspects, two widgets or functions of a memory region are provided to support port separation (e.g., two CXL links) or to concurrently track both read and write accesses to the memory region.

[0090] At 1102, a metric tracker of a non-native memory (e.g., far memory tier) is configured to monitor a first set of address ranges having a first size or granularity. The metric tracker may include any suitable number of counters that are configurable to monitor or track access metrics for respective address ranges. In some cases, first set of address ranges for the counters of the metric tracker are configured to monitor an entire memory area or a fraction of the memory area to initially identify hot memory regions. By way of example, consider a metric tracker implemented with four widgets, two widgets per memory area (e.g., a DRAM module). A widget may include 64 counters, each with 32-bit width and configurable to implement DPA-based tracking of access metrics for a two terabyte (2 TB) memory. As such, the metric tracker can configure a block size and base address of a counter, as well as a counting interval, and whether to track reads or writes in the assigned memory range or block. Generally, a configurable block size of the widget or corresponding counters allows the metric tracker to first identify hotness on larger address segments during a set monitoring interval and then reprogram the widget to identify the hotness on a smaller page or block size within the address segment. In the context of the example 2 TB memory, the metric tracker may include a set of registers for a widget through which counters of the widget can be configured. This may allow each widget to track different ports or concurrently track read and write access within the memory area. The set of registers may include a tracking address mask register, a tracking address match register, a granularity offset register, a tracking enable register, a port number register, a read or write tracking register, and a tracking timer register.

[0091] As described with reference to FIG. 3-2, the widget may use address masking and matching to identify the blocks or segments to be monitored. For example, the counters of the widget or metric tracker may track metrics using mask and match calculations as shown in Equation 1 in which a tracking value can be counted in response to an address match.

[0092] Equation⁢ 1 Counter⁢ address⁢ mask⁢ and⁢ matchingTrack_vld=((dpa && address_mask)==address_match)

[0093] Further, the counter address may be derived from the granularity offset value of the configuration registers as shown in Equation 2 in which the counter address is calculated based on the device physical address of the memory region and the granularity offset.

[0094] Equation⁢ 2 Counter⁢ address⁢ granularity⁢ offsetCounter_address [5:0]=dpa[cfg_granularity⁢_offset+5:cfg_granularity⁢_offset]

[0095] FIG. 11-2 illustrates at 1101 an example in which counters of a widget are configured to monitor a first set of address ranges having a first size. The example at 1101 shows an addressing configuration for counters of the widget in which a granularity offset can be used to position the addresses of the 64 counters relative the tracked memory addresses and the mask and match settings are used to filter the physical addresses of memory device access. In the context of an example widget configured to implement DPA-based tracking of access metrics for the 2 TB memory, the counters of the widget can be configured with the mask, match, and granularity offset (e.g., 35, where 235 sets the counters for 32 GB memory areas) values shown at 1101 to monitor or track 64×32 GB segments of the 2 TB memory. In this example configuration, no base address is used as the entire memory capacity is monitored and bits [40:35] are used as the counter address 1103.

[0096] At 1104, the metric tracker monitors, for a first duration of time, respective temperature values of the first set of address ranges (e.g., 32 GB areas or sections of memory). The counters of the metric tracker may monitor respective address ranges based on a timing value set for the counters. Alternatively, the counters may free run until the metric tracker or memory tier manager of the host reads count values from the counters. Continuing the ongoing example, the 64 counters of the widget monitor respective address ranges for the 32 GB segments of the 2 TB memory. Assume the widget is set to monitor read operations and that each read operation by the host into the respective 32 GB address range of one of the counters is tracked in a 32-bit count value register of the counter.

[0097] At 1106, the metric tracker selects one of address ranges from the first set to monitor based the respective temperature values of the first set of address ranges. For example, the predictive algorithms of the metric tracker may implement a hierarchical search for hot memory pages, hot cache lines, or hot block areas (e.g., a range of blocks in compressed address space), in which address ranges of subsequent iterations of monitoring are reduced to identify or isolate the hottest memory page in a memory. In aspects, the metric tracker may calculate temperature values of the first set of address ranges or memory segments and rank the address ranges or memory segments based on the temperature values. The metric tracker may then select a memory range or memory segment based on temperature value to monitor during a subsequent iteration of metric tracking. In the context of the present example, assume the predictive algorithms of the metric tracker select, based on counter data for the entire 2 TB memory area, two 32 GB segments within the memory for subsequent monitoring.

[0098] At 1108, the metric tracker of the memory tier is configured to monitor, within the selected address range, a second set of address ranges having a second size. The metric tracker may configure counters to monitor a set of larger memory segments or a set of smaller memory segments. In some implementations, the metric tracker or predictive algorithms of the metric tracker may implement a hierarchical search for hot memory pages, hot cache lines, or hot blocks, and may select a smaller set of memory segments within an identified hot memory area for monitoring. As described with reference to operation 1104, the metric tracker can configure a block size and base address of a counter, as well as a counting interval, and / or other settings of the counters. Alternatively or additionally, the memory tier manager of the host may configure the metric tracker or coordinate configuration of the counters with the metric tracker, such as part of a hierarchical search for hot memory pages.

[0099] Continuing the example illustrated in FIG. 11-2, at 1105, the metric tracker may configure the counters to monitor or track, based on a temperature-ranked list of hot memory areas, 64×1 GB memory segments from a base address of 0×150_0000_0000. To do so, the counters of the widget can be configured with the mask, match, and granularity offset values (e.g., 30, where 230 sets the counters for 1 GB memory areas) shown at 1105 to monitor or track 64×1 GB segments from the base address. In this example configuration, metric tracking is enabled for DPA that match base address 1107 [40:36] of 0×15 and [35:30] are used as the counter address 1109.

[0100] At 1110, the metric tracker monitors, for a second duration of time, respective temperature values of the second set of address ranges. The counters of the metric tracker may monitor respective address ranges based on a timing value set for the counters. The second duration of time may be different from the first duration of time, such that the metric tracker or predictive algorithms of the metric tracker may adaptively adjust tracking parameters. In some cases, the tracking parameters are adjusted to narrow a scope of the hierarchical search for hot memory locations smaller memory segments. Alternatively, the counters may free run until the metric tracker or memory tier manager of the host reads count values from the counters for the second set of address ranges. The metric tracker may store tracker data from each iteration of monitoring over respective memory address ranges, and may provide one iteration of data, multiple iterations of data, or all iterations of data to the host, such as when requested by the host. Continuing the ongoing example, the 64 counters of the widget monitor respective address ranges for the 64×1 GB segments of the memory. Assume the widget is set to monitor read operations and that each read operation by the host into the respective 1 GB address range of one of the counters is tracked in a 32-bit count value register of the counter. From operation 1110, the method 1100 may return to operation 1106 to select one of the second address ranges to monitor based on respective temperature values of the second set of address ranges. Thus, the metric tracker may implement any suitable number of iterations as part of the hierarchical search for hot memory segments (e.g., memory pages, cache lines, block areas). In some implementations, the metric tracker performs multiple cycles of iteration to reach a level of granularity desired (e.g., page-level, cache line-level, block-level) to initiate a move operation.

[0101] At 1112, the metric tracker selects one of address ranges from the second set for migration based the respective temperature values of the second set of address ranges. In the context of a hierarchical search for hot memory pages, hot cache lines, or hot blocks, the metric tracker or memory tier manager of the host may select, based on a temperature-ranked page list, a hot memory page for migration from the non-native memory to a native memory or near memory tier of the host. In aspects, the metric tracker may calculate temperature values of the second set of address ranges or memory segments and rank the address ranges or memory segments based on the temperature values. The metric tracker may then select the hottest memory range or memory segment for migration to the local host memory. In the context of the present example, assume the metric tracker selects the hottest 1 GB memory page or segment of the 2 TB memory for migration to the near memory tier of host memory.

[0102] At 1114, the metric tracker initiates a request to a memory tier manager to move data of the selected address range to a native memory tier. Alternatively, the metric tracker may initiate a request to a memory controller of far memory when migrating data between tiers of far memory. In some implementations, the metric tracker may be configured to send, based on a temperature-ranked list of memory pages, an address of the hottest memory page in the non-native memory. The metric tracker may be configured to initiate or trigger movements of hot data from the non-native memory at predefined intervals of time or responsive to host access activity (e.g., access frequency, access rate, bandwidth limit) exceeding an access threshold of an address range. Concluding the present example, the metric tracker sends a request to the memory tier manager of the host to move the 1 GB memory segment from the non-native memory (e.g., far memory tier) to the native memory of the host (e.g., near memory tier).

[0103] FIG. 12 depicts an example method 1200 for monitoring access of a memory by multiple processors on a per port basis. In some aspects, the operations of the method 1300 may be implemented by or with the debug and trace functions of a metric tracker, which may be used to detect access security violations. In some implementations, the metric tracker may be configured to monitor access of a compressed address space, such as when a memory controller implements data compression to store host data in a non-native memory or far tier. The metric tracker may also monitor access to the memory by multiple virtual machines (VMs) executing on one or more of the multiple processors, which may include multiple VMs executing on one host or VMs executing on respective hosts.

[0104] At 1202, a memory tier manager assigns a first address range of a non-native memory via a first port to a first processor or VM of a host. The first processor or VM of the host may be configured with a tier of native memory (e.g., near memory tier) and the first address range may be assigned within a second memory tier of the non-native memory, such as a far memory tier implemented in CXL-coupled memory. The first port assigned to the first processor or first VM may include a first CXL port of a memory controller that is mapped to the first address range in memory coupled to the controller via a memory interconnect.

[0105] At 1204, the memory tier manager assigns a second address range of the non-native memory via a second port to a second processor or VM of the host. The second processor of the host may be configured with a tier of native memory and the second address range may be assigned within a second memory tier of the non-native memory, such as another far memory tier implemented in CXL-coupled memory. The second port assigned to the second processor or second VM may include a second CXL port of the memory controller that is mapped to a second address range in memory coupled to the controller via the memory interconnect.

[0106] At 1206, a metric tracker of the memory tier is configured to monitor host access of the first address range and / or the second address range on a per port basis. In various implementations, the metric tracker or counters of the metric tracker can be configured to monitor or track host access of at least one of the first address range or the second address range of the non-native memory. In the context of the method 1200, the metric tracker or a counter is configured to monitor access of the first address range that is assigned to the first processor of the host and verify that an originating port associated with access of the first address ranges matches the port assigned to the address range. The metric tracker or counter may also be configured to track metrics related to port access violations, such that the metric tracker updates the count value of the counter to reflect the number of port violations. Further, a threshold of the metric tracker may be configured to report the port violations to the host, indicate an alarm of port violations, or trigger a shutdown of the port in response to the number of port violations exceeding the threshold set for port access. The metric tracker or another counter may also be configured to monitor access of the second address range that is assigned to the second processor of the host and verify that an originating port associated with access of the second address ranges matches the port assigned to the address range. The metric tracker or other counter may also be configured similar to the first counter, which may include tracking a number of port violations, as well as to initiate a report, alarm, and / or shutdown of the port in response to the number of port violations exceeding a predefined threshold (e.g., a user-defined threshold, default threshold).

[0107] At 1208, the memory controller of the non-native memory receives a memory access command from the host or a VM to access the first address range or the second address range of the memory tier. For example, the memory controller may receive a read or load command from the first processor or first VM of the host to read or load data from an address in the second address range of non-native memory assigned to the second processor. Alternatively or additionally, the memory controller may receive a write or store command from the second processor or second VM of the host to write or store data to an address of non-native memory assigned to the first processor.

[0108] At 1210, the metric tracker compares the originating port of the memory access command with the port of the processor to which the address range is assigned. The metric tracker may compare metadata (e.g., CXL port or decoder number) or a decode range of the memory access command with the port assigned to the memory address that the processor is attempting to access. Responsive to the originating port of the memory access command matching the port to which the address range is assigned, the metric tracker may allow the memory controller to process the command.

[0109] At 1212, the metric tracker indicates a port access violation in response to the originating port not matching the port of the processor to which the address range is assigned. The metric tracker or corresponding counter may update the counter value of the port to reflect the port violation. For example, the metric tracker may update the counter assigned to the port and report a port access violation to the memory tier manager of the host in response to determining that a processor is attempting to access a memory range that is not assigned to that processor. In some cases, the report may be useful to troubleshoot an addressing or access issue associated with software or VM executing on the processor linked to the port access violation. Alternatively or additionally, the metric tracker may prevent or block execution of the memory access command of the processor in response to detecting the port access violation. Based on a threshold set for the counter, the metric tracker or counter may also report the port violation to the host, initiate a port access violation alarm, and / or shut down the port through which the unauthorized access is attempted.

[0110] FIG. 13 depicts an example method 1300 for verifying metadata of memory access commands with metadata criteria of an address range within a memory tier. In some aspects, the operations of the method 1300 may be implemented by or with the debug and trace functions of a metric tracker, which may be used to debug host software or VMs. In some implementations, the metric tracker may be configured to verify access of a compressed address space, such as when a memory controller implements data compression to store host data in a non-native memory or far tier. The operations of the method 1300 may detect and / or flag an untrusted port or link attempting to access memory of a secure VM, resulting in a report or alarm of a violation of a trusted boundary.

[0111] At 1302, a memory tier manager allocates an address range of a non-native memory. The memory tier manager may allocate, to a processor of a host, an address range in non-native memory managed by a memory controller coupled to the host via a CXL interconnect. In some cases, the memory tier manager configures the non-native memory as a far memory tier of the processor and assigns the address range within the far memory tier. The processor of the host may be configured to operate in compliance with a trusted-execution-environment security protocol (TSP) to implement integrity and data encryption (IDE) of data stored to the non-native memory.

[0112] At 1304, metadata criteria are set for accessing data stored within the address range. An application executing on the processor of the host may include metadata with data stored to the non-native memory of the processor. For example, a TSP-enabled application executing on the processor or a TSP-enabled security module of the host may set metadata criteria (e.g., trusted-execution-environment (TEE) bits or encryption keys) for data stored by the application or other workloads executing on the processor. At 1306, a metric tracker or counter of the metric tracker is configured to monitor metadata associated with data access commands for the address range (e.g., memory area assigned to a secure VM). In aspects, the memory tier manager or other software of the host may configure the metric tracker of the memory controller with metadata criteria to monitor for the address range. Counters of the metric tracker may be configured to monitor respective metadata criteria for multiple address ranges within the memory coupled to the memory controller. In some implementations, the metadata tracker is configured to monitor and verify TEE bits or keys of data stored to the non-native memory or far memory tier. In some aspects, one or more of the counters are configured to detect and / or flag attempted access by an untrusted port or untrusted link to the memory area of a secure VM or application. The counter may maintain a count value indicating a number of attempted unauthorized accesses, and may be configured to shutdown the port or link in response to the number of unauthorized access attempts exceeding a configurable threshold of the counter. The configurable threshold of the counter may be set by default, using a user-defined value, or programmed by a VM or application executing on the host (e.g., memory tier manager of the host).

[0113] At 1308, the memory controller of the non-native memory receives a data access request from the host to access the address range. The data access request may include a read command or a write command from the processor for access to the address range for which metadata criteria have been set. For example, the memory controller may receive a request from the processor to read data from an address range for which encryption or TEE bit criteria have been set. At 1310, the metric tracker verifies that metadata of the data access command matches the metadata criteria set for the data stored within the address range. In some cases, the metric tracker verifies that that the data access command includes security-related metadata, such as encryption flags or encryption keys, that match or align with the metadata criteria set for the address range. For example, the metric tracker may use an encryption engine of the memory controller to verify that an encryption key of the data access command matches an encryption key set for the address range or data storage within the address range.

[0114] Optionally at 1312, the metric tracker can prevent execution of the data access command in response to a failure to verify the metadata of the data access command. When the metric tracker fails to verify the metadata of the data access command, the metric tracker may interrupt execution of the command and / or alert the memory controller of the non-native memory. The counter of the metric tracker may also be updated to reflect the attempt of unauthorized access of the address range of the memory. In response to the number of unauthorized access attempts exceeding the threshold of the counter, the counter or metric tracker may shut down the port or link from which the attempts of unauthorized access originate.

[0115] At 1314, the metric tracker reports the failure to verify the metadata of the data access command to the host. The metric tracker may initiate the report of unauthorized access in response to the threshold of the counter being exceeded for a number of attempted port violations. In some cases, reporting the failure to verify the metadata of the command may be useful to debug software or VM of the host. For example, a VM of the host may be attempting to initiate unauthorized access to an IDE protected area without the requisite TEE bits and host software may use the reported verification failure to limit access of the VM until a root cause of the unauthorized access is identified.

[0116] FIG. 14 depicts an example method 1400 for moving data between memory tiers based on metrics provided by a metric tracker of a memory tier. The operations of the method 1400 may be implemented by a host memory tier manager implemented in software, firmware, and / or hardware. In some cases, host processor hardware implements the memory tier manager, which may operate transparently without involvement or interaction with an OS of the host.

[0117] At 1402, a memory tier manager of a host identifies native memory and non-native memory of a computing system. For example, a host basic input-output system (BIOS) may identify native host memory and CXL-coupled memory during boot of the host. The BIOS or memory tier manager can then allocate respective address spaces to the native memory and CXL-coupled memory (CXL memory) through a host or system address space.

[0118] At 1404, the memory tier manager exposes the native memory through a first address range as a first memory tier and at 1406, the memory tier manager exposes the non-native memory through a second address range as a second memory tier. For example, the memory tier manager of the host can expose the native memory (e.g., per CPU or processor socket) and the CXL memory as separate nonuniform memory access (NUMA) nodes. One or more of the CXL memories can be grouped together as one address range and memory can be interleaved across the CXL memory. The native memory of the processors can be configured as a near memory tier and the CXL memory can be configured as a far memory tier. Alternatively or additionally, the memory tier manager may expose or form multiple tiers of far memory, such as multiple far memories coupled to a host via a CXL switch described with reference to FIG. 8.

[0119] At 1408, software of the host allocates memory pages across at least the first memory tier and the second memory tier. In some cases, the software of the host allocates memory pages across multiple tiers of far memory. For example, a software (e.g., OS, kernel) of the host may begin memory pages to a processor or application starting with the near memory tier. In response to reaching a configurable threshold of available space in the near memory, the software may allocate memory pages to one or more tiers of far memory, such as those coupled to the host by CXL memory controller or a CXL switch. The memory tier manager of the host may track access metrics for native host memory. For example, the software of the host can generate or maintain a least recently used (LRU) list of memory pages in the near memory tier.

[0120] At 1410, the memory tier manager receives, from a metric tracker of at least the second memory tier, metrics indicative of access on a per address range basis within the second memory tier. In some implementations, the memory tier manager receives respective access metrics from respective metric trackers of multiple tiers of far memory. The metrics may include counter values for the access per address range, temperature ratings of the address ranges, a list of memory areas (e.g., pages, cache lines, block sequences) ranked by temperature (e.g., hottest memory page list), or the like. In some implementations, the memory tier manager accesses registers of the metric tracker or memory controller to retrieve the metrics or temperature rankings calculated by the metric tracker. Alternatively or additionally, the memory tier manager may issue a command to the metric track requesting that the metric tracker report the metrics to the memory tier manager and the memory tier manager may receive the metrics in response to the command.

[0121] At 1412, the host moves a memory page from the second memory tier to the first memory tier based on the metrics received from the metric tracker of the second memory tier. The host or page policy of the host may also use one or more metrics or combination thereof to determine when to move the move memory pages to the near memory tier to a far memory tier. For example, the host page policy may be configured to use a frequency of access of the memory page (or address range) over a given period of time, a temperature ranking of the memory page, whether an allocated bandwidth (read, write, both read / write) of the memory page exceeds a threshold on a per device, per channel, or per sub-channel basis, and / or the page policy may move multiple pages that are logically adjacent. Alternatively or additionally, the page policy can be configured to demote memory pages from the near memory tier to one of the far memory tiers based on the LRU list or other access statistics maintained for the native memory of the host. The demotion of memory pages may be implemented as an active demotion of memory pages from the near memory tier to the far memory tier up to a configurable threshold of memory capacity. In other cases, the host may set up or configure a direct memory access transfer to have the memory controller move data over one or more interconnects (e.g., PCIe). For example, the host or page policy may initiate a DMA transfer to move a hot page from a lower performance tier of far memory to a higher performance tier of far memory or move a cold page from a higher performance tier far memory to a lower performance tier of far memory. From operation 1412, the method 1400 may return to operation 1410 to receive additional metrics from the metric tracker for subsequent moves of data from the near memory tier to the far memory tier.

[0122] At 1414, the memory tier manager updates the metrics based on the movement of the memory page from the second memory tier to the first memory tier. The metrics corresponding to the memory page moved to the first (near) memory tier may be removed as that memory page will no longer be accessed from the second (far) memory tier. The metrics or a list of page temperature rankings may be updated by the memory tier manager or by the metric tracker, such as after a duration of time has lapsed or if a length limit of the list is exceeded (e.g., 10 hottest pages kept). Alternatively or additionally, the memory tier manager may remove demoted memory pages the LRU list maintained for native memory to reflect the demotion of memory pages to the far memory tier. From operation 1414, the method 1400 may return to operation 1410 to receive additional metrics from the metric tracker(s) for subsequent moves of data from the near memory tier to the far memory tier.

[0123] FIG. 15 illustrates an example integrated circuit (IC) 1500 environment in which aspects of metric tracking for tiered memory can be implemented. The IC 1500 may be implemented in any suitable system or device, such as a memory-based peripheral card, a memory system, a memory expansion system, a memory pooling system, or a memory accelerator. Although described with reference to an IC, the entities of FIG. 15 may also be implemented as other types of embedded systems or integrated circuits, such as an application-specific integrated-circuit (ASIC), system-on-chip (SoC), a memory controller, a storage controller, a communication controller, a digital signal processor (DSP), a programmable SoC (PSoC), a system-in-package (SiP), or a field-programmable gate array (FPGA).

[0124] The IC 1500 may be integrated with electronic circuitry, a microprocessor, memory, input-output (I / O) control logic, media interface, host interface, firmware, and / or software useful to provide functionalities of a computing device, a host system, a memory system, or a storage system, such as any of the devices or components described herein (e.g., memory controller, memory accelerator, CXL cache controller). The IC 1500 may also include a data bus (e.g., cross bar or interconnect fabric) that couples the various components of the IC for control signaling, data communication, and / or routing data between the components. The data bus or components of the IC 1500 may be exposed or accessed through an external port, which may include a data interface, a fabric-based interface, a peripheral component interface (e.g., PCIe-based interface), or any other suitable data interface.

[0125] In this example, the IC 1500 includes a hardware-based processing unit (e.g., processor core) and a hardware-based memory 1504. The processor processing unit 1502 may be configured as any suitable type of processer, such as an application processor or multi-core processor. The memory 1504 may include any suitable type of memory, such as volatile memory (e.g., DRAM), non-volatile memory (e.g., Flash), and the like. The memory 1504 or other storage media of the IC 1500 are implemented as a processor-accessible storage medium, and thus do not include transitory propagating signals or carrier waves. Generally, the memory 1504 can store data and processor-executable instructions of IC 1500, such as an operating system, firmware 1506, boot code, or applications. The processing unit 1502 can execute an operating system, firmware 1506, or applications from the memory 1504 to implement functions of the IC 1500 or functions of a system or device in which the IC 1500 is embodied. In some aspects, the processing unit 1502 and code stored on the memory 1504 are implemented as a memory controller, cache controller, or memory accelerator to provide various functionalities associated with metric tracking for tiered memory.

[0126] The IC 1500 may also include I / O circuitry 1508, which can be configured to provide a variety of I / O logic, ports, or data interfaces for inter-chip or off-chip communication. These data interfaces may include any suitable type of interface, such as an interface to a host device or other peripherals components. In this example, the IC 1500 includes a host interface 1510 configured to enable communication with a host system and a memory interface 1512 configured to enable transfers with a memory device or module. As described herein, the host interface 1510 may be configured for communication over as any suitable host interconnect, such as a PCIe interface over which the IC 1500 communicates using a CXL protocol. Alternatively or additionally, the memory interface can be configured to operate in compliance with a DDR memory protocol for data transfers between the IC 1500 and the memory device.

[0127] In aspects, the IC 1500 includes a metric tracker 126, tracker parameters 128, tracker data 130, page optimizer 310, debug and trace functions 312, and predictive algorithms 314, which may be implemented separately or combined with a memory controller, a host interface, or a memory interface. In accordance with various aspects of metric tracking for tiered memory, the metric tracker 126 may monitor reads or writes of data by a host device 110 to various address ranges of memory (e.g., uncompressed memory space, compressed memory space), which may correspond with pages, cache lines, or blocks in a tier of non-native memory (e.g., far memory). The metric tracker 126 may aggregate the access statistics to determine respective temperature values for the address ranges, indicative of hot pages or cold pages, cache lines, or blocks of the memory. Based on the respective temperatures, the metric tracker 126 can rank the address ranges (e.g., pages, cache lines, block areas) within the memory tier and the memory controller can expose these temperature rankings (e.g., hot to cold) a memory tier manager 120 or a memory controller of the host device. The memory tier manager 120 or page policy of the memory controller may then move data from a particular address range (e.g., hot pages, hot block areas) to a tier of near memory of the host device to reduce access latency and improve host processor performance. Alternatively or additionally, the metric tracker may initiate movement of data from the tier of far memory to the tier of near memory based on the tracker data or access statistics.

[0128] Any of the entities of the IC 1500 can be embodied as separate or combined components, as described with reference to various aspects presented herein. For example, the metric tracker 126 may be implemented as part of a memory controller or compression engine, or other memory system component. Examples of these components and / or entities, or of corresponding functionality, are described with reference to the respective components or entities of the operating environment 100, example configurations of computing systems 200, example memory system 300, example memory architectures 400 through 800, and / or the methods 900 through 1400. The metric tracker 126 or components thereof, either in whole or in part, may be implemented as processor-executable instructions maintained by the memory 1504 and executed by the processing unit 1502 to implement various aspects and / or features of metric tracking for tiered memory. Alternatively or additionally, the metric tracker 126, tracker parameters 128, tracker data 130, page optimizer 310, debug and trace functions 312, predictive algorithms 314, and / or other components of the IC 1500 may be implemented as hardware, firmware, fixed logic circuitry, or any combination thereof.

[0129] Although aspects of metric tracking for tiered memory are disclosed in the context of language specific to certain features and / or operations, the subject matter recited by the appended claims is not necessarily limited to the specific features, operations, or method flows described herein. Rather, the features and operations described throughout the disclosure provide a variety of examples for implementing aspects of metric tracking for tiered memory.

Claims

1. A method for tracking a metric of memory access, the method comprising:receiving, by a memory controller and via a host interconnect, a memory command from a host for access to a memory device coupled to the memory controller via a memory interconnect, the host comprising a memory configured as a first memory tier of a host physical address range and the memory device coupled with the memory controller being configured as a second memory tier of the host physical address range;comparing an address of the memory command to an address range of the memory device that a metric tracker is configured to monitor;altering a value of the metric tracker that corresponds to the address range in response to the address of the memory command matching the address range of the metric tracker; andreporting, via the host interconnect and to the host, the value of the metric tracker that corresponds to the address range.

2. The method as recited in claim 1, further comprising:storing the value of the metric tracker to a register of the memory controller, and wherein reporting the value of the metric tracker comprises:exposing, to the host, the register of the memory controller that stores the value of the metric tracker.

3. The method as recited in claim 1, further comprising:receiving, by the memory controller and via the host interconnect, a request from the host for the memory controller to report the value of the metric tracker, and wherein the reporting of the value of the metric tracker is responsive to the request from the host.

4. The method as recited in claim 1, further comprising:comparing the value of the metric tracker to a threshold configured to initiate data movement from the second memory tier to the first memory tier; andrequesting that the host move data from the address range of the metric tracker from the second memory tier to the first memory tier in response to the value of the metric tracker exceeding the threshold.

5. The method as recited in claim 1, wherein the metric tracker is configured to track, as the value of the metric tracker, a number of times that the host accesses, via respective memory commands, the address range of the metric tracker, and the method further comprises:calculating a temperature value for the address range of the metric tracker based on the number of times that the host accesses the address range.

6. The method as recited in claim 5, wherein the address range of the metric tracker comprises one address range of multiple address ranges that the metric tracker is configured to monitor, and the method further comprises:calculating respective temperature values for the multiple address ranges of the metric tracker;ranking the multiple address ranges based on the respective temperature values of the multiple address ranges; andreporting, by the memory controller and to the host, a temperature-ranked list of the multiple address ranges.

7. The method as recited in claim 1, wherein the address range of the metric tracker corresponds to:a cache line of the memory device;a page of the memory device; ora predefined region of the memory device.

8. The method as recited in claim 1, wherein the memory command comprises a host physical address, and the method further comprises:translating the host physical address to a device physical address of the memory command; andthe comparing compares the device physical address of the memory command to the address range of the metric tracker for the memory device.

9. The method as recited in claim 8, wherein a device physical address range of the memory device is mapped, as part of an interleave set, to a portion of a host physical address range.

10. The method as recited in claim 1, wherein:the host interconnect is configured to operate in compliance with a compute express link (CXL) protocol; orthe memory interconnect is configured to operate in compliance with a double data rate (DDR) memory protocol.

11. An apparatus comprising:a host interface configured to communicate via a host interconnect;a memory interface configured to communicate via a double data rate (DDR) memory protocol;a memory controller configured to process memory commands received, via the host interface, from a host for access to a memory device coupled to the memory interface, the host comprising a memory configured as a first memory tier of a host physical address range and the memory device coupled with the memory controller being configured as a second memory tier of the host physical address range; anda metric tracker configured to:compare a memory address of a memory command processed by the memory controller with an address range of the memory device that the metric tracker is configured to monitor;alter a value of the metric tracker that corresponds with the address range in response to the memory address of the memory command matching the address range of the metric tracker; andexpose, via the host interface, the value of the metric tracker that corresponds to the address range.

12. The apparatus of claim 11, further comprising:a register configured to store the value of the metric tracker, and wherein the metric tracker is further configured to expose the register via the host interface to expose the value of the metric tracker to the host.

13. The apparatus as recited in claim 11, wherein the metric tracker is further configured to:compare the value of the metric tracker to a threshold configured to initiate data movement from the second memory tier to a first memory tier of the host; andrequest that the host move data from the address range of the metric tracker from the second memory tier of the memory device to the first memory tier of the host in response to the value of the metric tracker exceeding the threshold.

14. The apparatus as recited in claim 11, wherein the metric tracker is configured to:track a number of times that the host accesses, via respective memory commands, the address range of the metric tracker; andcalculate, as the value of the metric tracker, a temperature value for the address range of the memory device based on the number of times that the host accesses the address range.

15. The apparatus as recited in claim 14, wherein:the address range of the metric tracker comprises one address range of multiple address ranges that the metric tracker is configured to monitor, and the metric tracker is further configured to:calculate respective temperature values for the multiple address ranges of the metric tracker;rank the multiple address ranges of the metric tracker based on the respective temperature values; andreport, via the host interface, a temperature-ranked list of the multiple address ranges of the metric tracker.

16. An apparatus comprising:a host device comprising a memory configured as a first memory tier of a host physical address range;a memory device configured as a second memory tier of the host physical address range; anda memory controller to process memory commands of the host device for access to the memory device, the memory controller coupled to the host device via a host interconnect, coupled to the memory device via a memory interconnect, and comprising a metric tracker for monitoring access to an address range of the memory device, the metric tracker configured to:compare a memory address of a memory command of the host device processed by the memory controller with the address range of the memory device;alter a value of the metric tracker that corresponds with the address range in response to the address of the memory command matching the address range of the metric tracker; andexpose, via the host interconnect and to the host device, the value of the metric tracker that corresponds to the address range.

17. The apparatus as recited in claim 16, wherein the metric tracker of the memory controller is further configured to:compare the value of the metric tracker that corresponds to the address range to a threshold configured to initiate data movement from the second memory tier and the first memory tier of the host device; andrequest that the host device move data from the address range of the metric tracker from the second memory tier to the first memory tier of the host device.

18. The apparatus as recited in claim 16, wherein:the address range of the metric tracker comprises one address range of multiple address ranges that the metric tracker is configured to monitor, and the metric tracker is further configured to:calculate respective temperature values for the multiple address ranges of the metric tracker;rank the multiple address ranges of the metric tracker based on the respective temperature values; andreport, to the host device, a temperature-ranked list of the multiple address ranges of the metric tracker.

19. The apparatus as recited in claim 18, wherein the multiple address ranges comprise a first set of multiple address ranges, the temperature-ranked list comprises a first temperature-ranked list, and the metric tracker is further configured to:select, based on the first temperature-ranked list of the first set of multiple address ranges, one of the first set of multiple address ranges for subsequent monitoring by the metric tracker;determine a second set of multiple address ranges within the address range selected for the subsequent monitoring by the metric tracker;configure the metric tracker to monitor the second set of multiple address ranges of the memory device;monitor, with the metric tracker, the second set of multiple address ranges to determine access metrics for the second set of multiple address ranges;calculate, based on the access metrics of the metric tracker, respective temperature values for address ranges of the second set of multiple address ranges;rank the address ranges of the second set of multiple address ranges based on the respective temperature values; andreport, to the host device, a second temperature-ranked list of the second set of multiple address ranges.

20. The apparatus as recited in claim 16, wherein the metric tracker of the memory controller is further configured to:receive, via the host interconnect, a request from the host device for the memory controller to report the value of the metric tracker, and wherein to expose the value of the metric tracker is responsive to the request from the host device.

Citation Information

Patent Citations

  • Mitigating disturb effects for non-volatile memory

    US20150179254A1

  • Region migration cache

    US20170212845A1

  • Identifying and responding to a side-channel security threat

    US20200380130A1

  • Self-adaptive wear leveling method and algorithm

    US20210406169A1

  • Access heatmap implementations at a host device

    US20230393744A1