Windows: since d9852df2a every frame waits out a title's 1 s frame timeout #5842
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 poonasor on 2026-10-14T13:31:03Z.
What happens
On
maine33258a64the title runs its intro at about 22 FPS up to frame ~1000, then drops to0.85-0.95 FPS and stays there. Every frame the title logs
Failure in SubmissionManagerPs5::waitForFrame with error code 0x8002003Cfollowed by an"RC2 BreadCrumbs report" whose first incomplete breadcrumb is in the main graphics queue
(
sssConvHorizontal/mainOpaque). 2,500-4,000 of these reports per run, against 25-40 on theprevious base
ce5c83953.APS5_PROFILE_GPU=1shows the GPU busy for about 1.4 s of every 10 s, with recorded batchesspanning ~2.5 s from first to last command: the work is done, but the title does not see its
completion before its own 1 s timeout.
Bisect
Reverting these two commits on top of
e33258a64restores the previous behaviour (37 FPS throughframe ~1100, 6 timeout reports in 3.5 minutes, title-stage speed identical to
ce5c83953):71da166a1fix(libc): keep resident mappings to direct memory backings on Windowsd9852df2afix(libc): track writes to singly mapped direct memory without faults on WindowsNot yet narrowed to which part of
d9852df2a; my guess is that labels the GPU writes into a singlymapped direct memory page (now private
MEM_WRITE_WATCHmemory) reach the title only on a latercopy-back instead of in place.
Setup
Windows 11 23H2, i7-7700K, RX 6700 XT (Adrenalin 25.10.45.05, amdvlk64), WinLibs GCC 15.2.0 r7,
Release. Launch:
ANYPS5_OUTPUT_4K=1 APS5_COARSE_TIMED_WAITS=1 APS5_LOOP_GUARD=200000 APS5_NO_SNAPSHOT_CHECK=1(fork-only switches off for the comparison).AI-assisted: investigated and written with Claude Code; measurements are from runs on this machine.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-14T13:33:01Z.
The two-commit revert shows a real regression, but it does not yet identify the failing change. Before changing the write-watch path, could you compare four runs on the same current base and title setup: stock; revert only
71da166a1; revert onlyd9852df2a; revert both? Please capture the per-frame timeout count and queue completion timing for each. That should distinguish the resident-mapping change from the singly-mappedMEM_WRITE_WATCH/copy-back change. If only one revert restores the prior behavior, a focused Windows regression can then exercise that specific mapping type and its GPU-written completion label.Imported from boykopovar/AnyPS5. Originally posted by poonasor on 2026-10-14T14:33:34Z.
Thanks. Same base for all runs:
maine33258a64plus my fork's workarounds for the title (fork-only speed switches off), same title setup, 240 s of the intro each withAPS5_PROFILE_GPU=1. Timeout reports are the title'sSubmissionManagerPs5::waitForFrame ... 0x8002003Clines;[gputime]lines are 10 s windows.71da166a1d9852df2a71da166a1edits coded9852df2aadds and does not apply without itBefore the frame-1000 point both stock and revert-both run at 21-33 FPS, so the difference starts at the same scene in both.
Revert only
71da166a1(d9852df2akept) dies about 70 s in with an access violation in the driver, reading0x00000011c0800000from amemcpyof a 0x1fe0000-byte texture at0x11c0000000(libSceAgcDriver.prx+0x2181c6<-+0x23ef3f<-+0x242bf3), i.e. a page of a direct-memory surface that is no longer readable. So71da166a1is a required fix ford9852df2aon this title, and the frame-timeout regression comes withd9852df2aitself.In the stock run the GPU is busy only ~14 % of the time, yet the title waits out its 1 s timeout on most frames, which fits a completion label in singly mapped direct memory reaching the CPU late. I have not instrumented label writes yet; if a specific trace switch would help, tell me which and I'll rerun.
Logs and per-run summaries: happy to attach if useful.
AI-assisted: runs and write-up with Claude Code.
Imported from boykopovar/AnyPS5. Originally posted by nikowolf123 on 2026-10-14T17:13:11Z.
@poonasor this may be the same cost as #5692. Since #5596, singly mapped direct memory on Windows is private write-watched memory. The AGC driver imports it for the GPU without an alias, and on Windows an import without an alias is compared instead of write-tracked:
decideImportWatchsetsunwatchImports, and only an aliased import stays watched. If your log has[write-watch] Windows direct host imports use comparisons, your runs take that path. #5851 (@Pipodi, still open) sends imports that hold resident direct memory through the section alias, so they stay write-tracked. Could you add it to your table?The same drop on other titles, and what #5851 does there:
[guestmem]compares ~31,000 MiB per 10 s → 0 (@SoRadGaming)22091410a: mean 10.0 presents per 10 s against 1.7 with #5688 instead, and nothing compared (@EagleBearerYS)Your stock row has the GPU busy ~14 % of the time and frames slower than 1 s (0.83-0.85 FPS). That would also fit a CPU-side cost rather than a late label, but it is a guess until the row exists.
The rows:
main(763ad20fc), stock and with #5851. Your basee33258a64predates #4878 (mine), which skips some of these compares until a write-watch mark; @oneandonlydean asked for current main on #5692 for that reason. If your title workarounds don't apply there,e33258a64with #5851 next to your stock row still answers it.git fetch https://github.com/boykopovar/AnyPS5 pull/5851/headthengit cherry-pick ddeaa32b1 2d8de2d18 22091410a. They apply without conflicts on both bases. Take all three:22091410acloses the race behind the failed APR read in Pipodi's long run with the earlier head.APS5_PROFILE_DRAW=1and the[guestmem]compare per 10 s. Its counters are running totals, so take the difference of two reports.If the timeouts stay with #5851, that would point back at the label path you suspected, and @MarcZX100's focused regression for a GPU-written completion label in singly mapped memory would be the next step.
AI-assisted: written with Claude Code; I checked #5851's diff against
importRunAtanddecideImportWatchonmain763ad20fcande33258a64and read the reports on #5851 and #5692; I rangit cherry-pickof the three commits onto763ad20fcande33258a64(both clean, andgit range-diffshows the same changes). I did not build or run the title.Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-15T00:53:53Z.
Windows data point on the mechanism, NVIDIA RTX 4070 (so not the AMD symptom itself): on ccleste (PPSA59322)
main6239ceffcbyte-compares its 4K framebuffers every frame since #5596 ([guestmem]1,032 compares, 30.2 GiB in 10 s; AGC submit 2.8–4.2 ms versus 0.7–0.8 ms onc2565f014), costing about a third of the frame rate here (73–83 FPS against 108 before #5596). Both open fixes, #6060 and #5851, bring the compares to 0 and the frame rate back (110–120 and 106 FPS). Full numbers and test results are on #6060. The single-graphics-queue path that an RX 6700 XT takes is not covered by my runs.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by poonasor on 2026-10-15T02:08:35Z.
@nikowolf123 thanks, that was it. Rows on current
mainab9a47684(contains #4878 /763ad20fc) plus my fork's workarounds for the title (fork-only speed switches off), same title setup, intro withAPS5_PROFILE_DRAW=1. My log has[write-watch] Windows direct host imports use comparisonsin both runs.mainddeaa32b1 2d8de2d18 22091410a), cold shader cachee33258a64withd9852df2a+71da166a1reverted (earlier table)The three commits applied cleanly. Before frame ~1300 every configuration runs at 33-37 FPS. With #5851,
[guestmem]totals after 420 s: compare 3353 calls / 50483 MiB / 1.4 s; read 472857 calls / 288148 MiB / 28.8 s; write-changed 4171 calls / 37412 MiB / 46.7 s. I did not see a longer first frame or a memory problem on this machine (64 GB).So #5851 removes most of the timeouts here, but this title is still at roughly 60 % of the rate it had with the two commits reverted on the older base. I have not split that remaining gap by commit;
write-changedlooks like the largest remaining CPU item in these counters. A revert ofd9852df2ano longer applies on currentmain, so I can't repeat the old reference row on the same base.AI-assisted: runs and write-up with Claude Code.