GPU: VICTORY_BACK_QUIET=1: copy-backs of write-watched memory no longer read as title writes (#1169) #1188
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!1188
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1188"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Yorivel on GitHub · 2026-11-25 23:14 UTC · original
Yorivel:feat/back-quiet→main· +84 −4 · 1 files · 1 commits · openAI-assisted (Claude Code). Numbers and log lines only, no game data.
What
VICTORY_BACK_QUIET=1, off by default. A copy-back into private, write-watched title memory works as follows:watch::wrote_own, asput_back_own(VICTORY_BACK_OWN_VIEW) does for view memory. Every other copy holding those pages takes them again at its next refresh.put_back_owndoes.Today the copy-back's own write shows as a title write at the next asking. The copy that wrote the bytes then copies them in again and sends them back up, although it holds them already.
shadow.rssays so itself: "Our write shows as a title write at the copy's next refresh, which copies those pages once more (some dozens of MB a frame)." The read census in #1169 measured this at about 92% of the layer's touches of copied-back pages.VICTORY_BACK_OWN_VIEWalready removes it for view memory. This switch is the private-memory side of the same thing.It is hooked where the copy-back writes:
copy_back_with(per run),relay_mergeandcard_merge_relay(beforeput_back_own), andcard_merge.The shortcut it takes
A title write to one of the pages between the copy-back's write and the reset would be lost to the write-watch. The window is a few kernel calls long. The check before the write excludes pages the title had already written since the last asking. The census saw the title touch copied-back pages at 0.00-0.05 MB/s.
Measured
RTX 4090 (32-lane waves), driver 621.40, i9-14900K, 64 GB, Windows 11, Series X profile, diagnostics build. The tree is not plain
main: it is085ee7c+ #994 (with #854/#993) + #346 (with named windows declared only when marked) + #500 + #501. Structure builder on,RELAY=2and the README's speed set. Barracks after the hand-off, settled, six readings each:VICTORY_BACK_QUIET=1VICTORY_BACK_QUIET=1+VICTORY_BACK_OWN_VIEW=1The quiet path took about 45% of the copy-back stretches (377k stretches, 17 GB in that run). The rest were view memory, which
put_back_owntook (353k pages noted current). 0 exceptions in every run. A pulsing light leak under bunks and on a face with the builder on shows with and without both switches, so it is not from them.cargo test -p victory-gpu --lib shadow::: 30 passed. Not measured on plainmainor without the builder yet. Reports welcome.🤖 Generated with Claude Code
@Ym1r1710 on GitHub · 2026-11-25 23:55 UTC · original
Tried it on an RTX 5080 (Series X, fork main
6d20eed+ #690's exact copy-back from the issue, prison cell, two runs each, medians).One thing first: with #690's putback on (VICTORY_EXACT_BACK unset) none of the quiet hooks are reached, because putback::back returns before them. Same reason BACK_OWN_VIEW did nothing on that tree. So I ran it with VICTORY_EXACT_BACK=0:
So about 4 ms from the pair on the plain path here, no device loss, picture looked the same. The log said 147k stretches quiet (1.66 GB) and ~66k written the old way in both runs.
@BitWuehler on GitHub · 2026-11-26 00:01 UTC · original
Tested on Linux (GE-Proton + vkd3d-proton, RTX 5080) with
VICTORY_BACK_QUIET=1:preparingmedian dropped from122.1 msto51.2 ms(copies84.8 ms -> 31.6 ms,copying back84.4 ms -> 57.5 ms).360,448 stretches (15,537 MB)handled quietly without re-flagging title writes.Note: Log analysis and write-up were AI-assisted based on local runtime measurements.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.