LazyPIM: Efficient Support for Cache Coherence in Processing-in-Memory Architectures

Amirali Boroumand, Saugata Ghose, Minesh Patel, Hasan Hassan, Brandon Lucia, Nastaran Hajinazar, Kevin Hsieh, Krishna T. Malladi, Hongzhong Zheng, Onur MutluarXiv 2017

Abstract

Processing-in-memory (PIM) architectures have seen an increase in popularity recently, as the high internal bandwidth available within 3D-stacked memory provides greater incentive to move some computation into the logic layer of the memory. To maintain program correctness, the portions of a program that are executed in memory must remain coherent with the portions of the program that continue to execute within the processor. Unfortunately, PIM architectures cannot use traditional approaches to cache coherence due to the high off-chip traffic consumed by coherence messages, which can undo the benefits of PIM execution for many data-intensive applications. We propose LazyPIM, a new hardware cache coherence mechanism designed specifically for PIM. LazyPIM uses a combination of speculative cache coherence and compressed coherence signatures to greatly reduce the overhead of keeping PIM coherent with the processor, even when a large amount of sharing exists. We find that LazyPIM improves average performance across a range of data-intensive PIM applications by 19.6%, reduces off-chip traffic by 30.9%, and reduces energy consumption by 18.0%, over the best prior approaches to PIM coherence.

Introduction

Processing-in-Memory (PIM) places compute cores directly inside 3D-stacked memory (such as HBM or HMC) to exploit massive internal bandwidth. However, a major hurdle is cache coherence: ensuring that the CPU and PIM cores always see the most up-to-date version of data. Traditional coherence protocols (like MESI) require frequent messages across the narrow, pin-limited bus connecting the CPU to memory. In data-intensive applications, this coherence traffic becomes a bottleneck that can negate the performance benefits of PIM. Prior solutions either restricted PIM to non-cacheable data or used coarse-grained locks, both of which limit performance or parallelism. LazyPIM aims to provide the efficiency of "ideal" PIM without sacrificing the ease of a shared-memory programming model.

The LazyPIM Mechanism

LazyPIM adopts a "lazy" approach to coherence by batching checks rather than performing them for every memory access. The protocol relies on three core pillars:

  1. Speculative Execution: PIM cores speculatively assume they have the necessary permissions to read/write data. They track all accessed addresses locally in a PIMReadSet and PIMWriteSet without notifying the CPU immediately.
  2. Compressed Signatures: To minimize off-chip traffic, LazyPIM uses Bloom filters to compress the set of addresses a PIM core has touched into a small bit-vector (signature).
  3. Conflict Detection: Only when a PIM "kernel" finishes (or reaches a checkpoint) does it send these signatures to the CPU. The CPU checks for conflicts against its own CPUWriteSet. If a conflict is detected (e.g., the CPU updated data the PIM core read), the PIM core rolls back and restarts.
The LazyPIM speculative execution and signature-based conflict detection protocol.

To prevent signatures from becoming "saturated" (leading to false positives) and to reduce the cost of rollbacks, LazyPIM breaks long-running tasks into smaller partial kernels that commit periodically. Additionally, a Dirty-Block Index (DBI) proactively writes back dirty data from the CPU cache to memory to reduce conflicts occurring when PIM tries to read data that only exists in the CPU's cache.

Evaluation and Results

The researchers evaluated LazyPIM using a full-system simulator (gem5) targeting graph processing (Ligra framework) and In-Memory Databases (IMDB). Evaluated on a 16-core system, LazyPIM demonstrated significant gains over prior coherence approaches like Fine-Grained (FG), Coarse-Grained (CG), and Non-Cacheable (NC) schemes.

Speedup of various PIM coherence strategies compared to CPU-only execution across graph processing workloads.

Key results include:

  • Performance: Improved average performance by 19.6% over the best prior approaches and up to 66% over CPU-only execution. LazyPIM's performance stays within 9.8% of an "Ideal PIM" (a theoretical system with zero coherence overhead).
  • Efficiency: Reduced off-chip coherence traffic by 30.9% and total system energy consumption by 18.0%.
  • Scalability: Unlike prior methods, LazyPIM's performance scales effectively as the number of cores increases, proving that efficient coherence is mandatory for modern data-intensive workloads.

Conclusion

LazyPIM addresses the critical bottleneck of off-chip coherence traffic in PIM architectures. By combining speculative execution with signature-based batching, it enables high-performance PIM execution while maintaining a standard programming model. Future work may explore dynamic tuning of partial kernel sizes to further mitigate rollback penalties in high-contention scenarios.

Summary updated

BibTeX
@misc{boroumand2017lazypim,
  author = {Amirali Boroumand and Saugata Ghose and Minesh Patel and Hasan Hassan and Brandon Lucia and Nastaran Hajinazar and Kevin Hsieh and Krishna T. Malladi and Hongzhong Zheng and Onur Mutlu},
  title = {{LazyPIM: Efficient Support for Cache Coherence in Processing-in-Memory Architectures}},
  year = {2017},
  eprint = {1706.03162},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1706.03162},
}
Figure