Repository navigation
Conversation
…mark pages current conditionally
|
Triage verdict — Needs changes ( Evidence
Checks and limits
Next step
This verification was AI-assisted. |
|
Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at AI-assisted (Claude Code). |
catminou4
left a comment
There was a problem hiding this comment.
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.
Copy-back writes only changed bytes + pages marked current (#721/#722) — part of a three-way split of #2000 (which fixed #721/#722/#726 in one PR): #2009 covers copy-back, #2010 covers #726's v_med3 NaN fix (shader, macOS-tested separately). Maintainer should compare #2000 vs #2009+#2010 and pick.
… only changed bytes; mark pages current conditionally
|
Automated triage for the maintainers. The targets are real (#721, #722), and the change in
What would change the verdict: regression tests for both races and a fix for the per-run write cost (or numbers showing it is fine). CI: passing ( Generated by Claude Code |
…ck as one (opt-in); copy-back timings Putting shader writes back into title memory wrote each run of the GPU's bytes with its own NtWriteVirtualMemory. With the structure builder on, a frame put back about 350 pieces holding 780,000-910,000 runs (about 2,400 per 64 KiB piece: the builder changes a few bytes here and there in each node), 248 ms a frame on an RTX 4080. VICTORY_BACK_JOIN=<n> writes runs no more than n bytes apart as one call, gaps included (title bytes read just before). With n = 256 the same frames take 1,300 calls and 1.8 ms of writing; copying back fell from 327-354 ms to 58-65 ms a frame and the frame from 849-916 ms to 502-583 ms (one run each). Unset or 0: each run alone, as before (upstream Marvisak#2009). The shortcut: a title write landing in a gap between the read and the write is lost; the relay's merge already writes whole stretches the same way. Also: a frame-rate line of the copy-back's pieces, runs, kernel writes and the time reading and merging, opening guards and writing, and of the relay's merges. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A4bpLmErkufJL3LGgfR561
|
Deterministic reproduction of the guarded copy-back race Following up on the race identified in review, a test simulates a GPU write by changing the host copy. During guarded snapshot copy-back, a test hook makes a second thread write to the tracked title page just before
Three seeds on main and two on the PR gave the same result. The other eight cases met their visibility deadlines on both builds. On #2009 the write lands after the final comparison and before the page is re-protected. That write is marked as already copied. Marking the page current requires validating its bytes after re-protection and preserving later writes, including writes through aliases. Prior review · Related earlier report Reproducer (test, test-only hook, and the one-line assertion change for this PR): https://gist.github.com/ajsem1337/551639fa596a63f63282956d42917b0c Found with AI assistance (Codex wrote the original test, Claude Code ported it to |
|
Re-ran the reproducer from the gist on b9ecb1e: the Limits: the gist's 0001 no longer applies to the changed |
Split from #2000 per review feedback (gpu-only, Windows path). #721: copy_back now writes only changed bytes. #722: page marked current only if title still matches. Builds clean; shadow tests pass.