fix(agc): build the pipeline journal replay at a lower thread priority #10632
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10632"
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 boykopovar/AnyPS5. Originally posted by noir39 on 2026-10-24T13:44:56Z.
What
The pipeline journal replay builds its pipelines on half the CPU threads at the title's priority. Next to a title whose job threads spin, as Demon's Souls' 13
BPE JobWorkerThreads do (#1283), those threads together leave the presenter and the queue workers without CPU time: on Windows with the defaultfifopresent mode the title stops after two presents and never goes on (#7203).On Windows the replay threads now run at
THREAD_PRIORITY_BELOW_NORMAL, so they take the CPU time the title and the driver leave. Linux keeps the replay threads at their priority: I can't build or run the Linux path here, so this PR doesn't change it.Tested
Windows 11 Pro 26200, Ryzen 9 5950X (32 threads, so 16 replay threads), RTX 3080 10 GB, NVIDIA 616.56, WinLibs GCC 15.2.0 r7.
Demon's Souls PPSA01342 v1.005 on main
5d3ab7791with and without this change (its Windows line), journal of 292 pipelines and 313 modules, default environment, presents shown in the window title:APS5_PIPELINE_JOURNAL_THREADS=2APS5_NO_PIPELINE_JOURNAL=1APS5_THREAD_PRIORITY=highThe wait at two presents for the first minute is in every row and is not changed here. This is a fix of a stall, not a speed claim, so there are no trace summaries.
Focused tests on
main(6cd36e651) and on this PR from the same machine and GPU,ctest --test-dir build -R pipeline_journal -VwithANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation(Vulkan SDK 1.4.363.0;VK_LOADER_DEBUG=layershows the layer inserted):agc_driver_pipeline_journal,agc_pipeline_journal,agc_pipeline_journal_long_pathsandagc_pipeline_journal_extended_pathspass on both, neither log haswas not found but was requested by env var VK_INSTANCE_LAYERS, and neither has aVUID-message.Checklist
main; no other open PR implements the same functions (tools/pr_overlap.py: ten open PRs touchPipelineJournal.cpp, none the replay threads' priority)NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T13:47:04Z.
Review: CHANGES_REQUESTED
Two items block a complete review at head
65b261b9de90b9089843d1693b8c0dc40ebeb308:conventionscheck fails because the PR body is missing the required template sectionsWhat,Tested, andChecklist. The failing job reports those three errors. Please copy the repository PR template and retain/fill its required fields and checklist.getpriority/setprioritypath, but the report says that branch was not compiled or run. Please compile and run the focused pipeline-journal test(s) on Linux.AGENTS.mdalso requires AGC focused tests withANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1, andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, with main/change logs checked for missing validation-layer and newVUID-messages. Please report those results or clearly identify any environment limitation.The Windows measurements are useful evidence for the starvation scenario, but they do not validate the new Linux-specific system-call path or satisfy the repository's required PR-body and AGC test checks. I have not run the PR's native tests locally.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T14:07:29Z.
Review: APPROVED
Re-reviewed exact head
21d956616667d96ae524381df591f4e5277c08d0. The Linux priority path has been removed, so my prior request for Linux compilation/testing no longer applies. The PR now limits the behavior to Windows, appliesTHREAD_PRIORITY_BELOW_NORMALat the start of each replay worker, logs a failure without aborting pipeline replay, and the required PR template/conventions check now passes. The author reports the focusedpipeline_journalsuite passing on bothmainand this head with Vulkan validation enabled on the same Windows 11 / RTX 3080 setup, with no missing-layer warning orVUID-output, plus the Demon's Souls stall reproduction recovering from 2 to 345 presents by 100 seconds. I did not independently reproduce those Windows/GPU runs; Linux code is unchanged. I found no remaining blocker.