Peter Fors

Reproducing the Zen 5 load/store experiments

These files accompany An idle-sensitive load/store dependency on Zen 5.

Independent reproduction

Download the source and raw captures (.zip) · Protocol and selection details · Analysis output

The bundle includes the recovered and instrumented harnesses, the required files from FFUTF revision fa2a0a3, the pinned simdutf 9.5.0 release, the exact build trace, and the measurement CSVs. It also includes the complete raw perf ring records saved by the IBS and store-drain harnesses. The CJK warmup and conversion checks come from the stock matrix source. The converters remain unchanged.

The datasets are an independent reproduction. The raw files from the early CJK runs are incomplete. Surviving historical captures are identified separately below.

To reproduce the figures, download the plotting script and the analysis output. The script requires Python 3, Pycairo, and DejaVu Sans.

python3 plot.py results.json figures

To verify the analysis from the raw files, extract the ZIP and work from its independent-reproduction directory.

python3 analyze.py raw > verified.json
cmp results.json verified.json

To run the measurements, use Linux x86-64 on a Ryzen 9 9950X3D with user access to the AMD core and IBS PMUs, support for collapsing the 2 MiB shared allocation, and write access to the cpufreq boost knob. Use Clang 23.1.5, G++ 16.2.1, Python 3, and unzip to match the recorded build. The scripts pin measurements and the busy helper to CPU 9, use normal scheduling, and restore the initial boost setting.

bash -x build.sh > build.log 2>&1

Run in a clean measurement copy. You can rename the bundled raw directory and make a new one before starting.

mv raw recorded
mkdir raw
bash host.sh
export FFUTF_IBS_PERIOD=50331648
bash host.sh drain drain-lower-rate
bash host.sh ibs ibs-extra-1
bash host.sh ibs ibs-extra-2
unset FFUTF_IBS_PERIOD
python3 analyze.py > rerun.json

The first reproduction run used the historical 25,165,824-op IBS period. All nine first-attempt drain launches aborted on kernel throttle records and are retained. The longer period produced the accepted drain dataset. The protocol records why a batch, pair, or sample enters a reported distribution. Trial sequences and samples include failures to train and state transitions. An individual run can populate different cohorts.

Raw file formats and selection

Each .ibsraw frame contains little-endian 64-bit tail, head and ring capacity followed by exactly head minus tail bytes from the perf ring in logical order. For an overrun, only the frame header is present. Normal frames contain the unmodified kernel records, including invalid IPs and throttle records. Byte lengths come from each perf record’s header. The CSV includes harness-decoded IBS fields. The analysis independently decodes raw frames and checks that the CSV samples and outside counts match.

For IBS, classify completed batches as fast below 1,700 cycles/call, slow above 1,800, and intermediate otherwise. +128 B uses only fast batches. The vmovdqu input distribution requires agreement of exact and IBS IPs, a load, a valid linear address within the 4 KiB input, and a clear L1D miss flag. The instruction offset is 0x1c31c. The dependent test is at 0x1c320. The latency is tag-to-retire minus completion-to-retire. A long observation is over 50 cycles. The first-KiB subset is based on the operand offset, and all collected positions remain available.

For store drain, the paired result uses consecutive ordinary/fenced batches that both exceeded 1,800 cycles/call. Other pairs remain counted and retained. The +128 B cases with and without a fence measure its overhead. The separate phase-order runs are also retained. The store match is static overlap of the lower 12 address bits with a store from an earlier vector in the same call. IBS does not identify the dynamically responsible store.

For idle, a verified slow state requires both adjacent verification batches above 1,800 cycles/call and 250 AL stall cycles/call. Fast requires both below 1,700 and 125. Exclude pre-intervention batches that did not verify slow from the transition counts. Keep ambiguous post-intervention batches visible. Analyze what the kernel recorded rather than classifying solely by the requested sleep duration. POLL requires POLL residency with no deeper state recorded. C1 requires C1 residency without C2 or C3 residency. A busy context-switch control is accepted when the CPU 9 helper ran and no idle residency was recorded.

See results.json for cohort counts, latency distributions, delayed operands, batch-level values, and the classification of every idle trial.

Historical and follow-up evidence

Historical evidence (.zip) · Fixed-address backing swap · Follow-up raw data, source and reproduction (.zip)

The historical ZIP contains the published matrix snapshots, captured backing and IBS summaries, the original fence comparison, and the persistence and footprint evidence. Terminal tables retain their original reporting granularity. A per-phase median cannot supply the individual trial values behind it.

The follow-up ZIP contains the original 135 CSVs and runners for virtual and physical coverage, instruction reduction, CPU locality, and transfer to other kernels. Use its own REPRODUCE.md. The address and CPU conclusions in the article come from this dataset. The migration and SMT experiments described there were recorded earlier and were not part of the CPU 9 reproduction.

The compiler and Linux tools are external dependencies. The input fixtures, source snapshots, follow-up runner, and pinned library release are bundled. The processor, its idle-state behavior, and the host’s PMU configuration remain part of the reproduction conditions.