ADR-046 — A9 slot-disconnect performance delta (probe-only embed)
- Status: Accepted (compared CNTPCT pair on one boot — QEMU TCG lab measurement, not a published bench).
- Date: 2026-09-13
Context
A9 / ADR-030 prints perf: app-load ticks=<n> around the FAT /hello read + A3 map + ERET. ADR-032 removed the production A2–A4 / A9 include_bytes! path (FAT-only; smoke rejects slot: embed). The honesty ledger still had a Planned row: compare that FAT trip to the old embedded A3 trip on the same guest.
Do not restore production embed. Do not invent a percent or “faster/slower” claim. Do not switch -cpu. Keep _start at 0x4008_0000. QEMU TCG jitter is one lab — not criterion, not SPEC.
Hypotheses
| ID | Option | Notes |
|---|---|---|
| H1 (chosen) | Probe-only include_bytes! of the same OUT_DIR/hello-libctos.elf in src/slot.rs. Time map+ERET with CNTPCT → perf: embed-load ticks=<n>. Keep FAT perf: app-load. Print perf: slot-delta app=<a> embed=<b> (raw ticks). Never print slot: embed. | Honest compared pair. Production slot stays FAT-only. |
| H2 (rejected) | Restore A3 embed as a production fallback when FAT is missing. | Violates ADR-032. Smoke must keep rejecting slot: embed. |
| H3 (rejected) | Close the Planned row as non-comparable (embed removed) without measuring. | Prefer H1 when feasible. Docs-only fallback only if dual-path is unsafe. |
| H4 (rejected) | Publish a percent / “slots are free” / criterion bench. | NFR-07 forbids invented benches. |
Decision
- Production path unchanged. A9 still loads FAT
/helloonly. Serial still printsslot: fat/slot: mapped/slot: ok/perf: app-load ticks=<n>. Missing/hellois stillslot: probe missed.slot: embedmust never appear. - Probe-only embed.
src/slot.rsmayinclude_bytes!(concat!(env!("OUT_DIR"), "/hello-libctos.elf"))for measurement. Bytes must match FAT/hello/HELLO_ELF_LEN. A2–A4 (src/libctos.rs,src/loader.rs) must not embed. - Markers. After a successful FAT trip on the same boot:
perf: embed-load ticks=<n>thenperf: slot-delta app=<a> embed=<b>. Fail closed onperf: embed-load missed. No ratio percent; no “faster/slower” words on the serial line. - Smoke.
scripts/qemu-smoke.shgreps the new markers, still rejectsslot: embed, rejects A2/A3 helloinclude_bytes!, requires the slot.rs probe include, and rejectsslot-deltalines that claim percent/faster/slower. - Honesty. This is a measurement pair on QEMU
virtTCG. It is not a latency budget, not a product KPI, and not “slots are free.” Record Verified only with serial evidence on a named tip.
Consequences
- Code:
src/slot.rs(probe include + markers); smoke greps;#[test_case]that embed CNTPCT advanced and bytes match FAT. - Docs: performance.md, measure.md, honesty ledger, track-a / roadmap as needed.
- Kernel debug ELF grows by the hello ELF size (~8 KiB). That is expected for the probe.
- Isolation leftovers (PAN enable, taken SError, yank
_start, umbrella) stay Planned — unchanged by this mile.