perf(host): offload landed command-list recycling to victory-late-wait by default #4396
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4396"
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 Andreww2009 on 2026-11-30T19:48:17Z.
Why
In
Host::send_late(crates/victory-gpu/src/host.rs), whenVICTORY_SUBMIT_SPLIT=0(the default) andVICTORY_RELAY=2(the default), the submitting thread still synchronously calledland()andbury(...)after every submission. On a 24-thread Core Ultra 9 275HX + RTX 5080 Laptop (v2026.11.30.02/.03, 1440p Series X, DLSS Quality), resetting ~200 landed command allocators/lists inline took 2.3–3.8 ms/frame inAFTER_SENDon the critical submitting thread, even thoughvictory-late-wait(late_helper) is already spawned and poked (*poke = true; LINE_MOVED.notify_all()) by every landing inrelay_workerandsettle.Change
LATE_HELPER_UP(set withOrdering::Releaseoncelate_helperhas acquired its fence event and is entering its wait loop) andVICTORY_ASYNC_LAND(enabled by default viatoggled!, disable withVICTORY_ASYNC_LAND=0for A/B testing).helper_handles_landing(apart, relay_on, helper_up, async_on)predicate used byHost::send_lateso synchronousland()/bury()is skipped whenrelay()is active,late_helperis live, andVICTORY_ASYNC_LANDis enabled (preserving the exact inline fallback ifVICTORY_RELAY=0,VICTORY_ASYNC_LAND=0, or iflate_helperfailed to start).host::late_tests::helper_handles_landing_requires_relay_and_live_helper_unless_split.Relation to #4109
#4109 addresses the same bottleneck (
VICTORY_DEFER_LIST_RECYCLE) with a larger multi-file change (+299/-48across 6 files including newhost/post_submit.rsinstrumentation and unrelated lint cleanups). This PR offers a minimal, surgical 1-file (+39/-4) alternative strictly scoped tocrates/victory-gpu/src/host.rswith zero new modules, zero unrelated diffs, and an explicit helper-liveness atomic (LATE_HELPER_UP) before skipping inline recycling.Verification
Rust 1.98.1, pinned).cargo test -p victory-gpu --locked late_tests(5 passed, 0 failed), zero warnings incrates/victory-gpu/src/host.rs,git diff --checkclean,cargo xtask policyclean.v2026.11.30.03Release, 19 × 5 s windows, ~3,100 frames, same save & route):v2026.11.30.03(e1251c31):submit_total_med22.1 ms/frame,32.44avg /31.9med FPS,20.5low-5% FPS,224.2 msmax spike,211frames >50 ms.submit_total_med20.1 ms/frame(-2.0 ms),34.00avg /32.9med FPS,23.8low-5% FPS,137.6 msmax spike,170frames >50 ms, 0 crashes.Host::send_late,afterstarts beforerelay_wait/settle, soAFTER_SENDstill reflects anyWHY_MOST/WHY_WRITESwait whileland()/bury()itself runs off-thread.Original contribution under GPL-3.0-or-later.
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.