Abstract
Recent studies have demonstrated that near-data processing (NDP) is an effective technique for improving performance and energy efficiency of data-intensive workloads. However, leveraging NDP in realistic systems with multiple memory modules introduces a new challenge. In today's systems, where no computation occurs in memory modules, the physical address space is interleaved at a fine granularity among all memory modules to help improve the utilization of processor-memory interfaces by distributing the memory traffic. However, this is at odds with efficient use of NDP, which requires careful placement of data in memory modules such that near-data computations and their exclusively used data can be localized in individual memory modules, while distributing shared data among memory modules to reduce hotspots. In order to address this new challenge, we propose a set of techniques that (1) enable collections of OS pages to either be fine-grain interleaved among memory modules (as is done today) or to be placed contiguously on individual memory modules (as is desirable for NDP private data), and (2) decide whether to localize or distribute each memory object based on its anticipated access pattern and steer computations to the memory where the data they access is located. Our evaluations across a wide range of workloads show that the proposed mechanism improves performance by 31% and reduces 38% remote data accesses over a baseline system that cannot exploit computate-data affinity characteristics.
Introduction
Near-Data Processing (NDP) aims to move computation directly into memory modules, such as 3D-stacked High Bandwidth Memory (HBM), to circumvent the "memory wall"—the latency and energy overhead associated with moving massive amounts of data to a distant CPU or GPU. However, a significant architectural hurdle remains: modern memory systems are optimized for host-side bandwidth through fine-grained interleaving, which inherently conflicts with the data locality requirements of NDP.
The Interleaving Paradox
In contemporary systems, the physical address space is interleaved at a fine granularity (e.g., 128-byte chunks) across all available memory modules. This distribution ensures that the host processor can utilize the full bandwidth of all memory interfaces simultaneously, preventing any single module from becoming a bottleneck.
While beneficial for the host, this interleaving is detrimental to NDP. If an NDP unit located within a specific memory stack attempts to process a block of data, that data is likely striped across multiple remote stacks. Consequently, the NDP unit must perform "remote" accesses over relatively slow and narrow off-chip links, negating the benefits of being "near" the data. Efficient NDP requires a mechanism to localize private data within a single module while maintaining the ability to distribute shared data to avoid hotspots.
The CODA Architecture
To resolve this conflict, we propose CODA (Co-location of Computation and Data), a hardware-software co-design that enables flexible data placement and computation steering. CODA consists of three primary components:
1. Dual-mode Address Mapping
CODA introduces a "granularity bit" in the Page Table Entry (PTE) and TLB to support two distinct mapping modes:
- Fine-grain Page (FGP): The traditional mode where data is striped across all stacks, ideal for host-side execution or highly shared data.
- Coarse-grain Page (CGP): A new mode that maps an entire OS page contiguously to a single memory stack, enabling local access for NDP units.
2. Affinity-based Work Scheduling
Standard GPU schedulers are often non-deterministic. CODA implements a deterministic scheduling algorithm that assigns specific thread-blocks to specific memory stacks based on their ID. By making the scheduler predictable, the OS can know where a computation will happen before it starts, allowing it to place the necessary data in the right stack during allocation.
3. Data Placement Algorithm
A compiler-driven toolchain analyzes kernel access patterns. If data is identified as "block-exclusive" (accessed primarily by a single thread-block), the system utilizes CGP mode to localize it. Conversely, data identified as "shared" remains in FGP mode to preserve bandwidth and prevent memory hotspots.
Evaluation and Results
We evaluated CODA using 20 benchmarks from the GraphBIG, Rodinia, and Parboil suites. Our results demonstrate that CODA significantly bridges the gap between interleaving and locality:
- Performance: CODA achieves an average 31% speedup over a baseline NDP system using standard fine-grained interleaving.
- Efficiency: The system reduces remote memory traffic by an average of 38%. For workloads with high data locality, such as certain graph algorithms (BFS, SSSP), remote accesses are nearly eliminated.
- Host Compatibility: By maintaining FGP mode for host-side data, CODA preserves CPU performance, outperforming a purely coarse-grained system by 1.48x during host execution.
Conclusion
CODA demonstrates that the requirements of host-side bandwidth and NDP-side locality are not mutually exclusive. By introducing dual-mode address mapping and affinity-aware scheduling, CODA enables systems to intelligently co-locate computation and data, unlocking the full potential of near-data processing without sacrificing traditional system performance.
Summary updated