perf(gpu): dense watch::Tracked with lock-free clean skip, sync_heaps trims, and 4x unrolled safe_changed #3105
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3105"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by qlfu on 2026-11-29T20:02:14Z.
Summary
Trims CPU overhead in
sync_heaps(watch::Tracked,watch::guard,descriptor::sync_heaps) and descriptor change scanning (safecopy::victory_safe_changed):watch::Tracked(Seen::Dense): replaces hash-map lookups on contiguous heap page ranges with direct dense indexing, plus lock-freeWRITTEN_EPOCHS.all_seenclean-round skip and skippingparts_writtenwhenguards_askedalready covers the range.watch::guardtrims: avoids dropping/re-locking whenunsureis empty and deferssoft_runsinsideif !written.is_empty().sync_heaps&draw.rstrims: skips empty guard rounds, cachesOnceLock<SyncPart>, usesguarded_relaxed, batchesmake_waiting, and reusesbatch.mirrorindraw.rs.victory_safe_changed(safecopy.rs): processes 4 descriptor records per iteration using only Windows x64 volatile registers (ymm0..ymm5), with an SEH fault-safeat4..after4 -> victory_safe_changed_tail1x fallback.Verification
cargo +1.98.1-x86_64-pc-windows-msvc clippy -p victory-gpu --lib --tests --no-deps --locked: 0 new warnings.cargo +1.98.1-x86_64-pc-windows-msvc test -p victory-gpu --lib --locked -- --test-threads=1(safecopy::,watch::,descriptor::):173/173passed.0 WARNs / 0 ERRORs):sync_heapstotal:15.39 -> 13.63 ms(Native),13.09 -> 12.68 ms(FG).sync_heapsread:5.50 -> 4.84 ms(Native),4.97 -> 4.54 ms(FG).Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by qlfu on 2026-11-30T00:12:49Z.
Rebased cleanly onto
main(41adb551), preserving upstream#2795(writes_since) and#2971(part_runs) cleanly alongside densewatch::Tracked+PageEpochs::collect_newer. Verifiedwatch::tests::(42 passed),safecopy::tests::(8 passed), and--features diagnostics.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by qlfu on 2026-11-30T12:36:49Z.
Fixed
writes_for_trackedon thepublished(from, to)fast path to returnguards_asked = falseinstead oftrue, preserving 4 KiBparts_writtengranularity forlanded_besidepages inTracked::take. Verified withwatch::tests and cleanmerge-treeagainst41adb551.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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.