roadmap PARTIAL

101. The L4 calibration, read from the IPC number that pays for the trap

Partial as of since 2026-08-04 (PR #104). Raised 2026-08-04 as "build the EL0-to-EL0 IPC benchmark nobody owns", and that is not what the tree says. The benchmark exists and has been published for days. The milestone survived because the comparison built on it did not follow, and the corrected comparison is considerably worse for us than the one that was on the page.

Everything that can be built without a board is built. The ipc_rtt_el0 client reads the cycle counter across its own timed loop when the bench boot is built with cycle_counter_grant, and prints the round trip in cycles, read rather than converted (below). What remains is a person at radon running it.

Outstanding: one radon bench boot, script/board-image --tftp --bench --extra-features cycle_counter_grant, read for its ipc_rtt_el0_cycles lines. Checked 2026-10-24 (UTC) against the tree: no transcript under bench/ carries one. It is rank 1 for radon in briefs/bench-session.md.

Ruled 2026-10-24 (UTC): radon's direct read closes this block

calef chose option B. The block closes on radon's direct cycle read, the bench boot above, and argon is not required. The block's own machine_requirements names riscv64 silicon, and cycles read from a PMU instead of an assumed clock is what the probe gives there. The same-silicon comparison against seL4's TX1 figures stays with milestone 25 (cross-OS performance comparison), which is gated on argon.

Cycles on silicon: what the tree reads today

radon measured cycles_per_tick 250.00 on 2026-09-16, and ipc_rtt_el0 in the same boot was 124,433 ticks over 5,000 iterations (bench/radon-2026-09-16/bench-134300.log). That is about 6,222 cycles per EL0 round trip on a U74 at a measured 1.0 GHz, single hart, release build, and milestone 74's riscv64-half.md tabulates it beside the other rows. The clock there is measured, not assumed, which removes this block's 1.5x uncertainty for that machine. It is still two windows multiplied together: it assumes the core did not change frequency between the probe and the row.

It is not an L4 calibration. A U74 is an in-order RISC-V core and seL4's 413 and 426 are A57 cycles, so the two counts are of different machines doing different instruction streams. Quote it as a riscv64 figure and nothing more.

The direct read

With cycle_counter_grant beside bench, ipc_rtt_el0 grants its client the counter (DECISIONS §139's per-thread grant, via sched::grant_cycle_counter_to_current). The client reads user_mode_runtime::cycle_reading() inside its tick window. The bench boot then prints bench-probe: ipc_rtt_el0_cycles with cycles per round trip and cycles per tick across the same window, and a second line with what the client said it counted. The row is unchanged, so no baseline moves. notes/benchmarks/kernel-bench-harness.md has the lines, the refusals and the commands. Under aarch64 TCG on 2026-10-24 (UTC) it printed 15.99 cycles per tick against the probe's 16.00, which proves the plumbing and measures nothing. No riscv64 or x86_64 run exists: this machine has no qemu-system-riscv64, and the x86_64 bench boot runs no EL0 rows.

What has landed, and what it cost us to say

The measurement and the paragraph are done (PR #104, commit b4178513). One release-build run of both IPC benchmarks on one machine, both planes from the same boot, five boots back to back:

bench plane ns/iter, median of 5 what one iteration includes
ipc_rtt kernel-side 46 two rendezvous, one address space, no trap
ipc_rtt_el0 EL0 to EL0 350 two rendezvous, two address spaces, four svcs

On one core, against seL4 itself, nife's EL0 round trip costs about 4.6 times seL4's. seL4's Call plus ReplyRecv between two address spaces takes 96 ns and ipc_rtt_el0 442 ns, both guests of the same HVF machine (2026-10-21, eight boots each, nife at f87c9b5c4; arm-plan-under-hvf.md). That is the ratio in force. Where it is not apples to apples: both kernels pay stage-2 switches seL4's published figures do not. Both are loop averages against the generic timer, not sel4bench's per-call PMU reads, because the guest's PMU is synthesized. seL4 carries one patched line for the guest's 8-bit ASIDs, and takes two fastpath system calls where ipc_rtt_el0 takes four. The table above is an earlier build: the same bench read 395 to 444 ns on 2026-10-21, a rise nothing has explained.

Against seL4's published pair, 413 cycles for the call and 426 for the reply, one-way each, ~839 for a round trip, the 350 ns above converts to roughly 1.1x to 1.7x. That is not a measurement of the two kernels. It sets bare-metal PMU cycles on a Jetson TX1 (Cortex-A57, 2015) against nanoseconds under HVF on an Apple M3, times a clock nothing pinned (2.75 GHz E-core to 4.05 GHz P-core). The range is that clock.

Three errors were found where one was expected, and they are the reason the original "4 to 7 times heavier" read as sober: wrong plane (kernel-side, no trap), wrong build (debug against their release), and wrong convention (our round trip against their one-way figure). Two inflate the ratio and one deflates it, so the number landed somewhere plausible by cancellation. notes/benchmarks.md carries all of it, with the four caveats that matter more than the ratio does: 2015 silicon against 2023, their fastpath on and ours nonexistent, their two system calls against our four, and an assumed clock. None of that makes this a win, and the note says so in a section headed that way.

The prediction of record, left standing

Everything under this heading is the block as it was raised on 2026-08-04, before anything was measured. It is wrong, and it is kept rather than quietly fixed. notes/benchmarks.md keeps the plausible first reading of the RISC-V map_new movement for the same reason. The record of having been confidently wrong is the useful artifact. A page that only ever shows corrected numbers teaches a reader nothing about how much to trust the next one.

It forecast 12-24x. Measured on one core against seL4 itself, the answer is about 4.6x. It was written to catch an overstatement and produced a larger one.

What the source actually says. notes/benchmarks.md:66 names a true EL0-to-EL0 benchmark as "the right follow-up" and says it "needs one CNTKCTL_EL1 bit so EL0 can read the counter". Both halves are stale. ...

The numbers, from the note.

what ns/iter (HVF, debug) what it includes
ipc_rtt (kernel-side, milestone 21) ~951 the rendezvous, no trap
ipc_rtt_el0 (EL0, the primitive suite) ~2272 two rendezvous and four svcs

And then the L4 section compares the kernel-side one anyway. It converts ~705 ns at ~3.2 GHz to ~2,200 cycles and reports us "4 to 7 times heavier" than an L4-lineage fastpath's 300 to 600. Run the same arithmetic on the number that includes the trap: ~2272 ns at ~3.2 GHz is roughly 7,300 cycles, which is 12 to 24 times an L4 fastpath, not 4 to 7. The two nanosecond figures come from different runs ... so the ratio wants one clean run rather than a subtraction across sessions, and it is not going to move the conclusion by a factor of three.

Two elisions above, both marked: the block's list of what the note already contained (answered in the table below instead) and its aside on where the 705 and 951 figures came from. Everything else is its own wording, kept because paraphrasing a retracted claim is how this same file's sibling went wrong twice (design/roadmap/0074-cycle-counters/corrections.md).

Why it was wrong, since that is the part worth carrying forward. The arithmetic is fine: 2272 ns at 3.2 GHz really is ~7,300 cycles, and ~7,300 against 300-600 really is 12 to 24. Every step is checkable and every step is right. It fixed the plane error and inherited the build error without noticing it (2272 ns is a debug figure, and the debug-to-release tax on this path is ~6.7x, measured). It inherited the convention error without noticing it either (their 300-600 is one-way). And it inherited the 3.2 GHz clock from the paragraph it was correcting. A correction that reuses its target's assumptions is not a correction. The last clause, "it is not going to move the conclusion by a factor of three", is the tell. It forecloses the result before measuring, which is the one thing a milestone whose entire deliverable is a measurement must not do.

The two stale claims, verified against the code

The block above asserted two things about the tree. Both were checked line by line on 2026-08-16, and both had been false for longer than the block was.

the claim the tree
a true EL0-to-EL0 benchmark is "the right follow-up" ipc_rtt_el0 in kernel/src/bench/el0.rs: two EL0 processes, two endpoints, a client self-timing SEND-then-RECEIVE against a server process, reported by the same function's bench: ipc_rtt_el0 line
it "needs one CNTKCTL_EL1 bit so EL0 can read the counter" the bit is set in init in kernel/src/arch/aarch64/timer.rs (EL0VCTEN, bit 1), with the RISC-V twin scounteren.TM set in init in kernel/src/arch/riscv64/timer.rs. The RISC-V write is now a whole-register write (milestone 228 (the cycle counters are closed by assumption)), not a bit set

Citations here name a symbol, not a line (§277 (cite a heading or a symbol, never a line number)), because the four line numbers this table first carried drifted until they landed on unrelated code. Re-verified against main on 2026-10-20 (UTC): both claims still hold as stated above.

The sentence those halves came from no longer exists, and that is the correction this block was still describing as pending. Commit b4178513 deleted it from notes/benchmarks.md in the same change that rewrote the calibration, so from 2026-08-04 this file was quoting a sentence that was already gone and calling it "the source". The line-number citation it used now lands in the middle of the corrected section, which is the well-formed-but-wrong failure mode script/roadmap records as invisible to it.

One caveat on the RISC-V twin, because "it was opened by milestone 19e" is too clean. The aarch64 bit was genuinely set then. The RISC-V side was documented as set and, before 2026-07-30, was not: U-mode rdtime worked only because QEMU's OpenSBI leaves the bit permitted. Firmware default, not a choice this project made, and it would have failed on a board whose firmware clears it.

Scope note

Do not delete or demote the kernel-side numbers. They are the gating instrument: icount regression tripwires run against them, and notes/benchmarks.md explains why a kernel-internal path length is the right thing for a gate and the wrong thing for a comparison. Both planes stay; only the comparison moved.

Cycles against seL4 are still arithmetic here, and no cycle ratio in this file should be quoted tighter than "same order". Every cycle figure from HVF inherits a ~1.5x uncertainty from not knowing which core type the vCPU thread ran on. radon's figure has no such uncertainty and no seL4 counterpart. The block stays PARTIAL until radon reads the round trip directly.

The remaining step is milestone 74's, not a second lane on this one. Folding it into milestone 25 was the alternative this block named, and the reason for keeping it separate is now on the record rather than open. The paragraph correction is what should not have waited for a board, and it did not.

Follow-on

Index row

On one Apple core under HVF, ipc_rtt_el0 costs 442 ns against seL4's 96 ns for Call plus ReplyRecv, about 4.6x (2026-10-21), not the 12-24x this block predicted. The 1.1x to 1.7x from seL4's published cycles crosses silicon on an assumed clock. Three errors found where one was expected, and the prediction is left standing as the record rather than quietly fixed. radon's measured clock makes ipc_rtt_el0 about 6,222 cycles on a U74, a riscv64 figure with no seL4 counterpart. The bench boot now reads the round trip in cycles directly under cycle_counter_grant; one radon boot of it closes the block (calef, 2026-10-24 UTC)