notes

The soak supervisor: its constants and its orderings

Name: provisional. Each stem here is named for its content, and calef names files.

An appendix to notes/soak.md. It carries the reasons behind kernel/src/soak.rs: why each constant has its value, and why each step happens where it does. The tick route is tick-route.md, the census is placement-census.md, and the reboot loop's hazard and escapes are rebooting-soak.md.

Where the workload and the detection live

The workload is a user program, fixtures/src/soaker.rs, and the detection is in the kernel. The defect risk 5 produced (a receiver made Ready without a delivery) can be caused from userspace through the real system call path, so a kernel-mode stress loop would test an artifact of the test. A user program cannot assert about kernel internals, so the assertions stay in the kernel with the trace counters.

The constants

The orderings

Which builds reset the machine

The rebooting soak builds on all three architectures. Each has a real reset behind arch::reboot (SBI SRST, PSCI SYSTEM_RESET, the FADT reset register and the two legacy ports) and a real escape behind console::is_byte_waiting (the NS16550's and PL011's sticky data-ready bits). script/soak-test --reboot proves under QEMU, per architecture, that the machine came back rather than that the call returned. A build that compiled and quietly never rebooted would look like a board that drew the same placement fifty times.

The watchdog soak drives the Intel TCO on x86_64 and the JH7110's watchdog on riscv64. aarch64 has none, and a watchdog_soak_test build for it is a compile error, because a build that quietly never armed would look like a board that never wedged. Every x86_64 and riscv64 soak arms the watchdog unless it names unwatched_soak_test: "A soak should reset itself when it freezes" (calef, 2026-09-26 UTC). kernel/build.rs sets the soak_watchdog cfg, and soak.rs restates the rule as a compile error, so a build-script edit that drops the default fails the build.

Before it arms, the JH7110 path refuses twice where the TCO needs neither. The device tree must name the watchdog and its clocks. The counter must run at the rate its count was computed for, measured against the kernel's timer over a tenth of a second, spun so the window is the timer's. A counter on a gated clock reads a frozen count, and arming it would print ARMED over a timer that never fires.

BUGS