arXiv:2610.08483cs.AROct 2026

Manuscript Offprint

arXiv:2610.08483

Trail: Scalable and Low-Cost Temporal TLB Prefetching via Page-Table-Embedded Deltas

Konstantinos Kanellopoulos, Konstantinos Sgouras, Harsh Songara, Rahul Bera, Onur Mutlu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Konstantinos Kanellopoulos 1^{1} Konstantinos Sgouras 1^{1} Harsh Songara 1^{1} Rahul Bera 1^{1} Onur Mutlu 1,2^{1,2}

1^{1}ETH Zürich 2^{2}New York University

Address translation is a significant performance bottleneck in modern data-intensive workloads. Prefetching virtual-to-physical address mappings into the TLBs and the cache hierarchy before they are demanded is a promising technique to hide address translation latency. However, accurately capturing address translation patterns is challenging as translation-intensive workloads often exhibit irregular memory access patterns. Existing TLB prefetchers have two key shortcomings: (i) spatial prefetchers fail to capture irregular translation patterns, and (ii) temporal prefetchers record address deltas (i.e., distances between virtual memory regions that successively trigger page table walks) in fixed-capacity hardware structures that cannot scale with the application's memory footprint. In this work, we conduct a large-scale characterization study across 200 translation-intensive workloads and find that, despite the irregularity of the applications' memory accesses, deltas exhibit a highly predictable structure: (i) for a given virtual memory region, the set of candidate deltas is small and recurring, and (ii) more than 94% of observed deltas fit in an 18-bit signed representation.

We introduce TRAIL, a new temporal TLB prefetcher that embeds deltas directly in unused bits of the last-level entries of the page table (PTEs) to enable scalable, and low-cost prefetching. When a virtual memory region (the destination region) triggers a page table walk, TRAIL identifies the region (the source region) that last triggered a walk from the same instruction and records the delta between the two in the source region's PTE. The next time a page table walk fetches the source region's PTE cache block, TRAIL retrieves the recorded deltas at no additional memory access cost, identifies the regions most likely to trigger the next page table walks, and prefetches the corresponding PTEs into the TLBs and the cache hierarchy. TRAIL comes with three key benefits: (i) compactly storing multiple deltas in a single PTE cache block enables TRAIL to issue prefetches for multiple destination regions, improving prefetch coverage, (ii) embedding deltas in PTEs requires no additional storage in the processor or main memory, and (iii) since deltas reside in PTEs already allocated by the application, prefetch metadata capacity scales with the application's memory footprint at no extra cost.

Our evaluation shows that TRAIL improves performance in single-core (four-core) systems by 5.7% (11.5%) on average over the No-TLB-Prefetcher baseline across 200 translation-intensive workloads (100 multiprogrammed mixes), outperforming the best prior standalone TLB prefetcher by 1.7% (2.5%). These gains require only a 64-entry hardware table in the processor to track the history of page table walks for each instruction. Trail is freely available at github.com/CMU-SAFARI/Virtuoso/TRAIL.

1. Introduction

As applications become more memory-intensive, address translation grows into a major performance bottleneck [1–12]. Recent studies from academia and industry demonstrate that address translation can account for up to 40–45% of total execution time in modern data-intensive applications (15–20% with large pages) [1, 2, 5, 6, 13–21]. We expect address translation overheads to grow even further as systems transition toward larger physical address spaces, driven by memory disaggregation [22–43] and tiered memory [6, 44–72].

TLB Prefetching. A promising technique to hide address translation latency is to predict which virtual-to-physical address mappings the application needs in the future, pre-walk the page table to retrieve them and insert the retrieved mappings into the TLBs and the cache hierarchy [73–82]. We refer to a mechanism that performs such prefetching as a TLB prefetcher. The effectiveness of a TLB prefetcher depends on how accurately it captures the application's address translation patterns. Doing so is challenging because translation-intensive workloads often exhibit irregular memory access and address translation patterns.

Shortcomings of Prior Works. Existing TLB prefetchers [74, 75, 83] fall short in two key ways. First, spatial TLB prefetchers (e.g., next-page [73], IP-stride [84]) rely on detecting spatial regularity and therefore fail to capture the irregular translation patterns common in sparse and pointer-rich applications. Second, temporal TLB prefetchers detect recurring patterns in translation requests or TLB evictions to predict future translation needs. Recency-based prefetching (REC) [83] links pages in L2 TLB eviction order using pointers stored in the page table and, on an L2 TLB miss, prefetches translations for pages adjacent to the accessed page (i.e., the one that missed in the L2 TLB) in this eviction order. However, pages evicted close in time are not necessarily accessed close in time in the future, making eviction order an unreliable basis for prefetching. Distance Prefetching (DP) [74] uses a hardware table to record which delta tends to follow the current one, where a delta is the distance between pages that cause consecutive L2 TLB misses. However, this table has a fixed capacity that does not grow with the application's memory footprint. Translation-intensive workloads can exhibit more recurring delta pairs than the table can retain, causing DP to discard learned pairs before they recur and miss prefetching opportunities. This limits prefetch coverage (i.e., the fraction of TLB misses that the prefetcher successfully predicts). We discuss in detail both limitations in §3.

Our goal is to design a TLB prefetcher that (i) effectively captures irregular address translation patterns, (ii) has low hardware cost, and (iii) scales prefetch coverage with the application's memory footprint. Satisfying all three requirements concurrently is challenging. Capturing irregular patterns across a large memory footprint requires the prefetcher to remember deltas for a large number of memory regions (requirements (i) and (iii)), while low hardware cost rules out the large dedicated tables that prior temporal prefetchers [74, 83] use to remember them (requirement (ii)). Meeting all three requirements therefore hinges on a question that prior work leaves open: do the temporal translation patterns of an application have enough structure that a prefetcher can capture most of them by remembering only a few, compactly-encoded deltas per region?

Large-Scale Characterization Study. To answer this question, we conduct a large-scale characterization study in simulation across 200 translation-intensive workloads ( §7§7 describes in detail our evaluation methodology). We study the sequence of virtual addresses that trigger page table walks (PTWs). Rather than tracking individual pages, we group virtual pages into fixed-size regions. A region is a contiguous chunk of virtual pages. Unless otherwise noted, we use 32 KB regions, i.e., 8 contiguous 4 KB pages. We use four terms throughout the paper. The source region is the virtual memory region that contains the virtual address that triggered a PTW. The destination region is the virtual memory region that contains the virtual address of the next PTW in the sequence. The delta is the signed distance, in number of regions, from the source region to the destination region. A transition is a pair (source region, delta): it records that a PTW in the source region is followed by a PTW in the region at distance delta. We form transitions in two ways: global tracking pairs each PTW with the immediately preceding PTW, whereas per-PC tracking pairs it with the most recent preceding PTW triggered by the same instruction (identified by its program counter).

Key Observations. We make three key observations from our large-scale characterization study (described in detail in §4). First, transitions are locally structured: a given source region has only a small, recurring set of destination regions, and this set is smallest when we track transitions per PC. With per-PC tracking, the top-4 (top-8) most frequent destination regions of a source region cover ~86% (~93%) of all transitions. A prefetcher therefore needs to remember only a few deltas per source region. This structure reflects how irregular applications traverse and organize their data. An application's access pattern can be irregular while individual data-structure traversals exhibit recurring patterns. Irregular applications often traverse a few large data structures using a small set of loops. Within a loop, successive accesses by the same load instruction often target related elements stored in close proximity in virtual memory. For example, a graph traversal (e.g., Breadth-First Search) may visit vertices in an irregular order, yet scan each vertex's neighbors consecutively. Such locality concentrates PTW transitions from a source memory region (e.g., source vertex) into a small set of destination regions (e.g., destination vertices) (see the breadth-first-search example in §4). Second, a larger memory region holds more pages (e.g., a 256 KB region holds 64 pages, eight times more than a 32 KB region), so a single delta covers transitions to more destination pages, which increases prefetch coverage. However, prefetching a larger destination region also fetches the PTEs of more pages (e.g., 64 PTEs spread over eight cache blocks, versus 8 PTEs in one cache block), some of which the application may never access. Third, deltas are compactly encodable: an 18-bit signed delta represents more than 94% of all observed per-PC transitions. A few deltas (i.e., 2–4) per source region thus fit in a few tens of bits. Together, these observations answer our question positively: despite their apparent irregularity, temporal translation patterns have enough structure that a prefetcher captures most of them by remembering only 2–4 18-bit deltas per source region.

Key Idea. Based on these observations, we propose TRAIL, 1^{1} whose key idea is to store the small set of deltas for each virtual memory region directly in the unused bits of the region's last-level page table entries (PTEs). 2^{2} Such an approach has three benefits. First, the space for storing deltas scales with the application's memory footprint. For each region, TRAIL stores only a small set of deltas (e.g., the four most frequent), each with a confidence counter. We call this set the region's payload. The OS already allocates leaf PTEs for every virtual memory region the application allocates. Thus, every source region already has PTEs in which to store its deltas, and the space for deltas grows with the memory footprint, whereas a fixed-capacity hardware table overflows once the application's regions outnumber the table's entries. Second, TRAIL's hardware cost is low, since the deltas occupy bits that already exist but are unused, rather than requiring a dedicated hardware table or additional memory. Third, TRAIL enables retrieving the whole payload (i.e., multiple deltas) with low latency and no additional memory accesses, since the PTW that fetches a region's PTEs also fetches the region's payload. Thus, TRAIL can immediately use the retrieved payload to determine which destination regions to prefetch, ensuring high prefetch coverage and timely prefetches. For example, in x86-64, the 8 leaf PTEs of a 32 KB region share one 64-byte cache block, and TRAIL stores a payload of four 18-bit deltas, each with a 2-bit confidence counter, in this cache block, and retrieves it when a PTW fetches the block. 3^{3}

Figure 1 shows how TRAIL works using an example sequence of PTWs triggered by the same PC. On every PTW, TRAIL performs two actions: it records a delta and it performs a prefetch (assuming confident). To record a delta, TRAIL needs to know the source region (i.e., the region that triggered the previous PTW from the same PC). Thus, TRAIL maintains, as part of the core's memory management unit (MMU), a small 64-entry hardware PC table that stores, for each PC, the region that last triggered a PTW from that PC. The PTW for A (1) updates the PC table to record A as the last region triggered by that PC. The walk for B (2) then discovers A in the PC table, so A is the source region and B is the current region. TRAIL computes the delta Δ=B−A\Delta = B - A and records it in A's payload. A frequency-based replacement policy keeps the most frequent deltas in a payload and ages out stale ones. To prefetch, TRAIL reads the payload of the current region. The payload arrives together with the region's PTEs, so reading it costs no additional memory access. In the example, the second walk for A (3) fetches A's PTEs and with them A's payload, which holds Δ\Delta. TRAIL ranks the deltas in the payload by confidence, computes the corresponding destination regions, B=A+ΔB = A + \Delta, and issues pre-walks to fetch their PTEs. A pre-walk prefetches (i) the direct virtual-to-physical address mapping into the L2 TLB (or in a prefetch buffer adjacent to the L2 TLB) and (ii) the corresponding PTEs into the cache hierarchy. When the application next accesses B (4), either the translation entry is

2^{2}A leaf PTE has 64 bits in both x86-64 [85] and ARMv8 [86]. In x86-64, bits 58:52 are architecturally ignored by the hardware and thus free for software use. In ARMv8, bits 58:55 of a level-3 page descriptor are reserved for software use. In addition, both architectures define physical-address fields that can address up to 4 PB, while the largest commercial servers today have roughly 32 TB of memory [87, 88], so the physical-address bits above the platform's maximum physical address width are unused. TRAIL relies on a hardware/software contract in which the OS reserves a subset of these bits for TRAIL and the page table walker ignores them during address translation. The number of available bits depends on the platform and the OS.

3^{3}TRAIL does not require a fixed number of unused PTE bits. When a platform exposes fewer bits, TRAIL stores fewer or narrower deltas per region. When a platform exposes no bits, TRAIL stores the same per-region deltas in a separate OS-managed table that mirrors the structure of the page table, at the cost of one additional lookup per PTW ( §6.1§6.1).

1^{1}We name our mechanism TRAIL because it leaves a trail of deltas in the page table, which later PTWs follow to find the translations the application needs next.

already in the L2 TLB (or in the prefetch buffer) and no PTW is needed, or a demand PTW resolves faster since the required PTEs already reside in the cache hierarchy.

Page-table walks from the same PC

Figure

Figure 1: Timeline of TRAIL’s operations to record deltas and prefetch page-table entries.

Evaluation Methodology. We evaluate TRAIL in single-core and multicore systems using Virtuoso [89, 90], a validated simulation methodology that enables full-system simulation with high accuracy, ported on top of Sniper [91], an event-driven multicore simulator. We use 200 translation-intensive workloads from seven benchmark suites: CVP-1 [92] (Qualcomm traces), Graph analytics [93–95], Google datacenter traces [96], XSBench [97], SPEC CPU [98, 99], Huawei DPC-4 [100], and PARSEC Canneal [101]. We compare TRAIL against six state-of-the-art TLB prefetchers (IP-Stride [84], Next-Page [73], DP [74], Berti [102], Recency [83], and ATP [75]), a system with a larger L2 TLB, and a system with a perfect L2 TLB (i.e., one that always hits).

Key Results. Our evaluation yields four key results that showcase TRAIL's effectiveness. First, in a single-core (four-core) system, TRAIL improves performance by 5.7% (11.5%) on average over the No-TLB-Prefetcher baseline and outperforms the best prior standalone TLB prefetcher, Recency, by 1.7% (2.5%). Combining TRAIL with Next-Page increases the improvement over No-TLB-Prefetcher to 7.6% (14.1%). Second, across the 50 most translation-intensive workloads, TRAIL reduces total demand PTW latency per kilo instructions by 60%, compared with 42% for the best prior prefetcher, Recency, since it both eliminates PTWs and significantly shortens the walks it does not eliminate. Third, TRAIL's benefits are robust across different memory configurations and system parameters: (i) TRAIL improves performance by 4.4% (1.6%) on average compared to No-TLB-Prefetcher when 19% (74%) of memory is mapped with 2 MB pages, (ii) it improves performance across the entire evaluated DRAM bandwidth range (400–4800 MTPS) compared to No-TLB-Prefetcher, and (iii) it does not degrade performance on any of the 200 evaluated workloads. Fourth, TRAIL incurs very small hardware cost: it requires only a 64-entry PC table in the processor.

This paper makes the following contributions:

• We conduct a large-scale experimental study of address translation patterns across 200 translation-intensive workloads. Our study shows that, despite their apparent irregularity, temporal translation patterns exhibit exploitable structure: each virtual memory region has a small, recurring, and compactly encodable set of per-PC deltas.

• We introduce TRAIL, a temporal TLB prefetcher that stores each virtual memory region’s deltas in unused bits of that region’s PTEs. This design (i) scales delta storage with the application’s memory footprint, (ii) requires neither dedicated SRAM nor additional memory capacity to store the deltas, and (iii) retrieves the deltas together with the PTEs during a page table walk, without additional memory accesses. This way, TRAIL enables high prefetch coverage and timely prefetches with low hardware cost.

• We evaluate TRAIL via simulation across 200 single-core workloads and 100 four-core multiprogrammed mixes against six state-of-the-art TLB prefetchers. Our results show that TRAIL provides significant performance gains over the best prior TLB prefetcher in both single-core and multicore systems, while requiring only a 64-entry PC table. TRAIL is freely available at github.com/CMU-SAFARI/Virtuoso/TRAIL.

References (100)

Couldn't load all references. Reload the page to try again.