notes

The first scaffold: what the fourth shape costs, 2026-09-05

Name: provisional. For the 2026-09-05 scaffold the parent's "What the fourth shape costs" measured. calef names files.

An appendix of can a userspace process hold a timer?. The parent keeps the shape and the three headline figures. This file keeps the scaffold's method, the tables and what the scaffold did not price. The scaffold was built and deleted on 2026-09-05.

What was already priced, and what was not

The bookkeeping was already priced and is not re-measured here. notes/timed-wait.md measured any deadline structure at one comparison per idle tick: 1.000 comparisons and 0.000 writes over 100,000 ticks for a scan and for a sorted list, and 1.004 for a wheel. It priced a per-thread deadline: u64 at zero bytes, because TCBs are page-resident with 3,352 bytes of slack. What was unpriced is the object: a new Object variant, its creation from untyped, its dispatch arm, and whether any of it lands on the IPC fastpath.

Method

A throwaway scaffold was built on 2026-09-05 and then deleted. It held:

script/test passed with it wired in (205 passed, 69 skipped, all three ISAs plus the OVMF leg) before it was removed. So the numbers are from a working system and not a half-compiled one.

The object is free in bytes

kernel/src/capability_object.rs asserts size_of::<Object>() == 24 and size_of::<Cap>() == 32 at compile time. Both assertions still hold with the variant added, because PageFrame(u64, NonZeroU64) is already the widest arm. So a Timer capability costs zero additional bytes per capability slot, zero per capability table, and zero per TCB. That is the whole of the per-thread and per-process cost.

The IPC fastpath is untouched, measured

script/fastpath-footprint, before and after, on the same machine within twenty minutes:

ISA ipc_fastpath before after system_call_entry before after delta
aarch64 7,028 7,028 1,504 1,516 +12 B (+0.8%)
riscv64 5,936 5,936 1,828 1,986 +158 B (+8.6%)
x86_64 8,122 8,122 1,637 1,733 +96 B (+5.9%)

ipc_fastpath does not move at all on any architecture, which is the number that matters: an IPC round trip fetches exactly what it fetched before.

system_call_entry moves because that half is measured flat. The decoder's own bytes are on every system call, and its other arms are not on this path. So one more Object arm in invoke is one more decode step's worth of bytes for every system call in the system, whether or not it is a timer.

The riscv64 figure is the one to argue about. 158 bytes is 8.6% of that ISA's entry set, and script/fastpath-footprint's own BUGS names this exact mechanism as an open problem (design/roadmap/0368-a-flat-entry-set-counts-bytes-no-system-call-fetches.md). Three instances were closed with #[inline(never)] in two days on 2026-09-04. Both scaffold bodies here already carry it, so this is the cost after that mitigation rather than before it.

The kernel grows by under a quarter of a per cent

Sum of symbol sizes in the release kernel (llvm-nm --print-size), before and after:

ISA before after delta
aarch64 1,009,252 1,009,990 +738 B (+0.073%)
riscv64 1,011,788 1,014,054 +2,266 B (+0.224%)
x86_64 962,936 964,322 +1,386 B (+0.144%)

That is the whole feature: object variant, two methods, retype arm, expiry table, tick hook, and the signaling call. The riscv64 figure is again the largest, for the same reason its entry set is.

What this does not price