watch: writes of ours into title memory go to the journal, landings too (VICTORY_NOTE_WRITES, port-7 adapted) #305
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!305
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-305"
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?
@zocram4cc on GitHub · 2026-11-26 15:19 UTC · original
zocram4cc:fix/note-writes→main· +143 −5 · 7 files · 2 commits · openWhat
Writes of ours into title memory now tell the write-watch journal, not only writes made while a submission's asking stands:
put_changedin shadow.rs);wrote()notes the journal whether or not an asking stands. Notes are exact by 4 KiB and happen after the bytes are in.VICTORY_NOTE_WRITES=0turns the new notes off, restoring the previous behaviour.Port-7 adaptation (
VICTORY_PORT_JOURNAL=1):wrote()returned early when no asking stood, counting the write as skipped, before the notes were read. That early return now also waits forVICTORY_NOTE_WRITES=0, andtold()notes through the shardedNotesused by port 7.Why
A landing between a submission's asking and the refresh of an overlapping copy was missed: the journal answered for the range without the page, and the copy kept the bytes from before. This is a correctness fix; the switch measures the cost of the extra journal notes (each note takes the journal's lock).
Originally authored as 9a1ec09 / ba77ca6 on our branches; re-applied here on
v7900/mainwith the port-7 changes above. The original author is kept.Tests
Run under Proton on commit
57c2622(one test exe,--test-threads 1, same binary for every row):watch::tests::our_writes_are_told_with_port_7_whether_or_not_an_asking_standsreplacesour_write_between_two_askings_is_copied. That test passed withVICTORY_NOTE_WRITES=0: its second asking asks the kernel, whose write-watch reports the write by itself, so the test passed on the kernel's answer, not on the notes.land::tests::a_landing_under_a_standing_asking_is_seen_by_the_refresh_after_itRed,
VICTORY_NOTE_WRITES=0(port 7 off and on): both fail.watch.rs:4058:told with none standing, port 7: falseland/tests.rs:497:the landed page is not in the journal: [] (asked 1)Green, default and
VICTORY_PORT_JOURNAL=1: both pass.watch::andland::(58 tests), port 7 off and on: 54 pass, 1 ignored (what_landing_costs), 3 fail, all Wine-only failures that also occur on upstream:holes_are_known_until_the_runtime_tells,no_mapping_is_lost_between_askers,what_is_left_alone_is_no_known_hole.Measured
No frametime numbers for this PR: it is a correctness fix, and its cost is what
VICTORY_NOTE_WRITESmeasures. Linux/Proton only measured, Windows untested.Build
cargo xwin build --profile release -p victory --target x86_64-pc-windows-msvc: passes on this branch.AI-assisted (Claude Code).
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.