AGC: a submission that ends in a REWIND still waits for every queued registration preparation; PPSA38500 nearly stops presenting #27705
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 videogamer10293 on 2026-11-27T04:21:52Z.
What happens
Since #6867,
Driver::Submitwaits only for the preparations of the programs a submission binds. It still waits for every queued preparation when the submission ends in aREWIND(Submission.cpp:860), because the queue worker copies the tail after theREWINDlater and nothing scans it. The debt entry "Registration preparation at submit" lists this case.PPSA38500 (content version 01.002.001) submits on queue 0 with
REWINDtails. A submission ring dump holds 16 queue-0 records: all 8 full submissions end in aREWIND, and the other 8 are their tails. The dump is the failure report of a run without the local change below, which stopped on the #27525 error. All 8 slow submit waits below areREWINDsubmissions too. The title also keeps compiling new shaders: five local runs of 300 to 420 s logged 5,375 to 9,945 shader disk cache misses each. So each of those submissions waits for the whole backlog, and presents almost stop. #6846 covers the broader gap between eager and lazy preparation on Ghost of Yōtei.Measured
Windows 10 (10.0.19045), AMD Ryzen 5 7600X, NVIDIA GeForce RTX 5070 Ti, driver 621.24. To get past its first stop, the title needs a local change that moves the AMM range 64 GiB lower (#27525). Every run below has it, and it is not committed anywhere.
ad7582bad4, 300 s. Only waits of 100 ms or more were printed, with running counters. At the last printed line (the 31.9 s wait), the counters showed 16 submit waits on the wait-for-all path and 1 on the bound-programs path. All 8 printed waits wereREWINDsubmissions whose scan was complete. A wait still running at the 300 s cap would not have printed. The run had 16 presents in its summary (17 by the[flip]counter), all in the first 34 s.APS5_LAZY_SHADER_PREPARE=1with an empty cache had 12,129.5348d022f4against a branch that scansREWINDtails (described below), 300 s each,APS5_TRACE_SUMMARY_EVERY=10, one warm cache folder shared by both:There was one run per side. Main ran first, after four earlier warm-up and trace runs on the same cache folder, branch first. With
APS5_TRACE_FRAMES=0:60and no other trace switch, 60 presents took 2,953 ms on main and 2,191 ms on the branch, and the slowest frame was 472.5 ms against 180.5 ms. Main's slowest frame is 471 ms ofDriver.WorkerWaiton the queue worker. The trace has noSubmitslice, so my reading is that the title was waiting inSubmitthen.The newest main,
c64b9d323f, has no changes inSubmission.cpp,ShaderRegistry.cpporPacketExecution.cppsince5348d022f4.The choice
The branch
perf/agc-rewind-tail-bound-wait(3405a67077) changes three things:REWINDtail after copying it and before running it, starting from the program pairs bound before theREWIND.Submitwaits only for the programs before theREWIND.That moves the wait from the submitting thread to the queue worker. CnRJay's review of #6867 warns against exactly that:
The options I see:
REWINDtails keep waiting for the whole backlog at every submit.REWINDcase from the wait for all atSubmit, and change nothing else. A program the tail binds already waits in the worker at its first use and is moved to the front then (ShaderRegistry.cpp:201). Such a wait lasts as long as that program's preparation; the debt entry names 74 s for the largest shader seen. A one-line local test of this onad7582bad4, with local print lines and a partly warm cache, had 5,496 presents in 300 s. I did not time its worker waits.Which of these is acceptable? If option 2, 3 or 4 is, I would first measure the worker waits on this title: how many there are, how often a tail's scan is incomplete, and the longest wait against the 10 s margin. Then I would open a PR. The branch also does not yet end a worker wait on shutdown or device loss, because
Driver::stopjoins the workers before it closes the preparation pool.Not covered
One machine, and one run per side for the branch comparison. Nothing was measured on a console or on other titles, and I don't know which other titles submit
REWINDtails. I have not timed the queue-worker waits of the branch or of option 2.AI-assisted: yes. Claude Code ran the title on my machine, added the local print lines, wrote the branch and drafted this issue.