Tracking: large streaming open-world workloads (compile stalls, host memory growth, table reuse, capture and replay) #28913

Open
opened 2026-12-04 16:18:04 +00:00 by brajankw · 0 comments
brajankw commented 2026-12-04 16:18:04 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by brajankw on 2026-12-04T16:18:04Z.


This issue tracks a series of small pull requests that make AnyPS5 hold up under large streaming open-world workloads: descriptor image tables with tens of thousands of entries, about two thousand graphics and compute pipelines (some taking minutes to build), a guest address space that uses the AMM mapper window heavily, and long sessions that previously grew host memory without bound or stalled whole queues behind one compile.

Each pull request fixes or speeds up one behaviour, has its own tests, and says Part of #28913 in its description. None of them is specific to one title. Items below are the planned slices; each line is replaced with its pull request link when it opens, and large items may land as several pull requests.

Already open: #27590 (AMM ranges in a reserved window outside the guest arena), #27588, #28118, #28102, #24490, #23624, #22042, #22048.

Guest address space and write tracking

Keep guest writes visible to the texture and table caches when they land in the reserved AMM mapper window, and keep imports and snapshots correct when aliases grow.

  • fix(agc): track writes in reserved mapper windows
  • perf(agc): cache page states in the AMM mapper window
  • fix(agc): track writes over mapper-window PRT zero pages
  • perf(agc): avoid unnecessary texture proofs over mapper windows
  • feat(agc): report guest memory use within host imports
  • fix(agc): preserve live imports across alias growth
  • perf(agc): release stale CPU texture copies and private backing
  • perf(agc): release evicted host snapshot bytes
  • perf(agc): hash committed sampled pages without copying

Host memory growth

Bound what the driver keeps in host memory (recycled descriptors, draw cache, storage images, snapshot copies) and back off reclaim that frees nothing.

  • fix(agc): account for the draw cache across recipe attachment
  • fix(agc): bound recycled draw descriptors
  • perf(agc): back off when a texture reclaim frees nothing
  • fix(agc): reclaim textures against the active admission budget
  • perf(agc): keep the active storage-image working set
  • perf(agc): account for storage images held by tables
  • perf(agc): allocate only the sampled mip range
  • feat(agc): report host residency by allocation class

Image table and texture reuse

Stop rebuilding descriptor image tables and textures that a proof shows are unchanged, across collects, queues and dynamic-resolution views.

  • perf(agc): reuse image tables across queue threads
  • perf(agc): invalidate remembered tables by changed ranges
  • perf(agc): retain live entries over pending GPU writes
  • perf(agc): restore only remembered textures evicted from the cache
  • perf(agc): reserve a separate budget for large image tables
  • perf(agc): reuse tables with a compatible dynamic-resolution view
  • perf(agc): retain stable sampled views over untracked ranges
  • perf(agc): reuse image table proof results within a collect epoch
  • perf(agc): collect reusable image table ranges once
  • perf(agc): retain image table entries with unchanged DCC keys
  • perf(agc): retain partly committed sampled table textures
  • perf(shader): share image table resolutions across programs
  • perf(shader): materialize retained specialized words on demand
  • perf(shader): share runtime image modes between shader infos

Pipeline compile stalls

Keep queues and the presenter moving while long pipelines compile: build outside the GPU mutex, admit long builds within a memory budget, prebuild pipelines that the queue will need, and pause the guest clock while the host compiles.

  • perf(agc): wait on driver lock words with WaitOnAddress
  • perf(agc): index pass hazards by image handle
  • perf(agc): build graphics pipelines outside the GPU mutex
  • fix(agc): reserve host memory during background pipeline compilation
  • perf(agc): admit concurrent long pipeline builds within a byte budget
  • perf(agc): prebuild queued compute pipelines off the committer
  • fix(agc): report invalid indirect dispatch limits
  • perf(agc): skip settled empty indirect draws before preparing resources
  • perf(agc): reuse a dispatch pipeline after buffer relocation
  • feat(agc): refuse waits during speculative guest reads
  • fix(agc): fall back after a failed background compute create
  • perf(agc): prebuild pipelines for skipped empty indirect dispatches
  • fix(agc): release graphics plan marks with their owner
  • fix(libkernel): pause the guest clock through pipeline compilation
  • fix(libkernel): preserve the deadline of an unheld guest sleep

Pipeline cache, journal and compile-ahead

Make the pipeline cache and journal survive long runs and cache-key changes, record the actual translation inputs, and build the recorded pipelines before launch.

  • feat(shader): allow older disk cache keys to be retained
  • feat(agc): configure the periodic pipeline cache save interval
  • fix(agc): retry mapped cache saves after a concurrent update
  • fix(agc): clean up abandoned mapped pipeline cache saves
  • feat(agc): seed a new pipeline cache key from a compatible prior key
  • test(agc): isolate queue pipeline prebuild caches
  • test(agc): synchronize draw recipe lifetime checks
  • test(agc): benchmark journaled compute pipeline builds offline
  • feat(agc): record translation inputs independently of the cache key
  • feat(agc): verify recorded translation inputs per pipeline
  • fix(agc): bound pipeline input shutdown and persist incomplete results
  • feat(agc): warm pipeline journals in a compile-only process
  • feat(agc): retranslate pipeline inputs across cache keys
  • fix(agc): preserve rejected and failed recipes across warming generations
  • fix(agc): defer compile-only draws that carry an occlusion counter
  • feat(agc): warm bindless-heap pipelines on the compile-only device
  • fix(agc): defer attachment-dependent warmed pipeline layouts
  • fix(agc): retain the write mask in unclamped blend replay accounting

Runtime descriptor fields

Read eligible descriptor fields at run time so one module serves many descriptor variants, with exact fallbacks where device limits or layouts do not allow it.

  • feat(shader): read compute descriptor fields at run time
  • feat(shader): read eligible graphics descriptor strides at run time
  • fix(agc): fall back when a runtime graphics draw exceeds device limits
  • fix(agc): record rebuilt runtime graphics stages for replay

Bindless heap

Keep bindless heap entries correct and bounded: eviction, pending GPU producers, present-time alias refresh and sampler border classes.

  • fix(agc): bound bindless key eviction and retry
  • fix(agc): guard pending GPU producers before serving heap entries
  • fix(agc): refresh lazy heap entries across present
  • perf(agc): keep heap entries for unchanged committed ranges
  • feat(agc): support border samplers in descriptor tables
  • fix(agc): preserve sampler border classes on the bindless heap

Rendering correctness

Depth plane ownership and HTILE clears, packed 4_4_4_4 targets, narrow storage-image atomics, quad-mask restore, carried shadows and rect-list fast-launch modes.

  • fix(agc): convert storage views of widened depth planes
  • fix(agc): preserve depth plane ownership on layered stores
  • fix(agc): sample HTILE-filled depth as its clear value
  • fix(agc): propagate covering depth stores to retired plane owners
  • fix(agc): invalidate a retired depth clear when its HTILE is replaced
  • fix(agc): render packed 4_4_4_4 targets
  • fix(agc): blend packed 4_4_4_4 color targets
  • feat(agc): implement narrow storage-image atomics
  • fix(agc): invalidate carried shadows across guest aliases
  • fix(agc): schedule quad-mask restore pipelines on the draw thread
  • fix(agc): distinguish rect-list fast-launch geometry modes

Shader recompiler correctness

Descriptor indices through waterfall loops and guarded edges, outer merges across early exits, half-wave mask proofs.

  • fix(shader): resolve sampler indices through waterfall control flow
  • fix(shader): preserve descriptor bounds through guarded edges
  • fix(shader): preserve outer merges across early-exiting selections
  • fix(shader): preserve mask proofs across half-wave loop edges

Frame capture and replay

Captures that finish on abort, start while queues wait, keep mapping deltas across rewinds, and replay inside the AMM window.

  • fix(agc): finish frame captures on abort
  • fix(agc): exit replay with unfinished queue work
  • fix(agc): replay captured mappings inside the AMM window
  • fix(agc): restore replay mappings under the current runtime owner
  • feat(agc): capture mapping deltas across queue rewinds
  • fix(agc): keep replay acceptance waits out of unpaced runs
  • feat(agc): start capture while queues wait on the guest
  • test(agc): validate runtime descriptor fields against a portable probe

Diagnostics

Reports a developer can act on: GPU label writers and collisions, queue progress at flips, recorded dispatches on device loss, host residency and import use, table reuse misses, effective feature switches, pipeline identities.

  • feat(agc): report GPU label writers and collisions
  • feat(agc): report queue progress at flip boundaries
  • feat(agc): report recorded dispatches on device loss
  • feat(agc): report image table reuse misses
  • feat(agc): report the effective GPU feature switches at boot
  • feat(video-out): report scanout and host output extents
  • feat(agc): trace stable pipeline identities at first use
  • feat(agc): trace packed and actual graphics stage identities

Audio and runtime libraries

AJM decodes every packet that fits, ACM runs FFT jobs, an opt-in AudioOut2 PCM trace, crash reports and timed dumps end at their deadline, profile batches stay whole, and sleeps outside a clock hold keep their deadline.

  • fix(ajm): decode every packet that fits the batch output
  • fix(acm): execute queued FFT and inverse FFT jobs
  • feat(audioout2): trace submitted PCM through an explicit output file
  • fix(libc): end abort and timed-dump reports at the deadline
  • fix(libc): flush before collecting Windows timed-dump diagnostics
  • fix(libc): emit each profile batch as one stream write
  • test(libkernel): cover find-next within a partly mapped reservation
  • fix(tools): recognize literal SwitchOn environment reads
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:6796346166 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/28913). Originally posted by [brajankw](https://github.com/brajankw) on 2026-12-04T16:18:04Z. --- This issue tracks a series of small pull requests that make AnyPS5 hold up under large streaming open-world workloads: descriptor image tables with tens of thousands of entries, about two thousand graphics and compute pipelines (some taking minutes to build), a guest address space that uses the AMM mapper window heavily, and long sessions that previously grew host memory without bound or stalled whole queues behind one compile. Each pull request fixes or speeds up one behaviour, has its own tests, and says `Part of #28913` in its description. None of them is specific to one title. Items below are the planned slices; each line is replaced with its pull request link when it opens, and large items may land as several pull requests. Already open: #27590 (AMM ranges in a reserved window outside the guest arena), #27588, #28118, #28102, #24490, #23624, #22042, #22048. ### Guest address space and write tracking Keep guest writes visible to the texture and table caches when they land in the reserved AMM mapper window, and keep imports and snapshots correct when aliases grow. - [ ] fix(agc): track writes in reserved mapper windows <!-- P39 --> - [ ] perf(agc): cache page states in the AMM mapper window <!-- P73 --> - [ ] fix(agc): track writes over mapper-window PRT zero pages <!-- P90 --> - [ ] perf(agc): avoid unnecessary texture proofs over mapper windows <!-- P98 --> - [ ] feat(agc): report guest memory use within host imports <!-- P29 --> - [ ] fix(agc): preserve live imports across alias growth <!-- P91 --> - [ ] perf(agc): release stale CPU texture copies and private backing <!-- P81 --> - [ ] perf(agc): release evicted host snapshot bytes <!-- P100 --> - [ ] perf(agc): hash committed sampled pages without copying <!-- P103 --> ### Host memory growth Bound what the driver keeps in host memory (recycled descriptors, draw cache, storage images, snapshot copies) and back off reclaim that frees nothing. - [ ] fix(agc): account for the draw cache across recipe attachment <!-- P8 --> - [ ] fix(agc): bound recycled draw descriptors <!-- P9 --> - [ ] perf(agc): back off when a texture reclaim frees nothing <!-- P10 --> - [ ] fix(agc): reclaim textures against the active admission budget <!-- P80 --> - [ ] perf(agc): keep the active storage-image working set <!-- P41 --> - [ ] perf(agc): account for storage images held by tables <!-- P75 --> - [ ] perf(agc): allocate only the sampled mip range <!-- P11 --> - [ ] feat(agc): report host residency by allocation class <!-- P28 --> ### Image table and texture reuse Stop rebuilding descriptor image tables and textures that a proof shows are unchanged, across collects, queues and dynamic-resolution views. - [ ] perf(agc): reuse image tables across queue threads <!-- P42 --> - [ ] perf(agc): invalidate remembered tables by changed ranges <!-- P76 --> - [ ] perf(agc): retain live entries over pending GPU writes <!-- P93 --> - [ ] perf(agc): restore only remembered textures evicted from the cache <!-- P79 --> - [ ] perf(agc): reserve a separate budget for large image tables <!-- P78 --> - [ ] perf(agc): reuse tables with a compatible dynamic-resolution view <!-- P77 --> - [ ] perf(agc): retain stable sampled views over untracked ranges <!-- P94 --> - [ ] perf(agc): reuse image table proof results within a collect epoch <!-- P102 --> - [ ] perf(agc): collect reusable image table ranges once <!-- P113 --> - [ ] perf(agc): retain image table entries with unchanged DCC keys <!-- P109 --> - [ ] perf(agc): retain partly committed sampled table textures <!-- P110 --> - [ ] perf(shader): share image table resolutions across programs <!-- P43 --> - [ ] perf(shader): materialize retained specialized words on demand <!-- P44 --> - [ ] perf(shader): share runtime image modes between shader infos <!-- P45 --> ### Pipeline compile stalls Keep queues and the presenter moving while long pipelines compile: build outside the GPU mutex, admit long builds within a memory budget, prebuild pipelines that the queue will need, and pause the guest clock while the host compiles. - [ ] perf(agc): wait on driver lock words with WaitOnAddress <!-- P6 --> - [ ] perf(agc): index pass hazards by image handle <!-- P7 --> - [ ] perf(agc): build graphics pipelines outside the GPU mutex <!-- P46 --> - [ ] fix(agc): reserve host memory during background pipeline compilation <!-- P47 --> - [ ] perf(agc): admit concurrent long pipeline builds within a byte budget <!-- P82 --> - [ ] perf(agc): prebuild queued compute pipelines off the committer <!-- P83 --> - [ ] fix(agc): report invalid indirect dispatch limits <!-- P48 --> - [ ] perf(agc): skip settled empty indirect draws before preparing resources <!-- P49 --> - [ ] perf(agc): reuse a dispatch pipeline after buffer relocation <!-- P50 --> - [ ] feat(agc): refuse waits during speculative guest reads <!-- P58 --> - [ ] fix(agc): fall back after a failed background compute create <!-- P66 --> - [ ] perf(agc): prebuild pipelines for skipped empty indirect dispatches <!-- P88 --> - [ ] fix(agc): release graphics plan marks with their owner <!-- P59 --> - [ ] fix(libkernel): pause the guest clock through pipeline compilation <!-- P37 --> - [ ] fix(libkernel): preserve the deadline of an unheld guest sleep <!-- P38 --> ### Pipeline cache, journal and compile-ahead Make the pipeline cache and journal survive long runs and cache-key changes, record the actual translation inputs, and build the recorded pipelines before launch. - [ ] feat(shader): allow older disk cache keys to be retained <!-- P33 --> - [ ] feat(agc): configure the periodic pipeline cache save interval <!-- P34 --> - [ ] fix(agc): retry mapped cache saves after a concurrent update <!-- P35 --> - [ ] fix(agc): clean up abandoned mapped pipeline cache saves <!-- P36 --> - [ ] feat(agc): seed a new pipeline cache key from a compatible prior key <!-- P61 --> - [ ] test(agc): isolate queue pipeline prebuild caches <!-- P62 --> - [ ] test(agc): synchronize draw recipe lifetime checks <!-- P63 --> - [ ] test(agc): benchmark journaled compute pipeline builds offline <!-- P64 --> - [ ] feat(agc): record translation inputs independently of the cache key <!-- P56 --> - [ ] feat(agc): verify recorded translation inputs per pipeline <!-- P87 --> - [ ] fix(agc): bound pipeline input shutdown and persist incomplete results <!-- P96 --> - [ ] feat(agc): warm pipeline journals in a compile-only process <!-- P57 --> - [ ] feat(agc): retranslate pipeline inputs across cache keys <!-- P97 --> - [ ] fix(agc): preserve rejected and failed recipes across warming generations <!-- P106 --> - [ ] fix(agc): defer compile-only draws that carry an occlusion counter <!-- P107 --> - [ ] feat(agc): warm bindless-heap pipelines on the compile-only device <!-- P108 --> - [ ] fix(agc): defer attachment-dependent warmed pipeline layouts <!-- P111 --> - [ ] fix(agc): retain the write mask in unclamped blend replay accounting <!-- P112 --> ### Runtime descriptor fields Read eligible descriptor fields at run time so one module serves many descriptor variants, with exact fallbacks where device limits or layouts do not allow it. - [ ] feat(shader): read compute descriptor fields at run time <!-- P55 --> - [ ] feat(shader): read eligible graphics descriptor strides at run time <!-- P86 --> - [ ] fix(agc): fall back when a runtime graphics draw exceeds device limits <!-- P95 --> - [ ] fix(agc): record rebuilt runtime graphics stages for replay <!-- P105 --> ### Bindless heap Keep bindless heap entries correct and bounded: eviction, pending GPU producers, present-time alias refresh and sampler border classes. - [ ] fix(agc): bound bindless key eviction and retry <!-- P54 --> - [ ] fix(agc): guard pending GPU producers before serving heap entries <!-- P84 --> - [ ] fix(agc): refresh lazy heap entries across present <!-- P85 --> - [ ] perf(agc): keep heap entries for unchanged committed ranges <!-- P104 --> - [ ] feat(agc): support border samplers in descriptor tables <!-- P40 --> - [ ] fix(agc): preserve sampler border classes on the bindless heap <!-- P74 --> ### Rendering correctness Depth plane ownership and HTILE clears, packed 4_4_4_4 targets, narrow storage-image atomics, quad-mask restore, carried shadows and rect-list fast-launch modes. - [ ] fix(agc): convert storage views of widened depth planes <!-- P12 --> - [ ] fix(agc): preserve depth plane ownership on layered stores <!-- P69 --> - [ ] fix(agc): sample HTILE-filled depth as its clear value <!-- P70 --> - [ ] fix(agc): propagate covering depth stores to retired plane owners <!-- P92 --> - [ ] fix(agc): invalidate a retired depth clear when its HTILE is replaced <!-- P101 --> - [ ] fix(agc): render packed 4_4_4_4 targets <!-- P17 --> - [ ] fix(agc): blend packed 4_4_4_4 color targets <!-- P71 --> - [ ] feat(agc): implement narrow storage-image atomics <!-- P13 --> - [ ] fix(agc): invalidate carried shadows across guest aliases <!-- P18 --> - [ ] fix(agc): schedule quad-mask restore pipelines on the draw thread <!-- P51 --> - [ ] fix(agc): distinguish rect-list fast-launch geometry modes <!-- P60 --> ### Shader recompiler correctness Descriptor indices through waterfall loops and guarded edges, outer merges across early exits, half-wave mask proofs. - [ ] fix(shader): resolve sampler indices through waterfall control flow <!-- P14 --> - [ ] fix(shader): preserve descriptor bounds through guarded edges <!-- P15 --> - [ ] fix(shader): preserve outer merges across early-exiting selections <!-- P16 --> - [ ] fix(shader): preserve mask proofs across half-wave loop edges <!-- P52 --> ### Frame capture and replay Captures that finish on abort, start while queues wait, keep mapping deltas across rewinds, and replay inside the AMM window. - [ ] fix(agc): finish frame captures on abort <!-- P19 --> - [ ] fix(agc): exit replay with unfinished queue work <!-- P20 --> - [ ] fix(agc): replay captured mappings inside the AMM window <!-- P21 --> - [ ] fix(agc): restore replay mappings under the current runtime owner <!-- P22 --> - [ ] feat(agc): capture mapping deltas across queue rewinds <!-- P23 --> - [ ] fix(agc): keep replay acceptance waits out of unpaced runs <!-- P24 --> - [ ] feat(agc): start capture while queues wait on the guest <!-- P25 --> - [ ] test(agc): validate runtime descriptor fields against a portable probe <!-- P53 --> ### Diagnostics Reports a developer can act on: GPU label writers and collisions, queue progress at flips, recorded dispatches on device loss, host residency and import use, table reuse misses, effective feature switches, pipeline identities. - [ ] feat(agc): report GPU label writers and collisions <!-- P26 --> - [ ] feat(agc): report queue progress at flip boundaries <!-- P89 --> - [ ] feat(agc): report recorded dispatches on device loss <!-- P27 --> - [ ] feat(agc): report image table reuse misses <!-- P30 --> - [ ] feat(agc): report the effective GPU feature switches at boot <!-- P31 --> - [ ] feat(video-out): report scanout and host output extents <!-- P67 --> - [ ] feat(agc): trace stable pipeline identities at first use <!-- P72 --> - [ ] feat(agc): trace packed and actual graphics stage identities <!-- P99 --> ### Audio and runtime libraries AJM decodes every packet that fits, ACM runs FFT jobs, an opt-in AudioOut2 PCM trace, crash reports and timed dumps end at their deadline, profile batches stay whole, and sleeps outside a clock hold keep their deadline. - [ ] fix(ajm): decode every packet that fits the batch output <!-- P1 --> - [ ] fix(acm): execute queued FFT and inverse FFT jobs <!-- P2 --> - [ ] feat(audioout2): trace submitted PCM through an explicit output file <!-- P32 --> - [ ] fix(libc): end abort and timed-dump reports at the deadline <!-- P3 --> - [ ] fix(libc): flush before collecting Windows timed-dump diagnostics <!-- P68 --> - [ ] fix(libc): emit each profile batch as one stream write <!-- P4 --> - [ ] test(libkernel): cover find-next within a partly mapped reservation <!-- P65 --> - [ ] fix(tools): recognize literal SwitchOn environment reads <!-- P5 -->
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#28913
No description provided.