Beyond Simulation: Estimating the Benefits of Memory-Controller-Supported Page Zeroing on Real Hardware

image

Estimating the Benefits of Memory-Controller-Supported Page Zeroing on Real Hardware [generated with AI].

Context

Operating systems always initialize page frames with zeros before exposing them to user-space applications. This prevents data leakage, but writing zeroes consumes CPU time and memory bandwidth, especially for large pages.

Conventional DRAM main memory is organized in a deep hierarchy. A memory controller translates physical addresses into locations across channels and DRAM banks. Each bank contains rows of memory cells; accessing data involves selecting a row and transferring smaller units of data, called bursts. CPU caches sit between the processor and the DRAM, reducing the number of accesses that must reach main memory.

The LPDDR6 standard adds a metadata field to each DRAM burst transmission. The memory controller can use this field for system-defined purposes, while managing its transfer alongside ordinary data. McZero proposed to use one metadata bit to indicate that a burst should be treated as zeroed. The operating system can mark the corresponding metadata instead of writing zeroes to the data itself. With a single write to the metadata, the operating system can mark up to x256 as much memory as zero, saving time and energy. On a subsequent read, the memory controller returns zeroes for a marked burst; a write clears the mark. McZero requires changes to the memory controller and an interface that allows the operating system to update the metadata.

In a simulation, McZero substantially reduced the time required to zero large pages. However, the operating system must also invalidate cached copies of the affected data so that later accesses observe the zeroed contents.

Problem

The existing evaluation is based on the full-system simulator gem5 and considers a single core CPU only. It remains unclear how the costs of zeroing and cache maintenance compare on real hardware and how much larger, multicore workloads could benefit.

In particular, invalidating a large memory range requires an operation for each cache line. The cost may depend on whether the lines are cached, whether they are dirty, and whether copies reside in other cores’ caches. Traversing the range twice and coordinating multiple cores can introduce additional overhead. These effects need to be quantified before estimating the benefit of McZero for real workloads.

An evaluation on an 80-core Neoverse N1 (ARM64) system offers an opportunity to study these costs at a larger scale. The processor does not provide the proposed McZero memory-controller interface, so the complete mechanism must be modeled or approximated.

Goal

The goal of this thesis is to measure the costs relevant to McZero on a real physical system and use the results to predict its potential performance gains for different workloads.

The thesis could follow these key steps:

  1. Measurement environment: Set up a Linux-based evaluation platform on the Neoverse N1 system. Identify suitable facilities for cache maintenance, timing, and performance monitoring.

  2. Cache-maintenance microbenchmarks: Measure the cost of iterating over memory ranges and invalidating their cache lines using Arm’s DC IVAC instruction. Compare cached and uncached lines, different range sizes, and one versus two traversals. Where feasible, distinguish clean and dirty cache states and account for the required synchronization and completion barriers.

  3. Multicore costs: Investigate how cached copies on other cores and inter-core synchronization affect the measurements. Evaluate how these costs change with the number of participating cores, up to the available 80 cores.

  4. Comparison with simulation: Reproduce comparable microbenchmarks in gem5 and compare their results with the physical machine. Analyze differences in cache hierarchy, instruction behavior, and system configuration that may explain deviations.

  5. Workload evaluation and prediction: Study a small set of larger memory-intensive workloads, including huge-page use where appropriate. As one approximation of McZero, initialize memory once outside the measured phase and use it only once, so that the measured phase avoids repeated zeroing while still incurring cold-memory access costs. Compare this scenario with conventional zeroing, account separately for the measured cache-maintenance and synchronization costs, and estimate the resulting workload-level gains. Discuss which McZero costs and effects the approximation does not capture.

Topics: Linux kernel, memory management, CPU caches, AArch64, multicore synchronization, gem5, performance analysis

References

DIMES Workshop
McZero: Memory-Controller–Supported Page Zeroing with LPDDR6 Metadata
Alexander Halbuer, Illia Ostapyshyn, Nils Wilbert, Derek Christ, Matthias Jung, Daniel LohmannProceedings of the 4th Workshop on Disruptive Memory Systems (DIMES '26)Association for Computing Machinery2026.
PDF Details Slides 10.1145/3831664.3837784 []