Files
6gbvram---16gb-ram/crates
readmet3xt-labandClaude Opus 5.5 3f55056817 Write faults open guarded blocks without the guards' lock (VICTORY_FAULT_UNLOCKED=1; off)
Of 281 ms the title's threads spent in the write-fault handler over 14
frames of play, 252 ms were waits for the guards' lock (timeline tl.190;
tl.130 and tl2's tl.185 the same): faults queued behind other faults and
behind refreshes guarding, up to 5 ms, while a fault's own work took 8
microseconds at the median.

With the switch a fault takes the block's bit in OPENING (whoever finds it
set waits up to 100 microseconds for that fault, then goes the locked
way), tells the other views of the page as written when the block is
guarded with them (ALIASED, a mirror of Guards::aliased: TOLD and BESIDE
set, PUBLISHED cleared), clears the block's PUBLISHED, sets its BESIDE,
changes the protection itself and queues the block. The next holder of
the lock settles the guards' notes before anything else (guards ->
settle). Until then the holders of the lock treat OPENING and TOLD blocks
as written and leave them as they are (guard), publish takes its bit back
if it finds one, and protect_alias does not count an OPENING block as
read-only for another view. OPENING's doc comment gives the argument.

Also: BESIDE is forgotten when the mapping of a block changes (the block
is told as written then anyway; a bit left behind kept a hole mapped at
the address from being known by its bits). asked_for! moves to switch.rs
for both files. Diagnostics: the line of the trackers' lock waits counts
faults opened under the lock (waiting, holding), without it, and those
that went the locked way after all; the fault book has What::Unlocked.

Tests: the single-thread tests whose writes fault, again with faults
that take no lock; the many-askers test with all and half the writers'
faults taking no lock; a fault settled by the next holder; what holders
do with an unsettled block; eight threads faulting on the same blocks at
once through two views; ranges of bits cleared.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-26 19:59:20 +05:30
..