Making Transparent Huge Pages Truly Massive: The Push for 1GB Support

By

Introduction

In the world of Linux memory management, huge pages have long been a tool to reduce translation lookaside buffer (TLB) misses and improve performance for large-memory workloads. Typically, when developers speak of huge pages, they refer to PMD-level entries—4KB page table entries for 2MB (or 1MB on some architectures) pages. But modern x86 CPUs also support PUD-level huge pages, which can map a full 1GB of memory with a single TLB entry. Historically, providing such gigantic pages transparently to user-space processes was dismissed as impractical or undesirable. Yet at the 2026 Linux Storage, Filesystem, Memory Management, and BPF Summit (LSFMM+BPF), Usama Arif presented a session that dared to challenge this assumption, exploring how to make transparent huge pages (THPs) scale to 1GB.

Making Transparent Huge Pages Truly Massive: The Push for 1GB Support

The Spectrum of Huge Pages

PMD vs. PUD: Two Levels of Bigness

The Linux kernel currently supports two main categories of huge pages: PMD (Page Middle Directory) entries, typical sizes of 2MB on x86_64, and PUD (Page Upper Directory) entries, reaching 1GB. The former is the common target for Transparent Huge Pages (THP), which automatically promotes eligible memory regions to 2MB pages without explicit application intervention. The 1GB PUD-level pages, however, remain a domain of manual hugetlbfs allocations—a static, administrator-driven approach that doesn't adapt to dynamic memory demands.

Why 1GB Transparent Huge Pages?

The theoretical benefits of 1GB pages are profound. For data-intensive workloads—such as databases, virtual machine monitors, in-memory caches, and large-scale scientific simulations—the TLB coverage jumps dramatically. A single 1GB page replaces up to 512 2MB pages or 524,288 4KB pages, slashing TLB miss rates and page table walk overheads. Performance improvements in memory bandwidth and latency can reach 10-20% in certain scenarios, according to preliminary evaluations. Moreover, reducing page table complexity lowers kernel memory pressure and speeds up memory management operations like fork() and mmap().

Challenges on the Path to 1GB THP

Despite the allure, making 1GB pages transparent is fraught with difficulties.

  • Allocation and Fragmentation: Finding contiguous 1GB blocks of physical memory becomes increasingly harder as system uptime grows. Memory fragmentation, especially after long-running processes, can prevent THP from ever using 1GB pages. Kernel developers must devise smarter compaction and defragmentation strategies.
  • Kernel and Device Compatibility: Many kernel subsystems and device drivers assume memory comes in 4KB or 2MB chunks. Direct memory access (DMA) rings, IOMMU mappings, and swapless kernels may break or suffer performance penalties when faced with 1GB pages.
  • Application Behavior: Transparent promotion of memory to 1GB pages could increase memory waste if the application's footprint is much smaller than 1GB. Even if larger, padding may be needed, leading to overconsumption.
  • Page Fault Latency: Allocating a 1GB page on demand triggers a massive zero-fill or swap-in operation, which could cause latency spikes unsuitable for real-time or interactive tasks.

Usama Arif's Proposal at LSFMM+BPF 2026

In his session at LSFMM+BPF 2026, Usama Arif outlined a roadmap to overcome these obstacles. The key innovations include:

  1. Adaptive Compaction and Migration: Introduce a kernel thread dedicated to pre-compacting memory regions that are frequent candidates for huge-page promotion—e.g., those exceeding 512MB in anonymous mappings. This thread would proactively move pages to form 1GB alignments without stalling the allocating process.
  2. Incremental Promotion: Instead of atomically upgrading an entire 1GB region, the kernel would first promote smaller sub-ranges (e.g., 2MB chunks) and later coalesce them into a 1GB page when all prerequisites are met—fragmentation reduced, no outstanding short-lived mappings.
  3. New Huge-Page Cache Tier: A separate page cache layer for 1GB THPs, isolated from standard page caches, to avoid negative impacts on non-huge memory accesses. This cache would use demotion policies to break 1GB pages back into smaller units if memory pressure rises.
  4. User-Space Hints: Extending the madvise() system call with new flags (e.g., MADV_HUGEPAGE_1GB) so that applications can voluntarily opt into 1GB transparent huge pages—keeping backward compatibility while enabling power users.

Arif also emphasized the need for robust testing infrastructure to validate 1GB THP on diverse hardware (including ARM and RISC-V CPUs with optional 1GB support), and to measure overhead across different workload profiles.

The Road Ahead

The LSFMM+BPF session concluded with a lively discussion. Some attendees expressed caution, noting that 1GB THP might remain too risky for production environments unless fragmentation can be tamed. Others applauded the potential energy savings from fewer page table walks. The consensus was that incremental merging into mainline would be the safest path, beginning with a kernel configuration option defaulting to disabled, then gradually enabling it as stability improves.

If Usama Arif's vision succeeds, future Linux systems could transparently leverage 1GB pages for the heaviest memory loads—without administrators ever needing to manually configure hugetlbfs. This would mark a significant evolution in the Linux memory model, merging the transparency of THP with the raw scale of the largest supported page sizes. For now, the journey from 2MB to 1GB transparent huge pages is just beginning, but the 2026 LSFMM+BPF summit has ignited a crucial conversation that could reshape memory management for years to come.

Related Articles

Recommended

Discover More

Apple Watch Educational Discounts: Everything Students & Educators Need to KnowAWS Unveils AI-Powered Desktop Assistant and Agentic Solutions at Landmark Event10 Key Insights into Python 3.15.0 Alpha 6Moving Qubits: A Breakthrough in Quantum Dot ConnectivityKubernetes v1.36 Launches with Breakthrough Staleness Fixes for Controllers – Urgent Update for Cluster Stability