Bound preload library workers by the number of eligible pipelines #1084
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1084"
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 ghptc on 2026-11-28T13:00:13Z.
The final stage of
victory preloadspawns a worker for every requested job. When empty partitions enterknown::make, each worker first indexes the recorded shaders. An empty early/slow list therefore creates workers with no work. A three-pipeline list with 64 requested jobs assigns an empty partition to 61 workers.Cap the worker count at the eligible pipeline count after applying the existing default and minimum. This preserves the current partition order and job selection. An empty list runs the loop zero times. The regression exercises 64 jobs with zero or three eligible pipelines, two jobs with nine, and a zero request with work available.
Reproduction and results
Use a new empty scratch directory outside the repo, with an empty input directory and fresh cache and data directories. Set VICTORY_GAME_DIR to the empty directory, and set VICTORY_CACHE_DIR and VICTORY_DATA_DIR to separate scratch directories. With Windows builds from before and after this change, run:
The pre-change executable reported 0 shaders, 0 eligible pipelines, 8 library threads and successful completion. The patched executable reported 0 shaders, 0 eligible pipelines, 0 library threads and successful completion. The isolated branch's Windows-target unit test passed under Proton.
The measured result is the number of workers for the empty list. RSS savings for populated preload caches and gameplay performance were not measured. The existing preload job-selection work in #382 changes the CLI setting. This patch is confined to the final library worker count.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ghptc on 2026-11-28T13:22:58Z.
Windows Clippy reported the same two diagnostics on this PR and its exact upstream base,
63b902f:let_and_returnin shader emission andmanual_is_multiple_ofin the shadow worker. With #957 applied locally to59bded6, both locked workspace Clippy checks passed for Windows MSVC on Rust 1.98.1, including--all-features, with-D warnings. Upstream CI logImported from trustno1-coder/VIctory-NVIDIA. Originally posted by Exopus-0x65f7ad0 on 2026-11-28T15:13:08Z.
Native Windows run of the regression (the PR ran it under Proton): native Windows 11 26300 (MSVC toolchain, Rust 1.98.1), RTX 5060 Ti;
63b902f+ this PR.cargo test --release --locked -p victory --bin victory warm::tests::library_workers_each_have_a_pipeline -- --exact→ passed.