perf(agc): prefer a pooled buffer of the requested exact size #8913

Merged
Celegans12 merged 1 commit from upstream-pr/8913 into main 2026-10-27 05:18:50 +00:00
Celegans12 commented 2026-10-21 05:49:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-21T05:49:26Z.


What

The pool retains buffers by size class. When a hit's VkBuffer was made for another exact size, Buffer and DeviceBuffer destroy it and bind a new one to the same memory (BindExactBuffer). Since #6763 copies draw inputs on NVIDIA's Windows driver, each draw takes such a buffer per index or vertex range, and Take always hands out the newest slot of the class, whatever its size. In a Yōtei profile on our tree the draw commit thread spent 1.3 s per 120 s in BindExactBuffer and another 0.36 s in the destroys.

  • Take now scans the newest 64 slots of the class for one whose buffer has the requested size, and takes the newest slot as before when none does.
  • Memory class, usage and properties are the same for every slot in the list, so only the choice among equivalent slots changes; least-recently-used eviction keeps its order.

Overlaps: #8748 changes the free-list key a few lines above in Take (textual only).

Tested

  • Windows 11 Pro, MinGW-w64 GCC 15.2.0, -DBUILD_TESTING=ON, RTX 3080 Laptop, based on main 7ab4b2e561: ctest 1824/1828. The 4 failures (log_macros, log_macros_timestamps, guest_kqueue, and agc_driver_image_array_window_past_layer_limit, which doesn't compile with MinGW here) fail on main too.
  • New ExactSizeReuse case in agc_buffer_pool: with a 3000-byte and then a 4000-byte buffer released into one class, a 3000-byte request gets the first one back without a rebuild and a 4000-byte request the second. With main's BufferPool it fails: "a pooled buffer of the requested exact size was passed over for a newer one that had to be rebuilt".
  • Linux (WSL, GCC 13.3, lavapipe), CI's job on the merge with main: 1762/1782; the same 20 fail on main (WSL has no userfaultfd write watching).
  • Speed, not isolated for this PR: the only number I have comes from our own Ghost of Yōtei (PPSA26344) tree, not main, with #8911, #8912 and #8913 switched on and off together in one in-run open-world A/B (9+9 phases): 6.17 vs 5.16 presents per 10 s (paired -0.95 +- 0.20 SE) for the combined set. This PR's own counter in that run: 436k vs 253k exact-size hits, 425k vs 493k rebinds to another size. The main-vs-change summary lines, traces and trace_digest.py output for the perf label are still owed.
  • main vs this change on the same machine (RTX 3080 Laptop, driver 610.62, Windows 11), Ghost of Yōtei (PPSA26344 v1.008) title menu from the same save with no input, warm caches, interleaved runs in one session, perf-report protocol (only APS5_TRACE_FRAMES=150:60, no APS5_PROFILE_*): main a5a2c946a3 against main a5a2c946a3 + this PR. Frame p50 131.9 ms (3 runs) against 132.7 ms (2 runs), GPU busy 77.7 against 81.5 ms per present. That's inside the run-to-run spread (main's three runs: 128.2-135.1 ms), as expected for a scene that doesn't exercise this path; our open-world numbers, from our own tree, are in the comments. Traces and tools/trace_digest.py output per run: pl-main-1, pl-main-2, pl-main-3, pl-8913-1, pl-8913-2.
aps5-summary.jsonl, pl-main-3 and pl-8913-2 (the run closest to each side's mean; `title` written as `ō`, since the summary writer double-encodes it and GitHub mangles that escape)
{"commit":"a5a2c946a3a9","dirty":false,"env":{"APS5_NO_CLEAR_HAND_OVER":"1","APS5_NO_DEFERRED_SETTLES":"1","APS5_NO_PAD_INPUT":"1","APS5_NO_PIPELINE_JOURNAL":"1","APS5_NO_RESIDENT_LINEAR":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_RESOURCE_CACHE_ENTRIES":"1024","APS5_TRACE_FRAMES":"150:60"},"gpu":"NVIDIA GeForce RTX 3080 Laptop GPU","driver":"NVIDIA 610.62","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i9-11900H @ 2.50GHz","cpu_threads":16,"memory_mib":32469,"title_id":"PPSA26344","title":"Ghost of Yōtei","content_version":"01.008.000","resolution":"3840x2160","window":{"spec":"frames 150:60","first_present":150,"ms":11388.409},"presents":60,"frame_ms":{"p50":132.237,"p90":378.788,"p99":2488.458,"max":2488.458},"gpu_busy_ms_per_present":76.739,"worker_busy_pct":{"queue worker 0x0":61.336,"queue worker 0x20":12.709,"queue worker 0x52":10.897,"queue worker 0x53":12.001,"queue worker 0x30":43.438,"queue worker 0x38":50.980,"queue worker 0x48":3.931},"top_phases_ms_per_frame":{"Driver.Packet":363.867,"Shader.PrepareArtifact":329.176,"Driver.Packet.dispatch":163.759,"Driver.Packet.memory_wait":130.658,"Driver.Dispatch":116.659,"Driver.Packet.prepare_memory":46.855,"GpuMutex.wait.dispatch":32.057,"Shader.Register":29.105},"trace_dropped":false,"trace":"aps5-trace-a5a2c946a3a9-16452.json.gz"}
{"commit":"ef29bab589cf","dirty":false,"env":{"APS5_NO_CLEAR_HAND_OVER":"1","APS5_NO_DEFERRED_SETTLES":"1","APS5_NO_PAD_INPUT":"1","APS5_NO_PIPELINE_JOURNAL":"1","APS5_NO_RESIDENT_LINEAR":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_RESOURCE_CACHE_ENTRIES":"1024","APS5_TRACE_FRAMES":"150:60"},"gpu":"NVIDIA GeForce RTX 3080 Laptop GPU","driver":"NVIDIA 610.62","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i9-11900H @ 2.50GHz","cpu_threads":16,"memory_mib":32469,"title_id":"PPSA26344","title":"Ghost of Yōtei","content_version":"01.008.000","resolution":"3840x2160","window":{"spec":"frames 150:60","first_present":150,"ms":11646.443},"presents":60,"frame_ms":{"p50":132.185,"p90":393.353,"p99":2677.602,"max":2677.602},"gpu_busy_ms_per_present":79.738,"worker_busy_pct":{"queue worker 0x0":60.693,"queue worker 0x20":12.172,"queue worker 0x52":9.480,"queue worker 0x53":11.304,"queue worker 0x30":42.585,"queue worker 0x48":4.456,"queue worker 0x38":50.368},"top_phases_ms_per_frame":{"Driver.Packet":365.333,"Shader.PrepareArtifact":355.582,"Driver.Packet.dispatch":160.389,"Driver.Packet.memory_wait":127.861,"Driver.Dispatch":112.743,"Driver.Packet.prepare_memory":48.419,"GpuMutex.wait.flush":30.404,"GpuMutex.wait.dispatch":30.058},"trace_dropped":false,"trace":"aps5-trace-ef29bab589cf-21524.json.gz"}
- Not tested: AMD, Intel, console behaviour.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 3080 Laptop GPU, driver 610.62, Windows 11 Pro; lavapipe (Mesa 25.2.8, WSL Ubuntu 24.04)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4947042283 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8913). Originally posted by [Celegans12](https://github.com/Celegans12) on 2026-10-21T05:49:26Z. --- ### What The pool retains buffers by size class. When a hit's `VkBuffer` was made for another exact size, `Buffer` and `DeviceBuffer` destroy it and bind a new one to the same memory (`BindExactBuffer`). Since #6763 copies draw inputs on NVIDIA's Windows driver, each draw takes such a buffer per index or vertex range, and `Take` always hands out the newest slot of the class, whatever its size. In a Yōtei profile on our tree the draw commit thread spent 1.3 s per 120 s in `BindExactBuffer` and another 0.36 s in the destroys. - `Take` now scans the newest 64 slots of the class for one whose buffer has the requested size, and takes the newest slot as before when none does. - Memory class, usage and properties are the same for every slot in the list, so only the choice among equivalent slots changes; least-recently-used eviction keeps its order. Overlaps: #8748 changes the free-list key a few lines above in `Take` (textual only). ### Tested - Windows 11 Pro, MinGW-w64 GCC 15.2.0, `-DBUILD_TESTING=ON`, RTX 3080 Laptop, based on `main` 7ab4b2e561: ctest 1824/1828. The 4 failures (`log_macros`, `log_macros_timestamps`, `guest_kqueue`, and `agc_driver_image_array_window_past_layer_limit`, which doesn't compile with MinGW here) fail on `main` too. - New `ExactSizeReuse` case in `agc_buffer_pool`: with a 3000-byte and then a 4000-byte buffer released into one class, a 3000-byte request gets the first one back without a rebuild and a 4000-byte request the second. With `main`'s `BufferPool` it fails: "a pooled buffer of the requested exact size was passed over for a newer one that had to be rebuilt". - Linux (WSL, GCC 13.3, lavapipe), CI's job on the merge with `main`: 1762/1782; the same 20 fail on `main` (WSL has no userfaultfd write watching). - Speed, not isolated for this PR: the only number I have comes from our own Ghost of Yōtei (PPSA26344) tree, not `main`, with #8911, #8912 and #8913 switched on and off together in one in-run open-world A/B (9+9 phases): 6.17 vs 5.16 presents per 10 s (paired -0.95 +- 0.20 SE) for the combined set. This PR's own counter in that run: 436k vs 253k exact-size hits, 425k vs 493k rebinds to another size. The `main`-vs-change summary lines, traces and `trace_digest.py` output for the perf label are still owed. - `main` vs this change on the same machine (RTX 3080 Laptop, driver 610.62, Windows 11), Ghost of Yōtei (PPSA26344 v1.008) title menu from the same save with no input, warm caches, interleaved runs in one session, perf-report protocol (only `APS5_TRACE_FRAMES=150:60`, no `APS5_PROFILE_*`): `main` a5a2c946a3 against `main` a5a2c946a3 + this PR. Frame p50 131.9 ms (3 runs) against 132.7 ms (2 runs), GPU busy 77.7 against 81.5 ms per present. That's inside the run-to-run spread (`main`'s three runs: 128.2-135.1 ms), as expected for a scene that doesn't exercise this path; our open-world numbers, from our own tree, are in the comments. Traces and `tools/trace_digest.py` output per run: [pl-main-1](https://raw.githubusercontent.com/Celegans12/AnyPS5/bringup-media/traces/title-2026-10-24/pl-main-1/), [pl-main-2](https://raw.githubusercontent.com/Celegans12/AnyPS5/bringup-media/traces/title-2026-10-24/pl-main-2/), [pl-main-3](https://raw.githubusercontent.com/Celegans12/AnyPS5/bringup-media/traces/title-2026-10-24/pl-main-3/), [pl-8913-1](https://raw.githubusercontent.com/Celegans12/AnyPS5/bringup-media/traces/title-2026-10-24/pl-8913-1/), [pl-8913-2](https://raw.githubusercontent.com/Celegans12/AnyPS5/bringup-media/traces/title-2026-10-24/pl-8913-2/). <details><summary><code>aps5-summary.jsonl</code>, pl-main-3 and pl-8913-2 (the run closest to each side's mean; `title` written as `ō`, since the summary writer double-encodes it and GitHub mangles that escape)</summary> ```json {"commit":"a5a2c946a3a9","dirty":false,"env":{"APS5_NO_CLEAR_HAND_OVER":"1","APS5_NO_DEFERRED_SETTLES":"1","APS5_NO_PAD_INPUT":"1","APS5_NO_PIPELINE_JOURNAL":"1","APS5_NO_RESIDENT_LINEAR":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_RESOURCE_CACHE_ENTRIES":"1024","APS5_TRACE_FRAMES":"150:60"},"gpu":"NVIDIA GeForce RTX 3080 Laptop GPU","driver":"NVIDIA 610.62","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i9-11900H @ 2.50GHz","cpu_threads":16,"memory_mib":32469,"title_id":"PPSA26344","title":"Ghost of Yōtei","content_version":"01.008.000","resolution":"3840x2160","window":{"spec":"frames 150:60","first_present":150,"ms":11388.409},"presents":60,"frame_ms":{"p50":132.237,"p90":378.788,"p99":2488.458,"max":2488.458},"gpu_busy_ms_per_present":76.739,"worker_busy_pct":{"queue worker 0x0":61.336,"queue worker 0x20":12.709,"queue worker 0x52":10.897,"queue worker 0x53":12.001,"queue worker 0x30":43.438,"queue worker 0x38":50.980,"queue worker 0x48":3.931},"top_phases_ms_per_frame":{"Driver.Packet":363.867,"Shader.PrepareArtifact":329.176,"Driver.Packet.dispatch":163.759,"Driver.Packet.memory_wait":130.658,"Driver.Dispatch":116.659,"Driver.Packet.prepare_memory":46.855,"GpuMutex.wait.dispatch":32.057,"Shader.Register":29.105},"trace_dropped":false,"trace":"aps5-trace-a5a2c946a3a9-16452.json.gz"} ``` ```json {"commit":"ef29bab589cf","dirty":false,"env":{"APS5_NO_CLEAR_HAND_OVER":"1","APS5_NO_DEFERRED_SETTLES":"1","APS5_NO_PAD_INPUT":"1","APS5_NO_PIPELINE_JOURNAL":"1","APS5_NO_RESIDENT_LINEAR":"1","APS5_PAD_INPUT_FILE":"<path>","APS5_RESOURCE_CACHE_ENTRIES":"1024","APS5_TRACE_FRAMES":"150:60"},"gpu":"NVIDIA GeForce RTX 3080 Laptop GPU","driver":"NVIDIA 610.62","os":"Windows 10.0.26200","cpu":"11th Gen Intel(R) Core(TM) i9-11900H @ 2.50GHz","cpu_threads":16,"memory_mib":32469,"title_id":"PPSA26344","title":"Ghost of Yōtei","content_version":"01.008.000","resolution":"3840x2160","window":{"spec":"frames 150:60","first_present":150,"ms":11646.443},"presents":60,"frame_ms":{"p50":132.185,"p90":393.353,"p99":2677.602,"max":2677.602},"gpu_busy_ms_per_present":79.738,"worker_busy_pct":{"queue worker 0x0":60.693,"queue worker 0x20":12.172,"queue worker 0x52":9.480,"queue worker 0x53":11.304,"queue worker 0x30":42.585,"queue worker 0x48":4.456,"queue worker 0x38":50.368},"top_phases_ms_per_frame":{"Driver.Packet":365.333,"Shader.PrepareArtifact":355.582,"Driver.Packet.dispatch":160.389,"Driver.Packet.memory_wait":127.861,"Driver.Dispatch":112.743,"Driver.Packet.prepare_memory":48.419,"GpuMutex.wait.flush":30.404,"GpuMutex.wait.dispatch":30.058},"trace_dropped":false,"trace":"aps5-trace-ef29bab589cf-21524.json.gz"} ``` </details> - Not tested: AMD, Intel, console behaviour. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 3080 Laptop GPU, driver 610.62, Windows 11 Pro; lavapipe (Mesa 25.2.8, WSL Ubuntu 24.04) - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-21 05:49:39 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-21T05:49:39Z.


This pull request is labeled perf, so it needs the summary line of a capture on main and one with the change, from the same title, scene and machine, as the Performance report form asks. Please paste both aps5-summary.jsonl lines, attach the two traces and add the output of tools/trace_digest.py.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6309076675 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8913#issuecomment-6309076675). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-21T05:49:39Z. --- <!-- pr-labels-perf --> This pull request is labeled `perf`, so it needs the summary line of a capture on `main` and one with the change, from the same title, scene and machine, as the Performance report form asks. Please paste both `aps5-summary.jsonl` lines, attach the two traces and add the output of `tools/trace_digest.py`.
MarcZX10 commented 2026-10-21 05:52:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T05:52:52Z.

Review: COMMENTED


The Take change preserves the existing newest-slot fallback and removes only the selected slot; the regression exercises both exact sizes and checks the buffers are reused. I ran python3 tools/check_conventions.py --base upstream/main --head HEAD and git diff --check upstream/main...HEAD; both pass. I could not run agc_buffer_pool from this Linux checkout because there is no matching configured test binary here. One reporting gap: the performance result combines this PR with #8911 and #8912, while CONTRIBUTING.md and the perf-label bot ask for matched main/change trace summaries and both trace artifacts. Please attach the required artifacts or keep the quantified claim clearly scoped to the combined set.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5595486005 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8913#pullrequestreview-5595486005). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-21T05:52:52Z. **Review:** COMMENTED --- The `Take` change preserves the existing newest-slot fallback and removes only the selected slot; the regression exercises both exact sizes and checks the buffers are reused. I ran `python3 tools/check_conventions.py --base upstream/main --head HEAD` and `git diff --check upstream/main...HEAD`; both pass. I could not run `agc_buffer_pool` from this Linux checkout because there is no matching configured test binary here. One reporting gap: the performance result combines this PR with #8911 and #8912, while CONTRIBUTING.md and the perf-label bot ask for matched `main`/change trace summaries and both trace artifacts. Please attach the required artifacts or keep the quantified claim clearly scoped to the combined set.
Celegans12 commented 2026-10-21 06:18:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-21T06:18:57Z.


@MarcZX10 thanks for running the conventions check and git diff --check, and for reading the fallback path in Take.

You're right that the speed result mixed this PR with #8911 and #8912. It came from our own Yōtei tree, not main, with all three switched together. I've changed the description to say so plainly. The exact-size hits vs rebinds counts are the only part specific to this change. The main/change summary lines, both traces and trace_digest.py output are still owed. I'll attach them when I have a clean capture, but I can't promise a date.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6309477987 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8913#issuecomment-6309477987). Originally posted by [Celegans12](https://github.com/Celegans12) on 2026-10-21T06:18:57Z. --- @MarcZX10 thanks for running the conventions check and `git diff --check`, and for reading the fallback path in `Take`. You're right that the speed result mixed this PR with #8911 and #8912. It came from our own Yōtei tree, not `main`, with all three switched together. I've changed the description to say so plainly. The exact-size hits vs rebinds counts are the only part specific to this change. The `main`/change summary lines, both traces and `trace_digest.py` output are still owed. I'll attach them when I have a clean capture, but I can't promise a date.
EdouardSence commented 2026-10-21 08:45:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EdouardSence on 2026-10-21T08:45:53Z.


AMD / Linux (RX 9070 XT, RADV) A/B of #8911 + #8912 + #8913 together on ASTRO BOT: neutral there (no change, no regression). Numbers and trace digest: https://github.com/boykopovar/AnyPS5/pull/8911#issuecomment-6311878368


Tested and written by Claude (AI assistant) on a contributor's machine.
AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6311879319 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8913#issuecomment-6311879319). Originally posted by [EdouardSence](https://github.com/EdouardSence) on 2026-10-21T08:45:53Z. --- AMD / Linux (RX 9070 XT, RADV) A/B of #8911 + #8912 + #8913 together on ASTRO BOT: neutral there (no change, no regression). Numbers and trace digest: https://github.com/boykopovar/AnyPS5/pull/8911#issuecomment-6311878368 --- *Tested and written by Claude (AI assistant) on a contributor's machine.* AI-assisted: yes
Celegans12 commented 2026-10-22 09:49:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-22T09:49:31Z.


Here's this PR measured alone, as asked on #8912. Plain main can't take Ghost of Yōtei to the open world (the loading screen stops presenting after about 160 s and the game later aborts on a blend into a 10_11_11 unorm target main doesn't support), so this is our tree (our local merge with main of 2026-10-21) with only APS5_NO_EXACT_SIZE_REUSE flipped every 60 s in one run.

The result is mixed. Presents lean its way: 7.23 per 10 s with the exact-size scan vs 6.78 without, paired -0.34 +- 0.28 with it off, about 1.2 SE. But committer time per commit was a little lower with the scan off (258 vs 234 us, paired -19 +- 15 us), so the scan itself isn't free. It does what it says on the buffers: per phase about 490k pooled hits of the exact size with it on against 365k off, and rebinds to another size drop from about 733k to 476k.

I also tried a boot-scene pair on plain main, but those captures turned out to be pipeline-cold on this machine, so I'm not quoting them. Given milescoviello's point about #8888's size classes, I'd rerun this after #8888 lands rather than tune the scan now.

Details

Run pb-8913, our local merge with main 557682ca44, warm caches (NVIDIA pipeline cache readable, dictionary checked before the run), web-teshio-b save, 1,300 s cap, APS5_AB=60:APS5_NO_EXACT_SIZE_REUSE from present 760, RTX 3080 Laptop (610.62), Windows 11. B = the switch set, i.e. this PR's change off.

phases (presents: begin / settled / end; clean reports present/gputime/draw/syncwait):
  A  0     760 /    770 /    823  2/0/4/3     9.04 presents/10 s
  B  1     823 /    825 /    856  4/0/4/4     5.39 presents/10 s
  A  2     856 /    858 /    888  4/0/4/4     5.21 presents/10 s
  B  3     888 /    890 /    925  5/0/5/4     6.10 presents/10 s
  A  4     925 /    927 /    968  4/0/5/5     7.10 presents/10 s
  B  5     968 /    970 /   1011  5/0/5/5     7.05 presents/10 s
  A  6    1011 /   1013 /   1054  4/0/5/5     7.01 presents/10 s
  B  7    1054 /   1056 /   1097  4/0/5/5     7.12 presents/10 s
  A  8    1097 /   1099 /   1141  5/0/5/5     7.33 presents/10 s
  B  9    1141 /   1143 /   1185  4/0/5/5     7.27 presents/10 s
  A 10    1185 /   1187 /   1232  5/0/5/5     7.68 presents/10 s
  B 11    1232 /   1234 /   1279  5/0/5/5     7.74 presents/10 s
  A 12    1279 /   1281 /      -  3/0/4/3     unfinished

per phase mean                          A          B        B-A    B/A-1   noise: B vs neighbouring A, mean diff +- SE (SD, n)
presents/10s                         7.23       6.78      -0.45    -6.2%   -0.34 +- 0.28 (SD 0.69, n 6)
frame ms                          1421.03    1497.39     +76.36    +5.4%   +59.97 +- 57.23 (SD 140.18, n 6)
GPU busy ms/frame                  648.81     599.41     -49.40    -7.6%   -24.27 +- 28.99 (SD 71.02, n 6)
GPU idle gaps ms/frame            1185.94     904.79    -281.16   -23.7%   -155.62 +- 160.25 (SD 392.53, n 6)
committer us/commit                258.31     234.21     -24.10    -9.3%   -19.01 +- 14.77 (SD 36.18, n 6)
committer % busy                    59.06      62.67      +3.61    +6.1%   +1.61 +- 2.22 (SD 5.44, n 6)
room wait us/draw                   73.94      69.16      -4.78    -6.5%   -3.23 +- 3.27 (SD 8.02, n 6)
drain ms/10s                      1750.47    1821.55     +71.08    +4.1%   -27.16 +- 77.15 (SD 188.98, n 6)
syncwait GPU ms/10s                797.20     830.23     +33.03    +4.1%   +6.74 +- 26.30 (SD 64.42, n 6)
A total (6 phases): alloc 3.0 us/upload, lookup 13.7 us/upload; per phase: small misses 0, small-device hits/misses 113202/265, device misses 228, exact-size hits 489859, rebound 476350, held-read checks skipped 1034291, held 0
B total (6 phases): alloc 3.4 us/upload, lookup 13.5 us/upload; per phase: small misses 0, small-device hits/misses 125081/14, device misses 13, exact-size hits 364594, rebound 732772, held-read checks skipped 1230567, held 0
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6337830139 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8913#issuecomment-6337830139). Originally posted by [Celegans12](https://github.com/Celegans12) on 2026-10-22T09:49:31Z. --- Here's this PR measured alone, as asked on #8912. Plain main can't take Ghost of Yōtei to the open world (the loading screen stops presenting after about 160 s and the game later aborts on a blend into a 10_11_11 unorm target main doesn't support), so this is our tree (our local merge with main of 2026-10-21) with only `APS5_NO_EXACT_SIZE_REUSE` flipped every 60 s in one run. The result is mixed. Presents lean its way: 7.23 per 10 s with the exact-size scan vs 6.78 without, paired -0.34 +- 0.28 with it off, about 1.2 SE. But committer time per commit was a little lower with the scan off (258 vs 234 us, paired -19 +- 15 us), so the scan itself isn't free. It does what it says on the buffers: per phase about 490k pooled hits of the exact size with it on against 365k off, and rebinds to another size drop from about 733k to 476k. I also tried a boot-scene pair on plain main, but those captures turned out to be pipeline-cold on this machine, so I'm not quoting them. Given milescoviello's point about #8888's size classes, I'd rerun this after #8888 lands rather than tune the scan now. <details><summary>Details</summary> Run `pb-8913`, our local merge with main 557682ca44, warm caches (NVIDIA pipeline cache readable, dictionary checked before the run), web-teshio-b save, 1,300 s cap, `APS5_AB=60:APS5_NO_EXACT_SIZE_REUSE` from present 760, RTX 3080 Laptop (610.62), Windows 11. B = the switch set, i.e. this PR's change off. ``` phases (presents: begin / settled / end; clean reports present/gputime/draw/syncwait): A 0 760 / 770 / 823 2/0/4/3 9.04 presents/10 s B 1 823 / 825 / 856 4/0/4/4 5.39 presents/10 s A 2 856 / 858 / 888 4/0/4/4 5.21 presents/10 s B 3 888 / 890 / 925 5/0/5/4 6.10 presents/10 s A 4 925 / 927 / 968 4/0/5/5 7.10 presents/10 s B 5 968 / 970 / 1011 5/0/5/5 7.05 presents/10 s A 6 1011 / 1013 / 1054 4/0/5/5 7.01 presents/10 s B 7 1054 / 1056 / 1097 4/0/5/5 7.12 presents/10 s A 8 1097 / 1099 / 1141 5/0/5/5 7.33 presents/10 s B 9 1141 / 1143 / 1185 4/0/5/5 7.27 presents/10 s A 10 1185 / 1187 / 1232 5/0/5/5 7.68 presents/10 s B 11 1232 / 1234 / 1279 5/0/5/5 7.74 presents/10 s A 12 1279 / 1281 / - 3/0/4/3 unfinished per phase mean A B B-A B/A-1 noise: B vs neighbouring A, mean diff +- SE (SD, n) presents/10s 7.23 6.78 -0.45 -6.2% -0.34 +- 0.28 (SD 0.69, n 6) frame ms 1421.03 1497.39 +76.36 +5.4% +59.97 +- 57.23 (SD 140.18, n 6) GPU busy ms/frame 648.81 599.41 -49.40 -7.6% -24.27 +- 28.99 (SD 71.02, n 6) GPU idle gaps ms/frame 1185.94 904.79 -281.16 -23.7% -155.62 +- 160.25 (SD 392.53, n 6) committer us/commit 258.31 234.21 -24.10 -9.3% -19.01 +- 14.77 (SD 36.18, n 6) committer % busy 59.06 62.67 +3.61 +6.1% +1.61 +- 2.22 (SD 5.44, n 6) room wait us/draw 73.94 69.16 -4.78 -6.5% -3.23 +- 3.27 (SD 8.02, n 6) drain ms/10s 1750.47 1821.55 +71.08 +4.1% -27.16 +- 77.15 (SD 188.98, n 6) syncwait GPU ms/10s 797.20 830.23 +33.03 +4.1% +6.74 +- 26.30 (SD 64.42, n 6) A total (6 phases): alloc 3.0 us/upload, lookup 13.7 us/upload; per phase: small misses 0, small-device hits/misses 113202/265, device misses 228, exact-size hits 489859, rebound 476350, held-read checks skipped 1034291, held 0 B total (6 phases): alloc 3.4 us/upload, lookup 13.5 us/upload; per phase: small misses 0, small-device hits/misses 125081/14, device misses 13, exact-size hits 364594, rebound 732772, held-read checks skipped 1230567, held 0 ``` </details>
Sign in to join this conversation.
No reviewers
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!8913
No description provided.