notes

Taking a benchmark on radon: E1, E3 and E4 on the small-cache board

(Milestone 134. Named by calef on 2026-09-04, from three candidates. board-bench.md was refused for a collision the file itself could not fix: notes/bench-runbook.md already exists and answers "which machine should an evening be spent on", so two pages about benching on boards would have had names that do not tell them apart. This one is named for the experiment, which is milestone 134's own word for E3, so a reader looking for "does the fastpath's size cost anything" finds it. That it is a board procedure is the first line's job rather than the filename's.)

The session was run on 2026-09-04, and its conclusions are below, under "What the session measured". Six boots on radon, interleaved, one card written six times. The tables and the reasoning behind each reading are in the session appendix. The next evening is planned first, because it is the part a reader acts on.

The headline is not the one this page was written to expect. E3 separated cleanly in all three rows and one of them has the wrong sign, which says the experiment is confounded by code layout rather than that its hypothesis is false. The two experiments riding along, E1 and E4, produced the more decisive results of the evening.

(The board columns were empty before the session and are filled now. The static footprints are still objdump on patagonia, and the 2026-08-22 figures are still dev-Mac runs; both are in background.md.)

The next radon evening: E3 under the layout control, and how it shares a night with 168

(Written 2026-09-19 by milestone 134's stack-depth lane, rewritten that day by the control's lane. It says what each half of an evening shared with notes/job-mix.md needs, and in what order.)

What is already taken and does not need the board again. E1 and E4 ran on radon on 2026-09-04 and both are single-build sweeps, so the confound below does not touch them; they are quotable as they stand. The per-IPC kernel stack depth, which E1's prediction used to estimate, is now measured (notes/stack-high-water.md, "Per-IPC depth").

Nothing E3 is owed. calef retired its question on 2026-10-20 (UTC), after step 0 failed under milestone 796's pin (below). The procedure stays as the record of what E3 under a layout control was, built in kernel/src/fastpath_pad.rs.

The knob, in one paragraph

fastpath_pad still turns E3's padding on. Two environment variables, read by kernel/build.rs only when that feature is on, say how much. NIFE_FASTPATH_PAD=<units> is the sled's length in units of the old pad (5,092 bytes on riscv64; unset is 1, and 0 is the guard and a ret). NIFE_FASTPATH_SHIFT=<bytes> appends uncounted zero bytes after it. The linker script places the sled right after .text.hot, the hot trap path that milestone 796 (pin the hot trap path's placement) pins on a 16 KiB boundary after the boot stub. So both numbers move all kernel text after that block by that many bytes, and neither moves the block. A pad and a shift of equal displacement are therefore the same binary apart from bytes nothing fetches. This is milestone 370 (a layout control, because the perturbation experiments cannot tell footprint from addresses). How the pin was checked, why these are variables rather than features, and why every image must come from one commit are in layout-control.md.

The eight images, and why these sizes

image NIFE_FASTPATH_PAD NIFE_FASTPATH_SHIFT the whole kernel text moves by what it is for
pad 0 0 0 0 the reference for both ladders
pad 1 1 (or unset) 0 5,088 (79.5 L1i sets) the 2026-09-04 sled
pad 2 2 0 10,176 (159 sets)
pad 3 3 0 15,264 (238.5 sets)
layout A 0 820 820 (12.8 sets) a small layout draw
layout B 0 2460 2,460 (38.4 sets) another
match 1 0 5088 the same bytes as pad 1 pad 1's twin, uncounted
match 2 0 10176 the same bytes as pad 2 pad 2's twin, uncounted

Each matched image is byte-identical to its pad outside the sled, so a difference between the two is the instrument failing. The four un-padded images are the layout distribution. Why the small shifts are 820 and 2,460 (U74 branch-target alignment and L1d page sets) is in layout-control.md.

Step 0, on the build machine, before anyone walks to the bench

git log -1 --format=%h                     # the commit every image below is built from
for c in 0:0 1:0 2:0 3:0 0:820 0:2460 0:5088 0:10176; do   # pad:shift
  NIFE_FASTPATH_PAD=${c%%:*} NIFE_FASTPATH_SHIFT=${c##*:} script/fastpath-footprint \
    --arch riscv64 --features board,bench,single_hart,fastpath_pad --layout
done

Two lines out of each run are the check, and they are the reason this step exists:

The rest of each readout (every hot symbol's L1i set, line phase and alignment) is the pre-registered layout record; what it carries is in layout-control.md.

Step 0 fails on a tree with milestone 796's pin, so E3 as specified cannot run

Step 0 ran on 2026-10-20 (UTC) at 68647cfc5. The code hash and the sled address matched in all eight images, and every image read the sled precedes 0 of 16 hot symbols, 0% of their bytes. Milestone 796 pins the hot trap path in .text.hot, ahead of the sled, so no pad or shift moves a hot instruction and the eight images are one hot-path layout. No E3 boot ran, and calef retired E3's question. The evidence, the fork and the ruling are in step-0-under-the-pin.md.

The boots

NIFE_FASTPATH_PAD=0 NIFE_FASTPATH_SHIFT=0 \
  script/board-image --bench --tftp --extra-features fastpath_pad
script/board-console --for 20m --until none --log bench/radon-<date>/bench-e3-pad0-1.log

Reading it

Three rows matter, as before: call_reply (the shape services run, and the one the verdict should rest on), ipc_rtt, ipc_rtt_el0.

  1. Read each matched pair first, pad 1 against SHIFT=5088 and pad 2 against SHIFT=10176. They are the same binary outside a sled nothing fetches, so a difference beyond the boot-to-boot spread means the instrument is measuring something nobody has accounted for, and the rest of the reading is suspect until it is explained.
  2. Then take the layout distribution. Pad 0 and the layout images differ in nothing a CPU executes, so whatever spread appears across them is the layout effect at these displacements, per row. Report it as a range, not a mean.
  3. Then read the pad ladder against it. With the sled pinned, a pad and a shift of equal displacement are the same binary, so the honest question the ladder answers is whether displacement costs time and whether more of it costs more. A row that rises monotonically and leaves the layout range says it does; one that jumps and comes back is a particular alignment rather than a trend; one inside the boot-to-boot spread is nothing. None of those is a footprint result, which is the paragraph below.
  4. Keep every boot's cycles_per_tick line, so the rows convert to cycles (M5) on the evening's own commit.
what the capture shows what it means where it routes
each pad sits on its matched twin, and the pads move no further than the layout images do the counted footprint predicts nothing: doubling and tripling it costs no more than moving the same code the same distance §95 (a hand-written IPC fastpath, and whether it can stay proven)'s premise is in serious doubt. 188 phase 4 would buy a standing verification obligation for an effect this instrument cannot find; route to design/decisions/0095-*
a pad differs from its matched twin, beyond the boot-to-boot spread impossible on the physics as understood, since the two binaries differ only in bytes nothing fetches. Something else differs between the images or the measurement is not what it seems nothing routes until it is explained; it is the instrument's own check failing
the pad ladder rises monotonically and leaves the layout range, matched twins tracking their pads displacement costs time and more displacement costs more, which is the strongest reading available here. It is a layout result stated honestly, not a footprint one 188 phase 4: the magnitude is what a hand-written fastpath would have to beat, and notes/benchmarks.md gets a caveat on every stored baseline
the layout range is itself large (several percent) the 2026-09-04 reading was an artifact, as suspected, and every between-build comparison in bench/ inherits the same exposure notes/benchmarks.md, as a caveat on stored baselines; and E3 as built cannot answer §95 at all
everything inside the boot-to-boot spread this kernel's IPC path does not care where it sits, at these displacements, on this core 188 phase 4 loses its last cheap instrument; M6 is what is left
rows disagree (one moves, another does not) shape-specific, which is a result about which path to optimize 188 phase 4, narrower than sketched

What this cannot decide, and it should be said before the numbers exist. The padding is never executed, so it cannot evict anything on its own; the only way it can reach a clock is by moving other code. E3 therefore tests whether the number script/fastpath-footprint reports predicts latency, which is what milestone 188 (the IPC fastpath) leans on, rather than Liedtke's claim about an executed footprint. That claim needs either M6 (instruction-cache misses per IPC) or a perturbation that adds executed instructions, and neither is this experiment.

Optional, one boot, if there is time: a card built with --extra-features ipc_stack_depth prints the per-IPC depth lines on the board itself. It should reproduce the QEMU release numbers to the byte (the board and single_hart features are the only differences); a disagreement would mean one of them changes the IPC path's codegen, which nothing currently expects. Its timing rows are not results, since the instrument paints on every sample. On 2026-10-20 every EL0 series read 16 bytes deeper (notes/stack-high-water/per-ipc-depth.md).

Sharing the night with milestone 168

E3 is eight images now, where it was two. The halves cannot share an image (script/board-image refuses --bench with --job-mix), and --tftp makes switching a rebuild and a power cycle. The night is shared with milestone 168 (a multi-tasking workload benchmark). E5, the executed-footprint test E3 cannot be, needs a build and an evening of its own: its plan.

order what boots why this order
1 on the build machine: step 0 above, all eight images none the check that invalidates the whole E3 block if it fails, and it needs no board
2 E3, script/board-image --bench --tftp --extra-features fastpath_pad per image 3 per image, interleaved interleaving is the design, so it goes first while the room and the board are at one temperature
3 milestone 168's job mix, script/board-image --job-mix --tftp at least 5 notes/job-mix.md, "The next bench evening on radon", steps 0 to 8, unchanged
4 optional: one --bench --extra-features ipc_stack_depth boot 1 last, because nothing is blocked on it

Log names: bench-e3-pad<n>-<boot>.log and bench-e3-shift<bytes>-<boot>.log here, jobmix-boot<n>.log for 168's, both under bench/radon-<date>/. Write the commit down once. The console rules are notes/job-mix.md's step 0 for both halves: one capture per serial port, and clean each log with tr before committing it.

What the session measured, 2026-09-04

Six boots on radon, interleaved unpadded/padded, one card written six times, by the two-build procedure. Every boot printed bench: cntfrq 4000000, bench: cycles_per_tick 250.00 and bench: done, and nothing self-skipped. The tables are in session-2026-09-04.md.

Why it runs on radon, and what was in the way

E3 of milestone 134 (the register of measures) read 2 to 3% on patagonia, inside noise. A negative result on a large-cache machine proves little, and radon has 32 KB of L1i per U74. Three things kept E1, E3 and E4 off the board until 2026-09-04, and one was a finding: the padding sat on a shape nothing runs. The static footprint table, riscv64 ipc_call_reply 5,936 bytes unpadded and 11,070 padded, is 18% and 34% of radon's L1i. All of it is in background.md.

The two-build procedure, and reading it

The 2026-09-04 session wrote one card six times, unpadded and padded interleaved, three boots per condition. E1 and E4 still run that way: a single_hart card removes the fifteenfold placement lottery of milestone 240 (the soak reports what happened and not where). The bench list, the six steps and the shell transcript are in two-build-procedure.md. How it controlled placement, and the outcome table it was built to fill, are in reading-a-two-build-session.md.

What milestone 74's riscv64 half adds, and what it still cannot see

Milestone 74 (cycle counters) reads real cycles on radon at 250 per tick. That adds precision, not a new answer: the 2026-09-04 within-condition spread was 0 to 2 ticks against a gap of 74, so the ruler was never E3's problem. It still cannot see the mechanism, because nothing reads an instruction-cache miss counter (M6). The full section is in background.md.

BUGS

The full list, with the reasoning for each, is in limitations.md. The ones that change how a number is read: