Submit thread: fills split by bytes, journal skips writes overwritten in the same round (VICTORY_COPIES_FILLS_FAST, VICTORY_WATCH_FAST_JOURNAL) #4758
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!4758
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4757"
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?
@henriazz10 on GitHub · 2026-12-01 05:25 UTC · original
henriazz10:perf/copies-fills-watch-journal→main· +239 −18 · 4 files · 4 commits · closed without mergingWhat it changes
Two parts of the submit thread that grow with how much the title writes:
VICTORY_COPIES_FILLS_FAST=1(host/send.rs,host.rs): splits the fills by bytes instead of by count across the workers, so one large fill no longer holds the others back. TheCARDEDlookup insend_copiedis filtered to the range being sent.VICTORY_WATCH_FAST_JOURNAL=1(watch.rs,shadow.rs):Journal::noteskips theBTreeMapwrites that would be overwritten in the same round, throughPageEpochs::swap.play.rs.How it was tested
victory.log:copies and fills5.0 → 1.7 ms per frame,asking the write watch4.7 → 4.4 ms. That run also carried other switches that were later dropped; with them, frame time was −9.4 % againstv2026.11.30.03. These two switches, measured on their own sub-phases, account for about 3.6 ms of it.ci.yml:cargo build --releasepasses.cargo clippy --workspace --all-targets --locked -- -D warningsgives no new finding (it already fails onmain, in the same 3 files).cargo test --workspace --locked: 2486 pass;modules::xmem::tests::a_read_by_range_waits_only_for_a_remapping_that_meets_itfails on every branch of this set and on none of the files they touch, andhost::uav_pool::tests::host_list_uav_pool_lifecycle_retire_trim_and_info_queueonce in the full parallel run, and each passes when run alone (--exact);mainitself failshost::refresh_tests::chunked_nothing_new_with_matches_individualin the same run.cargo fmt --checkalready reports hundreds of hunks per file onmain; the new code follows the style of the code around it.Checked for overlap
AI-assisted. Neon (Gemini) wrote the change; Claude Code reviewed it, rebased it on
main, built it, ran the checks and measured it.🤖 Generated with Claude Code
@IRennie74 on GitHub · 2026-12-01 06:28 UTC · original
Some notes from reading the diff.
VICTORY_WATCH_FAST_JOURNALalso changesask_once: its join gap becomesahead_gap()instead ofAHEAD_GAP. By default that's the same 8 MiB, butVICTORY_AHEAD_GAP_KBthen sets the gap forask_oncetoo, not only for the flush path. The PR description doesn't mention this, and the switch's name doesn't suggest it. #4572 edits the sameask_onceloop and deliberately keeps the two apart (VICTORY_ASK_ONCE_GAP_KBforask_once, whileVICTORY_AHEAD_GAP_KB"continues to govern its own path"). The two will conflict there, and it's unclear which behaviour is intended. Leaving that hunk out would keep this PR to the journal.I checked the journal part and found no problem.
Journal::noteis the only writer ofWRITTEN_EPOCHSand runs under the journal's write lock, soswap's plain load-then-store is safe.asked,writesandwrites_sincealready readWRITTEN_EPOCHSwhensync_epochsis set, andnew_inwas the one reader still walkingwritten, which the PR covers. Pages pastMAX_PAGESstill go to the map, as before.For scale on a smaller CPU: on a Ryzen 5 5600X with an RTX 3060 (Series S, DLSS Performance, standing), "copies and fills" is about 4 ms and "asking the write watch" 3-4 ms of the submitting thread's roughly 47 ms. That thread is the bottleneck there. The 5.0 -> 1.7 ms here is a sub-phase figure from one run with other switches present. A frame-time A/B with only these two switches would tell how much reaches the frame.
@DoubleD17 on GitHub · 2026-12-01 10:51 UTC · original
A measurement of this PR on an 8-core CPU, in case it helps.
Setup
5fabb46ewith this PR and #4775 merged. The only conflict was theplay.rsdefaults block, where both sets were kept.--set, so the arms differ only by them:0;VICTORY_COPIES_FILLS_FAST=1andVICTORY_WATCH_FAST_JOURNAL=1, #4775's two at0.Submitting thread, per frame (the "preparing per frame, the submitting thread" line, mean of each run's 150 s):
Picture: 800 frames per arm; we looked at every frame a frame-to-frame check flagged.
Not tested:
VICTORY_AHEAD_GAP_KB/ask_once(the point raised above).AI Assisted
@korbannour578-alt on GitHub · 2026-12-01 12:05 UTC · original
Test result on an RTX 4060 Laptop 8 GB (i7-13620H 6P+4E, 32 GB RAM, NVIDIA 610.78), Series S profile, build
5fabb46e+ the warpGTAIV/VIctory-8GB small-card policy.I applied #4758 and #3958 together (one build, so I can't split the effect between them), with COPIES_FILLS_FAST, WATCH_FAST_JOURNAL, SUBMIT_SPLIT=1 and OFF_LINE=1 set.
So on this laptop it was a regression and I reverted it. Happy to test one PR at a time if that helps narrow it down.
Full laptop report: #4868
@trustno1-coder on GitHub · 2026-12-01 18:33 UTC · original
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed