Local master had 9 unpushed commits building block-backed DoE persistence on Artemis's own disk (FABRIC-3.md SXXXV.3/.4/.12, designed and built 2026-09-17, never pushed) that this branch never inherited after the Tripod/kernel reshuffle diverged history. Ports the mechanism cleanly onto the current Hera/Artemis/Hestia shape: - doe_region.h/.c: growable, CRC-protected trial-summary ring in Artemis's top-of-device metadata fence, immediately past log_region.c's own ceiling (devblock_from_top 98-102). Same accessor/CRC discipline as log_region.c. - log_words.c: DOE-PERSIST-TRIAL and DOE-RESUME-COUNT kernel-only FORTH words. - multiuser-doe.4th: per-ISA tagging (MU-ISA-TAG!) and campaign resume support (MU-EXEC-CAMPAIGN now takes a start-idx). - per-isa-doe.4th (new): RUN-AMD64-CAMPAIGN/RUN-AARCH64-CAMPAIGN/ RUN-RISCV64-CAMPAIGN entry points, resuming from DOE-RESUME-COUNT. - extract_doe_region.py (new): host-side reader, CRC-verified, no filesystem assumptions -- reads the ring directly off a raw disk image. Deliberately not ported: the R/LaTeX report-generation pipeline (analyse_multiuser_doe.R, multiuser_doe_report.tex, build_multiuser_doe_report.sh) -- not needed to prove persistence works, and unscoped for this pass. Verified live on all three architectures: clean boot, word_count 530->532, zero UNKNOWN WORD. amd64 and riscv64 both live-exercised end-to-end (write via DOE-PERSIST-TRIAL, count via DOE-RESUME-COUNT, clean QEMU exit, then read back correctly with extract_doe_region.py against the raw disk image -- no host serial dependency, matching the real bare-metal requirement this campaign is rehearsing for). riscv64 finding (not a defect in this port, no fix applied): DOE-PERSIST-TRIAL failed 3/3 on a first attempt against a fresh disk image with "virtio_blk: vblk_io timed out". Root cause: disk/artemis.img is a sparse file (180KB allocated of a 1GB apparent size); the new DOE region (devblock_from_top 98-102) is genuinely virgin territory on a fresh image, and riscv64's slower TCG emulation missed the existing virtio_blk spin-bound budget (already documented as fragile, FABRIC-3.md 2026-09-09) on that first cold touch. Confirmed by isolation: a plain BLOCK/UPDATE at an already-warm LBN succeeded instantly, the pre-existing LOG-ERROR" (same meta-zone mechanism, an already-warmed offset range) also succeeded, and a reboot reusing the now-partially-warmed disk let DOE-PERSIST-TRIAL succeed immediately and verify correctly on read-back. Pre-existing environmental fragility, not a logic bug in the ported address computation. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
177 lines
4.2 KiB
Forth
177 lines
4.2 KiB
Forth
Block 5044
|
|
3 CONSTANT MU-N-CONC
|
|
2 CONSTANT MU-N-MODES
|
|
MU-N-CONC MU-N-MODES * CONSTANT MU-N-CFG
|
|
63 CONSTANT MU-MAX-REPS
|
|
MU-N-CFG MU-MAX-REPS * CONSTANT MU-MAX-RUNS
|
|
CREATE MU-CONC-LEVELS 3 CELLS ALLOT
|
|
2 0 CELLS MU-CONC-LEVELS + !
|
|
4 1 CELLS MU-CONC-LEVELS + !
|
|
8 2 CELLS MU-CONC-LEVELS + !
|
|
: MU-CONC-OF ( cfg -- n ) 2 / CELLS MU-CONC-LEVELS + @ ;
|
|
: MU-MODE-OF ( cfg -- m ) 2 MOD ;
|
|
VARIABLE MU-UNIFORM-WL
|
|
8 MU-UNIFORM-WL !
|
|
|
|
Block 5045
|
|
: WL-CAPSULE ( idx -- c-addr u )
|
|
CASE
|
|
0 OF S" workload-0.4th" ENDOF
|
|
1 OF S" workload-1-lite.4th" ENDOF
|
|
2 OF S" workload-2.4th" ENDOF
|
|
3 OF S" workload-3.4th" ENDOF
|
|
4 OF S" workload-4.4th" ENDOF
|
|
5 OF S" workload-5-lite.4th" ENDOF
|
|
6 OF S" workload-6.4th" ENDOF
|
|
7 OF S" workload-7.4th" ENDOF
|
|
8 OF S" workload-8.4th" ENDOF
|
|
9 OF S" workload-9.4th" ENDOF
|
|
ENDCASE ;
|
|
|
|
Block 5046
|
|
: WL-ENTRY ( idx -- c-addr u )
|
|
CASE
|
|
0 OF S" RUN-TRANSPOSE" ENDOF
|
|
1 OF S" MICRO-BURST" ENDOF
|
|
2 OF S" RUN-SAW" ENDOF
|
|
3 OF S" DUAL-SINE" ENDOF
|
|
4 OF S" RUN-PI" ENDOF
|
|
5 OF S" CHAOS-FIELD" ENDOF
|
|
6 OF S" RUN-OMNI" ENDOF
|
|
7 OF S" RUN-MMUL" ENDOF
|
|
8 OF S" RUN-FIB" ENDOF
|
|
9 OF S" RUN-SAW" ENDOF
|
|
ENDCASE ;
|
|
|
|
Block 5047
|
|
: MU-WORKER-NAME ( n -- c-addr u )
|
|
CASE
|
|
0 OF S" mu0" ENDOF
|
|
1 OF S" mu1" ENDOF
|
|
2 OF S" mu2" ENDOF
|
|
3 OF S" mu3" ENDOF
|
|
4 OF S" mu4" ENDOF
|
|
5 OF S" mu5" ENDOF
|
|
6 OF S" mu6" ENDOF
|
|
7 OF S" mu7" ENDOF
|
|
ENDCASE ;
|
|
VARIABLE MU-TMP-NC
|
|
VARIABLE MU-TMP-NU
|
|
|
|
Block 5048
|
|
: MU-WL-FOR ( mode worker-n -- wl-idx )
|
|
SWAP IF 10 MOD ELSE DROP MU-UNIFORM-WL @ THEN ;
|
|
: MU-BIRTH-WORKER ( wl-idx worker-n -- ok? )
|
|
MU-WORKER-NAME MU-TMP-NU ! MU-TMP-NC !
|
|
WL-CAPSULE
|
|
MU-TMP-NC @ MU-TMP-NU @
|
|
WORKER-BIRTH ;
|
|
: MU-TOUCH-WORKER ( wl-idx worker-n -- )
|
|
MU-WORKER-NAME MU-TMP-NU ! MU-TMP-NC !
|
|
WL-ENTRY
|
|
MU-TMP-NC @ MU-TMP-NU @
|
|
VM-EXEC ;
|
|
|
|
Block 5049
|
|
VARIABLE MU-FAIL-COUNT
|
|
: MU-CHECK-WORKER ( worker-n -- )
|
|
MU-WORKER-NAME VM-ERROR?
|
|
IF MU-FAIL-COUNT @ 1+ MU-FAIL-COUNT ! THEN ;
|
|
: MU-KILL-WORKER ( worker-n -- )
|
|
MU-WORKER-NAME KILL ;
|
|
CREATE MU-RUN-MATRIX MU-MAX-RUNS CELLS ALLOT
|
|
: MU-MATRIX! ( val idx -- ) CELLS MU-RUN-MATRIX + ! ;
|
|
: MU-MATRIX@ ( idx -- val ) CELLS MU-RUN-MATRIX + @ ;
|
|
VARIABLE MU-N-RUNS
|
|
: MU-INIT-MATRIX ( -- ) MU-N-RUNS @ 0 DO I I MU-MATRIX! LOOP ;
|
|
CREATE MU-ISA-TAG-BUF 16 ALLOT VARIABLE MU-ISA-TAG-LEN
|
|
: MU-ISA-TAG! ( c-addr u -- )
|
|
16 MIN DUP MU-ISA-TAG-LEN !
|
|
MU-ISA-TAG-BUF SWAP CMOVE ;
|
|
|
|
Block 5050
|
|
VARIABLE MU-SW-I VARIABLE MU-SW-J
|
|
VARIABLE MU-SW-VI VARIABLE MU-SW-VJ
|
|
: MU-SWAP-MTX ( i j -- )
|
|
MU-SW-J ! MU-SW-I !
|
|
MU-SW-I @ MU-MATRIX@ MU-SW-VI !
|
|
MU-SW-J @ MU-MATRIX@ MU-SW-VJ !
|
|
MU-SW-VJ @ MU-SW-I @ MU-MATRIX!
|
|
MU-SW-VI @ MU-SW-J @ MU-MATRIX! ;
|
|
: MU-SHUFFLE ( -- )
|
|
MU-N-RUNS @ 1 - 0 DO
|
|
I MU-N-RUNS @ 1 - RANDOM
|
|
I MU-SWAP-MTX
|
|
LOOP ;
|
|
|
|
Block 5051
|
|
VARIABLE MU-RUN-ID VARIABLE MU-CFG
|
|
VARIABLE MU-REP VARIABLE MU-NW
|
|
VARIABLE MU-MODE VARIABLE MU-NREPS
|
|
: MU-EMIT-TRIAL-MARKER ( -- )
|
|
." MU-TRIAL isa=" MU-ISA-TAG-BUF MU-ISA-TAG-LEN @ TYPE
|
|
." run=" MU-RUN-ID @ .
|
|
." cfg=" MU-CFG @ .
|
|
." rep=" MU-REP @ .
|
|
." nw=" MU-NW @ .
|
|
." mode=" MU-MODE @ .
|
|
." fail=" MU-FAIL-COUNT @ . CR
|
|
MU-RUN-ID @ MU-CFG @ MU-REP @ MU-NW @
|
|
MU-MODE @ MU-FAIL-COUNT @
|
|
MU-ISA-TAG-BUF MU-ISA-TAG-LEN @ DOE-PERSIST-TRIAL ;
|
|
|
|
Block 5052
|
|
: MU-BIRTH-ALL ( -- )
|
|
MU-NW @ 0 DO
|
|
MU-MODE @ I MU-WL-FOR I MU-BIRTH-WORKER DROP
|
|
LOOP ;
|
|
: MU-TOUCH-ALL ( -- )
|
|
MU-NW @ 0 DO
|
|
MU-MODE @ I MU-WL-FOR I MU-TOUCH-WORKER
|
|
LOOP ;
|
|
: MU-CHECK-ALL ( -- )
|
|
MU-NW @ 0 DO
|
|
I MU-CHECK-WORKER
|
|
LOOP ;
|
|
|
|
Block 5053
|
|
: MU-KILL-ALL ( -- )
|
|
MU-NW @ 0 DO
|
|
I MU-KILL-WORKER
|
|
LOOP ;
|
|
: MU-RUN-TRIAL ( cfg rep run-id -- )
|
|
MU-RUN-ID ! MU-REP ! MU-CFG !
|
|
0 MU-FAIL-COUNT !
|
|
MU-CFG @ MU-CONC-OF MU-NW !
|
|
MU-CFG @ MU-MODE-OF MU-MODE !
|
|
MU-BIRTH-ALL
|
|
MU-TOUCH-ALL
|
|
MU-TOUCH-ALL
|
|
MU-CHECK-ALL
|
|
MU-KILL-ALL
|
|
MU-EMIT-TRIAL-MARKER ;
|
|
|
|
Block 5054
|
|
: MU-CAMPAIGN-STEP ( idx -- )
|
|
MU-MATRIX@
|
|
DUP MU-NREPS @ /
|
|
SWAP MU-NREPS @ MOD
|
|
MU-RUN-ID @
|
|
MU-RUN-TRIAL
|
|
MU-RUN-ID @ 1+ MU-RUN-ID ! ;
|
|
|
|
Block 5055
|
|
: MU-EXEC-CAMPAIGN ( seed n-reps start-idx -- )
|
|
>R
|
|
DUP MU-NREPS !
|
|
MU-N-CFG * MU-N-RUNS !
|
|
SEED
|
|
MU-INIT-MATRIX MU-SHUFFLE
|
|
HB-ON
|
|
R@ MU-RUN-ID !
|
|
MU-N-RUNS @ R> DO
|
|
I MU-CAMPAIGN-STEP
|
|
LOOP
|
|
HB-OFF
|
|
." MU-CAMPAIGN: complete" CR ;
|