perf(gpu): offload sweep thread and tighten reclaim lag #363
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: launcher
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
run report
security: hold
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs gpu test
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Androtim--MiniVI!363
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/363/head"
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?
@Androtim on GitHub · 2026-12-02 17:29 UTC · original
Androtim:perf/async-sweep-and-reclaim-lag→main· +203 −87 · 3 files · 1 commits · merged 2026-12-02 18:33 UTCOffloads periodic idle-memory sweeping off
victory-submitand tightens host/GPU resource reclamation latency (#276).Changes
victory-sweepworker (crates/victory-gpu/src/host/sweep.rs,host.rs)host/sweep.rs(trigger_sweep/sweep_once), running on a persistent low-priority (THREAD_PRIORITY_BELOW_NORMALon Windows)victory-sweepworker thread signaled via non-blockingtry_lock()sovictory-submitnever blocks on sweeps (VICTORY_SWEEP_ASYNC=0kill-switch restores inline sweeps).settle()pipeline drain inHost::submitwhensweep_async_on()is enabled, since evicted resources retire safely viahost::retire()or are already unused.sweep_once()incatch_unwindwith a warning trace so panics cannot kill the worker.crates/victory-gpu/src/host/sweep.rs,host.rs)bury_lag()default to16across all hosts (VICTORY_BURY_LAGoverrides) and addedlanded_lag()(default8, clamped tobury_lag(), overrideVICTORY_LANDED_LAG) forline.landedrecycling inhost::land().crates/victory-gpu/src/pool.rs)pool::RESTfrom2500 msto500 msso released texture pool pieces recycle across submissions before triggering new block allocations.Verification Gates
cargo +1.98.1-x86_64-pc-windows-gnu xtask policy->asset policy: 327 files okcargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu host::sweep::tests --locked->2 passed; 0 failedcargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu graveyard_tests --locked->3 passed; 0 failedcargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu pool::tests --locked->20 passed; 0 failed; 1 ignored(hardware timing bench)cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --locked -- -D warnings-> passcargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features diagnostics --locked -- -D warnings-> passobjdump -pon plain--releasebuild -> standard Windows system DLLs onlyPaired Plain
--releaseA/B Benchmarks (vsmain@80d3ff4,Series Xparity, DLSS Quality)ab-main/ab2-mainvsab-pr-sweep/ab2-pr-sweep):13.93 fps(14.1/13.75) ->14.23 fps(13.65/14.8,+0.30 fps)0.6/2.8(avg1.70 fps) ->1.4/5.4(avg3.40 fps)the heaps' records and what is swept:1.5–2.5 ms/f(8.10 msmax) ->0.40 msmed /0.50 msmaxwaiting for flights:9.60 msmax ->3.60 msmax;total_submean:40.53 ms->36.30 msend_heapsmax:16.10 ms->2.90 msfinal_waiting:5405/2916->2842/2952(Texture streaming healthygate: FAIL/PASS -> PASS/PASS)crashes=0across all 4 runsab-main-80d3ff4-4k-90svsab-pr-sweep-4k-90s):the heaps' records and what is swept:2.70 msmed (3.05 msmean,10.40 msmax) ->0.40 msmed (0.38 msmean,0.60 msmax)total_sub:153.80 msmed ->142.75 msmed;wait_flights:119.35 ms->96.30 msmedpool_not_made:1163->197;no_room_so_far:34500->23000;showed_another_view:21->9median_fps:6.2 fps->6.0 fps(max_draws13577->13848),crashes=0--features diagnosticsVisual Verification (diag-pr-sweep-1440p-90s, 90s 1440p)world_windows=19(max_draws=14299),crashes=0,used_max=6015 MB(over=0 MB,room_false=0.0%),final_waiting=3831,mapped_rate=0.75 ms/s(longest8.4 ms),pngs=24(lit=21/24,luma=101.58,near_black=0.06%,edge_energy=7.66,magenta=0.0%).frame-1927.png,frame-1935.png, andframe-1941.png: clean lighting, water reflections, foliage/architectural textures, and HUD text.@Androtim on GitHub · 2026-12-02 17:33 UTC · original
Architect Triage:
aaeb12f0currently conflicts withmain(after#359/#342merged intohost.rs) and has no CI run yet (checks=[]). Please rebase ontomainto resolve the conflict and trigger CI — once CI is green, we will inspect thediag-pr-sweep-1440p-90sPNGs and A/B numbers for merge!