TLB Coalescing for Multi-Grained Page Migration in Hybrid Memory Systems

Xiaoyuan Wang, Haikun Liu, Xiaofei Liao, Hai Jin, Yu ZhangIEEE Access 2020

Abstract

Hybrid memory systems, which combine fast DRAM with high-capacity Non-Volatile Memory (NVM), face a significant trade-off between address translation efficiency and data migration granularity. While large "superpages" (e.g., 2MB) optimize Translation Lookaside Buffer (TLB) usage, fine-grained migration of 4KB pages is necessary to manage limited DRAM space effectively. However, migrating individual 4KB pages often "splinters" superpages, leading to a surge in TLB misses. This paper presents Tamp, a hardware-software co-design that introduces multi-grained TLB entries to coalesce contiguous small-page migrations. By allowing the TLB to map arbitrary runs of contiguous pages, Tamp reduces TLB misses by 62.4% and improves application performance by 16.2% with minimal overhead.

Introduction: The Hybrid Memory Dilemma

As modern data-intensive applications exceed the capacity of traditional DRAM, hybrid memory systems have emerged as a viable solution. These systems pair a small, fast DRAM tier with a larger, high-density NVM tier. To maintain performance, the operating system must dynamically migrate "hot" (frequently accessed) data from NVM to DRAM.

A critical challenge in these systems is the conflict between translation efficiency and migration granularity. CPUs rely on the TLB to cache virtual-to-physical address mappings. To minimize TLB misses, systems often use superpages (2MB) to cover larger memory regions with fewer entries. Conversely, to optimize DRAM utilization, memory managers prefer fine-grained migration at the 4KB page level.

Hybrid memory system architecture showing the conflict between coarse-grained superpages and fine-grained page migration.

When a single 4KB page is migrated out of a 2MB superpage, the superpage is "splintered." The hardware can no longer use a single large TLB entry for that region, forcing the system to revert to multiple small-page entries. This splintering can cause a massive spike in TLB misses, resulting in performance penalties of up to 50%.

The Tamp Architecture

The researchers propose Tamp, a mechanism designed to bridge the gap between fine-grained migration and efficient address translation. Tamp's architecture rests on several key innovations:

Multi-Grained TLB Entries

Unlike standard TLBs that map fixed-size pages, Tamp modifies the L2 TLB to support multi-grained entries. By adding a 9-bit Npages field and an M flag to each entry, the hardware can coalesce up to 512 contiguous 4KB pages into a single TLB entry. This allows the system to treat any contiguous run of pages as a "virtual superpage," regardless of whether it meets traditional power-of-two size constraints.

Contiguity-Aware Migration

The OS component of Tamp monitors NVM access patterns at the 4KB level. Rather than migrating pages in isolation, it identifies contiguous "clumps" of hot pages. These clumps are migrated to DRAM as a batch, preserving spatial locality and enabling the hardware to use coalesced TLB entries.

Global Inverted Page Table and Weighting

To manage these dynamic mappings without the overhead of updating every core's page table, Tamp implements a global inverted page table in DRAM. Additionally, because coalesced entries cover significantly more memory than standard 4KB entries, Tamp modifies the TLB's Least Recently Used (LRU) eviction policy. These "heavy" entries are given higher priority, keeping them in the cache longer to maximize the hit rate for large memory regions.

Key Insights: Exploiting Page Contiguity

The fundamental insight driving Tamp is that "hot" pages within a superpage are rarely scattered randomly. Empirical analysis of memory-intensive workloads reveals that hot pages typically appear in contiguous runs of tens or hundreds of pages.

Distribution of contiguous pages across various workloads, providing the empirical basis for multi-grained coalescing.

As shown in the workload analysis, many applications exhibit significant runs of contiguous pages (e.g., Mcf and Bodytrack). By exploiting this natural contiguity, Tamp can provide the benefits of superpages even when only a fraction of a 2MB region is resident in DRAM.

Evaluation and Results

Tamp was evaluated using a simulated platform (zsim and NVMain) across a diverse set of benchmarks, including SPEC CPU 2006, Parsec 3.0, and the Problem Based Benchmark Suite (PBBS).

The results demonstrate significant improvements over standard migration baselines:

  • TLB Efficiency: Tamp reduced TLB misses per kilo-instruction (MPKI) by an average of 62.4%.
  • System Performance: The reduction in TLB misses translated to a 16.2% average improvement in Instructions Per Cycle (IPC).
  • Low Overhead: The storage requirements for the inverted page table are less than 0.3% of DRAM. While the Tamp logic introduces some complexity, its total performance overhead remains under 8.7%, which is significantly outweighed by the gains in translation efficiency.

Conclusion and Future Directions

Tamp successfully addresses the splintering problem in hybrid memory systems by decoupling TLB entry size from rigid architectural page sizes. While highly effective in the L2 TLB, future work remains to integrate similar logic into the latency-critical L1 TLB. Additionally, the system's long-term effectiveness depends on the OS's ability to mitigate DRAM fragmentation to maintain contiguous free blocks for migration. Despite these challenges, Tamp provides a robust framework for maximizing the performance of next-generation hybrid memory architectures.

Summary updated

BibTeX
@article{wang2020tlb,
  author = {Xiaoyuan Wang and Haikun Liu and Xiaofei Liao and Hai Jin and Yu Zhang},
  title = {{TLB Coalescing for Multi-Grained Page Migration in Hybrid Memory Systems}},
  journal = {IEEE Access},
  year = {2020},
  doi = {10.1109/access.2020.2983065},
}
Figure