Files
LithosAnanake/experiments/bare_metal/latest/amd64.csv
T
Robert Allan JamesandClaude Sonnet 5 00e657019e stadium: make VM population bound RAM-derived, not a static array of 4
Replaces STADIUM_MAX_VM_COUNT (Kconfig, hardcoded default 4) with a
boot-time computation, mirroring the pattern stadium_boot_init() already
used for the cell pool. New Kconfig STADIUM_VM_MEMORY_PERCENT (default
50): max_vm_count = (kmalloc_get_stats().free_bytes after the cell array
* STADIUM_VM_MEMORY_PERCENT / 100) / VM_MEMORY_SIZE, floored to 1, no
ceiling (population is not knowable in advance - could be 4, could be
4000). stadium_quotas and word_slots (plus stat_promotions/stat_evictions)
are now kmalloc'd to the computed count instead of declared with a macro.
New accessor stadium_max_vm_count() replaces every STADIUM_MAX_VM_COUNT
reference, including capsule_birth.c's birth-refusal gate.

Two things found and fixed along the way:

- The existing cell-pool budget was sourced from pmm_get_stats(), which
  reflects physical pages PMM hasn't handed to any subsystem yet - but
  the actual allocation is kmalloc(), which draws from the separate,
  fixed-size heap kmalloc_init() (M6) already carved out of PMM before
  stadium_boot_init() ever runs. Budgeting against PMM's leftover and
  allocating from the kmalloc heap are two different pools. Both the
  cell budget and the new VM-count budget now source from
  kmalloc_get_stats() instead.

- stadium_owner[] (which VM's quota owns each cell) was uint8_t, capped
  at 255 slots by a compile-time assert tied to the old macro. Widened
  to uint16_t (65535 slots of headroom) with a runtime clamp + log if
  the computed count ever exceeds that, since there's no ceiling anymore.

Three-arch QEMU acceptance: all clean to ok>, computed VM count genuinely
differs by actual available RAM (amd64/riscv64: 50 slots at -m 1024,
aarch64: 101 slots), Stadium conservation invariant identical across all
three (resident_sum=43691 reservoir=21845 sum=65536).
logs/20260815-080526/amd64, logs/20260815-080826/aarch64,
logs/20260815-080952/riscv64.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-15 08:11:21 -04:00

7.4 KiB

1tick_numberelapsed_nstick_interval_nscache_hits_deltabucket_hits_deltaword_executions_deltahot_word_countavg_word_heat_q48window_widthactual_window_sizepredicted_label_hitsjitter_bitsapic_tickstime_trust_q48variance_q48vm_call_depth_maxhera_heat_q48hermes_heat_q48artemis_heat_q48
2110000100000018344573173100065536006553600
3220000100000017354458258200065536006553600
4330000100000018466058258200065536006553600
544000010000001748714096000065536006553600
6550000100000015097858258200065536006553600
7660000100000015911734096000065536006553600
87700001000000188157168568500065536006553600
98800001000000214168368568500065536006553600
10990000100000021619824096000065536006553600
11101000001000000222218456756700065536006553600
12111100001000000207238673173100065536006553600
1312120000100000018926834096000065536006553600
14131300001000000221288073173100065536006553600
15141400001000000204298368568500065536006553600
16151500001000000203308273173100065536006553600
17161600001000000201328356756700065536006553600
18171700001000000190348673173100065536006553600
19181800001000000170357358258200065536006553600
20191900001000000154354073173100065536006553600
21202000001000000154353856756700065536006553600
2221210000100000015338374096000065536006553600
23222200001000000167383858258200065536006553600
24232300001000000176113768568500065536006553600
25242400001000000175102573173100065536006553600
26252500001000000196112373173100065536006553600
2726260000100000019214244096000065536006553600
28272700001000000158163068568500065536006553600
2928280000100000015817234096000065536006553600
3029290000100000016417274096000065536006553600
31303000001000000154182668568500065536006553600
3231310000100000017262558258200065536006553600
3332320000100000018092256756700065536006553600
34333300001000000145112956756700065536006553600
35343400001000000203143058258200065536006553600
36353500001000000154163673173100065536006553600
3736360000100000014418324096000065536006553600
3837370000100000014418294096000065536006553600
3938380000100000013218284096000065536006553600
4039390000100000018018244096000065536006553600
4140400000100000022023204096000065536006553600
42414100001000000215251940962400065536006553600
43424200001000000208322040962400065536006553600
44434300001000000177361940962400065536006553600
45444400001000000199422040962400065536006553600
46454500001000000223471940963000065536006553600
47464600001000000202501740966700065536006553600
484747000010000002185718409619800065536006553600
494848000010000002216020409635000065536006553600
504949000010000002256620409652800065536006553600
515050000010000002146922409669400065536006553600
525151000010000002277123409688300065536006553600
5352520000100000020871244096104300065536006553600
5453530000100000020771254096120200065536006553600
5554540000100000020071264096131900065536006553600
5655550000100000020572274096146400065536006553600
5756560000100000021173274096162000065536006553600
5857570000100000019380294096171200065536006553600
595858000010000001854614096175700065536006553600
60595900001000000817324096175700065536006553600
616060000010000005210284096175700065536006553600
626161000010000006317254096175700065536006553600
636262000010000008519244096175700065536006553600
646363000010000006820234096175700065536006553600
656464000010000003920234096175700065536006553600
666565000010000004520254096175700065536006553600
676666000010000004220294096175700065536006553600
686767000010000004720314096175700065536006553600
696868000010000004320344096175700065536006553600
706969000010000004820354096175700065536006553600
717070000010000004821384096175700065536006553600
727171000010000004422394096175700065536006553600
7372720000100000013024274096175700065536006553600
7473730000100000013426214096175700065536006553600
751100001844674407370883161600117444096004895412794951728796865536006553600
7622000010000007810740960001065536006553600
77330000100000010113740960001265536006553600
7844000010000006319840960001365536006553600
7955000010000009225840962001565536006553600
8066000010000006427840962001765536006553600
8177000010000002283284096210002165536006553600
8288000010000002563494096466002265536006553600
83990000100000025636104096722002265536006553600
8410100000100000025636114096978002365536006553600
85111100001000000256361140961234002365536006553600
86121200001000000256361240961490002465536006553600
87131300001000000256371240961746002465536006553600
88141400001000000230391240961949002665536006553600
89151500001000000256391340962204002765536006553600
90161600001000000256391440962459002765536006553600
91171700001000000256391540962713002965536006553600
92181800001000000256391540962969002965536006553600
93191900001000000256391640963224003165536016553600
94202000001000000256411740963480003165536016553600
95212100001000000256411740963736003265536016553600
96222200001000000256411840963992003265536016553600
97232300001000000256411940964096003465536016553600
98242400001000000256412040964096003465536016553600
99252500001000000256432020482048003565536016553600
100262600001000000256452120482048003665536016553600
101272700001000000256452210241024003665536016553600
102282800001000000256452310241024003765536016553600
1032929000010000002564524512512003865536016553600
1043030000010000002564524512512003865536016553600
1053131000010000002564525256256003965536016553600
1063232000010000002554526256256004165536016553600
1073333000010000002564527256256004165536016553600
1083434000010000002564527256256004365536016553600
1093535000010000002564528256256004465536016553600
1103636000010000002564529256256004465536016553600