agc_driver takes up to 123 s on Windows: its self-linking buffer check runs to the 1 << 26 word copy limit #22565
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 Jazeupoi on 2026-11-17T21:11:47Z.
What happens
On Windows,
agc_drivertakes 26 to 123 s and sometimes hits the 120 s ctest timeout. Almost all of that time is the self-linking check intestChainedIndirectBuffers, which waits for the driver's jump-loop copy limit. CONTRIBUTING.md asks for 30 s per test.Title, test or build step
agc_driver(agc_driver_tests,core/libs/prx/libSceAgcDriver/tests/Submit.cpp)AnyPS5 commit
main5adb7d22abwith #22373 merged. #22373 is needed only because the full Windows test build stops on #22358.System
Windows 11, AMD Ryzen 5 3400G (4 cores, 8 threads), 16 GB, NVIDIA GeForce RTX 2060 (driver 621.24), WinLibs GCC 15.2.0 r7 (
x86_64-ucrt-posix-seh), Release.Steps to reproduce
Log
Run alone on this tree, 6 runs: 39.6, 30.0, 33.4, 26.1, 103.2 and 27.0 s. In the full-suite run with
--parallel 8it timed out at 120 s.What was checked
Where the time goes. I timed each call in
main()with a local copy ofSubmit.cpp; the timing code is not part of any change.testChainedIndirectBuffersInside
testChainedIndirectBuffers, timed separately in 5 runs:expectFailureonloopPacket,Submit.cpplines 158 to 167) took 14.0 to 22.6 s.AgcDriverWaitIdle_nid_postfix.Why. The check builds a 4-word buffer whose only packet chains back to itself.
Driver::copyCommands(Execution/src/Driver/Queues/Submission.cpp:183) starts withbudget = 1 << 26words.copyLink(line 201) takes 4 words from it per pass, so the loop is rejected only after about 16.7 million passes. The run time follows that work, and on this machine it varies a lot between runs.macOS for comparison. On an Apple M4 (x86-64 Release under Rosetta 2,
maine798a424c7with #17425 and #11049), the wholeagc_drivertest took 20.7 and 24.6 s.Possible directions. These are for maintainers to choose; I have not implemented either.
copy limit.#22441 is open and changes
copySegmentandcopyLink, so a driver-side change would touch the same code.AI-assisted: yes (Claude Code)