TL;DR
This paper introduces Utopia, a novel hybrid virtual-to-physical address mapping scheme that combines the speed of restrictive mappings with the flexibility of conventional virtual memory. By intelligently partitioning memory into "restrictive" and "flexible" segments, Utopia significantly reduces address translation latency and memory hierarchy interference, leading to substantial performance gains for data-intensive workloads.
What Problem Does This Paper Address?
Modern computing systems rely heavily on virtual memory (VM) to provide a flexible abstraction over physical memory. This flexibility allows for features like data sharing between processes and efficient memory management. However, this flexibility comes at a cost: maintaining the mappings between virtual and physical addresses requires large data structures (page tables) and frequent lookups (page table walks or PTWs). These PTWs are slow, consume significant cache space, and can interfere with program data access, especially in data-intensive applications that deal with massive datasets.
While restricting address mappings (e.g., using hash functions) can speed up translations and reduce overhead, it severely limits VM's core functionalities like data sharing and can lead to increased swapping. The problem, therefore, is how to achieve the performance benefits of restrictive mappings without sacrificing the essential flexibility of conventional VM.
Methods
Utopia proposes a hybrid approach by dividing physical memory into two types of segments:
- Restrictive Segments (RestSegs): These segments use a fast, hash-based address mapping scheme. Virtual pages mapped to RestSegs can only map to a specific subset of physical pages within that segment. This allows for compact translation structures and quick lookups. Utopia employs a set-associative mapping for RestSegs, similar to how hardware caches work, using a Tag Array (TAR) and a Set Filter (SF) for efficient translation.
- Flexible Segments (FlexSegs): These segments use the traditional, fully-flexible virtual-to-physical address mapping scheme, managed by standard page tables.
The core idea is to intelligently place "costly-to-translate" pages (those that frequently cause slow PTWs) into RestSegs for faster access, while keeping other pages in FlexSegs to maintain full VM functionality. Utopia uses two application-transparent techniques for this:
- PTW-Tracking: Monitors PTW cost and frequency to identify pages that would benefit from being in a RestSeg.
- Page-Fault-based Allocation: Directly allocates pages into RestSegs upon a page fault.
When an address translation is requested, Utopia first checks the RestSegs in parallel with the L2 TLB. If the translation is found in a RestSeg or the L2 TLB, the request is resolved quickly. Otherwise, a traditional page table walk (FlexSeg Walk) is performed.
Datasets
The paper evaluates Utopia using 11 diverse data-intensive workloads from benchmark suites like GraphBIG, GUPS, XSBench, DLRM, and GenomicsBench. These workloads are chosen for their high L2 TLB miss rates and are representative of real-world data-intensive applications. The paper also mentions using a real system with Transparent Huge Pages (THP) to extract page size information.
Key Insights and Ideas
- The "Best of Both Worlds" Approach: The fundamental insight is that a single, rigid address mapping scheme (either purely flexible or purely restrictive) is insufficient. Utopia's hybrid approach offers a compelling solution by dynamically leveraging the strengths of both.
- Intelligent Page Placement is Crucial: The effectiveness of Utopia hinges on accurately identifying which pages are "costly-to-translate" and migrating them to RestSegs. The PTW-tracking and page-fault-based allocation mechanisms are key to achieving this.
- Compact Translation Structures for RestSegs: The use of Tag Arrays (TAR) and Set Filters (SF) for RestSegs dramatically reduces the memory footprint compared to traditional page tables, leading to faster lookups and reduced interference.
- Parallelism is Key: Utopia leverages parallelism by performing RestSeg walks concurrently with L2 TLB probes, further accelerating the translation process.
Key Results
- Performance Improvement: Utopia improves performance by 24% on average in single-core systems over a conventional four-level radix-tree page table. This is significantly better than prior state-of-the-art methods, which achieved around 13% improvement.
- Near-Ideal Performance: Utopia achieves 95% of the performance benefits of an ideal system where every translation request hits in the first-level TLB.
- Reduced Translation Latency: Address translation latency is reduced by 63% on average compared to the baseline.
- Memory Hierarchy Interference Reduction: Utopia reduces DRAM row buffer misses by 20% and significantly decreases the number of memory requests to the memory hierarchy for translation structures.
- Modest Overhead: The system incurs a modest area overhead of 0.64% and a power overhead of 0.72% per core.
- Multi-Core Effectiveness: Utopia maintains its performance benefits in multi-core systems, outperforming other mechanisms by up to 5% in an 8-core setup.
Limitations and Future Work
- RestSeg Size Sensitivity: The paper notes that larger RestSegs provide higher performance benefits, but also consume more memory. The chosen 512MB RestSeg offers a good balance.
- Context Switch Impact: Utopia's performance is not significantly affected by context switches, which is a positive finding.
- Non-Translation-Bound Workloads: Utopia has a negligible performance impact (less than 0.05% average loss) on workloads that are not translation-bound, indicating its targeted nature.
- Future Work: The authors suggest that Utopia can be combined with other techniques like TLB hierarchy improvements, efficient page walk caches (PWCs), and alternative page table designs (e.g., hash-based) to further reduce address translation overheads. They also propose exploring Utopia's applicability in virtualized environments, GPUs, and I/O data translation. The source code for Utopia is publicly available.
Summary updated