Near-Memory Address Translation

Javier Picorel, Djordje Jevdjic, Babak Falsafi

TL;DR

DIPTA (Distributed Inverted Page Table) is a novel near-memory address translation mechanism that eliminates the performance overhead of virtual memory for processing-in-memory architectures. By restricting unnecessary mapping flexibility and using clever way prediction, it allows address translation and data fetching to happen in parallel, delivering speedups of up to 3.8x.

What Problem Does This Paper Address?

Near-Memory Processing (NMP) places logic units (MPUs) directly inside or next to DRAM chips to exploit massive internal bandwidth and reduce data movement. However, these units face a major "showstopper": Virtual Memory.

In conventional systems, the CPU uses a Translation Lookaside Buffer (TLB) to quickly turn virtual addresses into physical ones. When a TLB misses, the system performs a "page walk," traversing a complex table structure in memory. For MPUs, this is a disaster. Modern datasets are so large that they far exceed TLB reach, and in a multi-chip memory system, a page walk might require multiple network hops across chips, leading to latencies exceeding 500ns. This overhead can consume up to 70% of execution time, effectively nullifying the benefits of NMP.

Methods

The authors propose DIPTA (Distributed Inverted Page Table). Their approach is based on a key observation: the historical requirement that any virtual page can map to any physical page frame (full associativity) is no longer necessary for modern, memory-resident server workloads.

Key components of DIPTA include:

  • Limited Associativity: DIPTA restricts the virtual-to-physical mapping to be set-associative (e.g., 4-way). This ensures that a virtual address only needs to be checked against a few specific physical locations.
  • Parallel Translation and Fetch: Because the search space is limited, the MPU can issue the data fetch and the translation request simultaneously.
  • Way Prediction: To avoid fetching all "ways" in a set (which wastes bandwidth), DIPTA uses a lightweight address-based way predictor. If the predictor hits, the MPU fetches only the correct data block.
  • Two Implementation Flavors:
    1. SRAM-based: Stores translation metadata in a small, fast SRAM cache within the memory vault.
  • DRAM-embedded: Uses a novel DRAM layout to store page table entries directly within DRAM rows alongside the data, incurring zero SRAM area overhead and only ~1.5% DRAM capacity overhead.

Datasets

The researchers evaluated DIPTA using a mix of real-world server workloads and specialized data-structure kernels:

  • Server Workloads: Cassandra (NoSQL), Memcached, TPC-H/TPC-DS (Analytics), MySQL, Neo4j (Graph), and RocksDB.
  • ASCYLIB Kernels: High-concurrency implementations of Hash Tables, Skip Lists, and Binary Search Trees (BST), which are notorious for "pointer chasing" and poor TLB behavior.
  • Simulation Environment: They used the Flexus full-system simulator and Pin for memory tracing, modeling an ARM Cortex A7-like MPU integrated into a Hybrid Memory Cube (HMC) architecture.

Key Insights and Ideas

  • Full Associativity is Overkill: The paper proves that for modern servers, moving from a fully associative mapping to a 4-way set-associative mapping has virtually zero impact on page fault rates. This is because modern OSs naturally cluster memory segments.
  • Inverting the Table: By using an inverted page table (one entry per physical frame) and distributing it across memory vaults, the translation information is always co-located with the data it describes.
  • The DRAM Layout Trick: To embed metadata in DRAM without breaking the standard 4KB OS page size, the authors propose a "shifted" layout where 63 pages are stored across 64 DRAM rows, leaving the first 64 bytes of every row free for translation metadata.
  • Predicting the "Way": Even with limited associativity, knowing which "way" to fetch is crucial. The authors show that a tiny 256B predictor can achieve over 90% accuracy for most workloads.

Key Results

  • Massive Speedups: DIPTA achieves speedups of up to 3.81x over conventional translation using 4KB pages and 2.13x over 1GB pages.
  • Overhead Elimination: DIPTA effectively removes address translation from the critical path, making it perform as well as an "ideal" (zero-latency) TLB.
  • High Accuracy: The way predictor achieves 96%–99% accuracy on standard server workloads. Even on "worst-case" pointer-heavy data structures, accuracy remains between 69% and 91%.
  • Scalability: Unlike traditional TLBs, which struggle as memory capacity grows, DIPTA's distributed nature allows it to scale seamlessly with the number of memory chips.

Limitations and Future Work

  • Synonyms: Like all inverted page tables, DIPTA struggles with "synonyms" (multiple virtual addresses mapping to the same physical address). The authors suggest OS-level workarounds or small hardware structures to handle this, but it wasn't the primary focus.
  • OS Integration: While DIPTA is designed to be mostly transparent, the OS must be "associativity-aware" during page allocation to minimize conflicts in highly congested scenarios.
  • Memory Oversubscription: The design assumes workloads are mostly memory-resident. If a system relies heavily on disk swapping, the performance characteristics would change, though the authors argue this is rare in modern high-performance data centers.

Summary updated

BibTeX
@inproceedings{picorel2017near,
  author = {Javier Picorel and Djordje Jevdjic and Babak Falsafi},
  title = {{Near-Memory Address Translation}},
  booktitle = {PACT},
  year = {2017},
  doi = {10.1109/pact.2017.56},
}
Figure