fix(agc): give small device-local buffers a pool tier of their own #8912

Merged
Celegans12 merged 2 commits from upstream-pr/8912 into main 2026-11-15 02:21:34 +00:00
Celegans12 commented 2026-10-21 05:49:10 +00:00 (Migrated from github.com)

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


What

#7056 moved device-local buffers under 1 MiB out of the device tier into the small tier, so the large device buffers' churn stops evicting them. But the small tier's 64 MiB budget is also what the small host buffers live in, so now those two evict each other: every small device miss is a dedicated vkAllocateMemory and every eviction a vkFreeMemory on the draw commit thread. In Yōtei on our tree, after we merged #7056 the small tier had 2.5x the misses of our previous build (492k vs 192k).

  • Small device-local buffers get their own tier (smallDeviceTier) with a budget of max(64 MiB, device tier budget / 8), on top of the device tier's. They get back the device tier's next-class search they had before #7056. The large device buffers and the small host buffers no longer evict them, and they don't evict those.
  • Each tier's slot bound goes from a sixth to an eighth of maxMemoryAllocationCount, so four tiers still leave half of it free; the header comment that described three tiers is gone.
  • APS5_BUFFER_POOL_SHARED still puts every device buffer in the device tier. trim and the destructor cover the new tier, and the [bufferpool] line reports it.

This is a retention fix, not a speed claim: no frame-rate gain was measured (an in-run switch comparison on our own tree found none significant).

Overlaps: #8748 and #11920 have merged, and the branch carries both. #8672's idle reclaim and #4472's VRAM rule walk only the device tier, so small device buffers stay out of their reach, as they are on main today.

Tested

  • 2026-11-13, the same change as one commit on main b4a82720a8: Windows 11, MinGW-w64 GCC 15.2.0, Release, -DBUILD_TESTING=ON, RTX 3080 Laptop with Vulkan validation 1.4.363 loaded: agc_buffer_pool (with SmallDeviceOwnTier), agc_buffer_pool_small_device_shared, agc_buffer_pool_small_device_no_staging, agc_image_memory, the memory-accounting and pooled-buffer-range tests: 10/10, three times, no VUIDs.
  • New SmallDeviceOwnTier case in agc_buffer_pool: a released 256 KiB device buffer survives 80 MiB of small host buffer churn and is reused without an allocation. With main's BufferPool of 10-21 it failed: "small host buffer churn evicted a retained small device buffer".
  • Earlier, on main 7ab4b2e561: ctest 1824/1828 on Windows (the 4 failures fail on main too); Linux (WSL, GCC 13.3, lavapipe), CI's job on the merge with main: 1762/1782, the same 20 fail on main.
  • Not tested: the current merge head on Linux, 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, Windows 11 Pro; lavapipe (Mesa 25.2.8, WSL Ubuntu 24.04)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4947040171 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8912). Originally posted by [Celegans12](https://github.com/Celegans12) on 2026-10-21T05:49:10Z. --- ### What #7056 moved device-local buffers under 1 MiB out of the device tier into the small tier, so the large device buffers' churn stops evicting them. But the small tier's 64 MiB budget is also what the small host buffers live in, so now those two evict each other: every small device miss is a dedicated `vkAllocateMemory` and every eviction a `vkFreeMemory` on the draw commit thread. In Yōtei on our tree, after we merged #7056 the small tier had 2.5x the misses of our previous build (492k vs 192k). - Small device-local buffers get their own tier (`smallDeviceTier`) with a budget of max(64 MiB, device tier budget / 8), on top of the device tier's. They get back the device tier's next-class search they had before #7056. The large device buffers and the small host buffers no longer evict them, and they don't evict those. - Each tier's slot bound goes from a sixth to an eighth of `maxMemoryAllocationCount`, so four tiers still leave half of it free; the header comment that described three tiers is gone. - `APS5_BUFFER_POOL_SHARED` still puts every device buffer in the device tier. `trim` and the destructor cover the new tier, and the `[bufferpool]` line reports it. This is a retention fix, not a speed claim: no frame-rate gain was measured (an in-run switch comparison on our own tree found none significant). Overlaps: #8748 and #11920 have merged, and the branch carries both. #8672's idle reclaim and #4472's VRAM rule walk only the device tier, so small device buffers stay out of their reach, as they are on `main` today. ### Tested - 2026-11-13, the same change as one commit on `main` b4a82720a8: Windows 11, MinGW-w64 GCC 15.2.0, Release, `-DBUILD_TESTING=ON`, RTX 3080 Laptop with Vulkan validation 1.4.363 loaded: `agc_buffer_pool` (with `SmallDeviceOwnTier`), `agc_buffer_pool_small_device_shared`, `agc_buffer_pool_small_device_no_staging`, `agc_image_memory`, the memory-accounting and pooled-buffer-range tests: 10/10, three times, no VUIDs. - New `SmallDeviceOwnTier` case in `agc_buffer_pool`: a released 256 KiB device buffer survives 80 MiB of small host buffer churn and is reused without an allocation. With `main`'s `BufferPool` of 10-21 it failed: "small host buffer churn evicted a retained small device buffer". - Earlier, on `main` 7ab4b2e561: ctest 1824/1828 on Windows (the 4 failures fail on `main` too); Linux (WSL, GCC 13.3, lavapipe), CI's job on the merge with `main`: 1762/1782, the same 20 fail on `main`. - Not tested: the current merge head on Linux, 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, 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:23 +00:00 (Migrated from github.com)

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


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:6309073143 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8912#issuecomment-6309073143). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-21T05:49:23Z. --- <!-- 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 06:00:52 +00:00 (Migrated from github.com)

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


I reviewed the new tier selection, budget/slot bound, and trim/destructor coverage; the focused SmallDeviceOwnTier test targets the eviction this change is meant to prevent. I could not run agc_buffer_pool locally from this checkout. One evidence gap remains: the performance A/B in the description turns #8911, #8912, and #8913 on/off as a group, so it does not isolate this tier’s effect. The perf-label check also asks for matched main/change captures, both summary lines, trace artifacts, and trace_digest.py output. Please attach those or keep the performance claim scoped to the combined set.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6309223889 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8912#issuecomment-6309223889). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-21T06:00:52Z. --- I reviewed the new tier selection, budget/slot bound, and trim/destructor coverage; the focused `SmallDeviceOwnTier` test targets the eviction this change is meant to prevent. I could not run `agc_buffer_pool` locally from this checkout. One evidence gap remains: the performance A/B in the description turns #8911, #8912, and #8913 on/off as a group, so it does not isolate this tier’s effect. The perf-label check also asks for matched `main`/change captures, both summary lines, trace artifacts, and `trace_digest.py` output. Please attach those or keep the performance claim scoped to the combined set.
Celegans12 commented 2026-10-21 06:18:56 +00:00 (Migrated from github.com)

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


@MarcZX10 thanks for going through the tier selection, the slot bound and the trim/destructor coverage. Good to hear SmallDeviceOwnTier reads as aimed at the right eviction.

Fair point on the A/B: it toggled #8911, #8912 and this PR as a group, on our own Yōtei tree rather than main, so it doesn't isolate the tier. I've rescoped the speed line to the combined set and kept only this tier's own hit/miss counts as PR-specific. The matched main/change captures with summary lines, traces and trace_digest.py output are still owed. I'll post them here once I can run them, but I don't have a date yet.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6309477646 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8912#issuecomment-6309477646). Originally posted by [Celegans12](https://github.com/Celegans12) on 2026-10-21T06:18:56Z. --- @MarcZX10 thanks for going through the tier selection, the slot bound and the trim/destructor coverage. Good to hear `SmallDeviceOwnTier` reads as aimed at the right eviction. Fair point on the A/B: it toggled #8911, #8912 and this PR as a group, on our own Yōtei tree rather than `main`, so it doesn't isolate the tier. I've rescoped the speed line to the combined set and kept only this tier's own hit/miss counts as PR-specific. The matched `main`/change captures with summary lines, traces and `trace_digest.py` output are still owed. I'll post them here once I can run them, but I don't have a date yet.
EdouardSence commented 2026-10-21 08:45:51 +00:00 (Migrated from github.com)

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


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:6311878721 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8912#issuecomment-6311878721). Originally posted by [EdouardSence](https://github.com/EdouardSence) on 2026-10-21T08:45:51Z. --- 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
CnRJay commented 2026-10-21 18:05:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-10-21T18:05:55Z.

Review: COMMENTED


Each of these pool changes is small and the reasoning is sound (small device-local buffers evicting small host buffers out of one 64 MiB tier; a hit whose VkBuffer has another exact size paying a destroy and bind). The problem is the set.

  • #8911, #8912 and #8913 are measured "together in one in-run open-world A/B (9+9 phases): 6.17 vs 5.16 presents per 10 s", on the author's own Ghost of Yotei tree, not on main, and "not isolated for this PR". The three cannot be told apart, so none of them is shown to pay for itself, and a regression in one would be hidden by gains in the others.
  • At least four more open PRs change the same pool tiers and free list: #8748 (keep host-placed device buffers for reuse), #8888 (size classes for large host buffers), #8672 (reclaim idle device buffers under cache pressure) and #8913 (this series). #8913 itself says it overlaps #8748's free-list change. They conflict textually and, more importantly, interact: a size-class change in #8888 changes what #8913's exact-size scan finds, and a separate small tier changes what #8672 reclaims.
  • Please agree an order with the other authors and measure each step against the previous one on the same scene, summary lines of main and each PR, no APS5_PROFILE_*. Until then the maintainers cannot tell which of the five is the one that helps, and a pool tuned by five independent heuristics is hard to reason about when the next title's churn pattern differs.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5604097645 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8912#pullrequestreview-5604097645). Originally posted by [CnRJay](https://github.com/CnRJay) on 2026-10-21T18:05:55Z. **Review:** COMMENTED --- Each of these pool changes is small and the reasoning is sound (small device-local buffers evicting small host buffers out of one 64 MiB tier; a hit whose `VkBuffer` has another exact size paying a destroy and bind). The problem is the set. - #8911, #8912 and #8913 are measured "together in one in-run open-world A/B (9+9 phases): 6.17 vs 5.16 presents per 10 s", on the author's own Ghost of Yotei tree, not on `main`, and "not isolated for this PR". The three cannot be told apart, so none of them is shown to pay for itself, and a regression in one would be hidden by gains in the others. - At least four more open PRs change the same pool tiers and free list: #8748 (keep host-placed device buffers for reuse), #8888 (size classes for large host buffers), #8672 (reclaim idle device buffers under cache pressure) and #8913 (this series). #8913 itself says it overlaps #8748's free-list change. They conflict textually and, more importantly, interact: a size-class change in #8888 changes what #8913's exact-size scan finds, and a separate small tier changes what #8672 reclaims. - Please agree an order with the other authors and measure each step against the previous one on the same scene, summary lines of main and each PR, no `APS5_PROFILE_*`. Until then the maintainers cannot tell which of the five is the one that helps, and a pool tuned by five independent heuristics is hard to reason about when the next title's churn pattern differs.
Celegans12 commented 2026-10-21 20:33:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Celegans12 on 2026-10-21T20:33:29Z.


You're right about the set. The 6.17 vs 5.16 A/B toggled #8911, #8912 and #8913 together on our own Yōtei tree, so it can't show that any single one of them pays for itself. And the five pool PRs touch the same tiers and free list, so they interact.

Here's an order I'd suggest, for @LeandroLP23, @milescoviello and @eliasbruno124-dev to weigh in on:

  1. #8748, since #8913 already overlaps its free-list change;
  2. #8888, whose size classes change what #8913's exact-size scan finds;
  3. #8912, the small device-local tier;
  4. #8913, rebased onto the first two;
  5. #8672 last, so it reclaims from the tiers as they end up.

#8911 doesn't touch the pool (it skips the queued-draw read check when a storage flush stores nothing), so it can be measured on its own at any point. If any of you would rather go in a different order, I'm happy to rebase ours around it.

For our three, I'll measure each one alone against main on Ghost of Yōtei in the open world, with the summary lines of both builds and no APS5_PROFILE_*, and post the numbers on each PR. Those runs are queued behind other work on our machine, so I can't give a date yet. Until then I'd treat the earlier combined A/B as a hint, not evidence.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6325928200 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8912#issuecomment-6325928200). Originally posted by [Celegans12](https://github.com/Celegans12) on 2026-10-21T20:33:29Z. --- You're right about the set. The 6.17 vs 5.16 A/B toggled #8911, #8912 and #8913 together on our own Yōtei tree, so it can't show that any single one of them pays for itself. And the five pool PRs touch the same tiers and free list, so they interact. Here's an order I'd suggest, for @LeandroLP23, @milescoviello and @eliasbruno124-dev to weigh in on: 1. #8748, since #8913 already overlaps its free-list change; 2. #8888, whose size classes change what #8913's exact-size scan finds; 3. #8912, the small device-local tier; 4. #8913, rebased onto the first two; 5. #8672 last, so it reclaims from the tiers as they end up. #8911 doesn't touch the pool (it skips the queued-draw read check when a storage flush stores nothing), so it can be measured on its own at any point. If any of you would rather go in a different order, I'm happy to rebase ours around it. For our three, I'll measure each one alone against `main` on Ghost of Yōtei in the open world, with the summary lines of both builds and no `APS5_PROFILE_*`, and post the numbers on each PR. Those runs are queued behind other work on our machine, so I can't give a date yet. Until then I'd treat the earlier combined A/B as a hint, not evidence.
milescoviello commented 2026-10-21 20:54:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-21T20:54:12Z.


Thanks @Celegans12, that order works for me, with #8888 second. On the current heads, git merge-tree merges #8888 cleanly with each of #8748, #8912, #8913 and #8672, so the order is about measurement, not conflicts. The interaction I'd watch is the one you named: with #8888 a large host request takes its size class's capacity, so #8913's exact-size scan meets class-sized buffers on that tier. If #8748 lands first, I'll rerun #8888's BO2 menu A/B on top of it and post the numbers there before asking for review again.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6326329191 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8912#issuecomment-6326329191). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-21T20:54:12Z. --- Thanks @Celegans12, that order works for me, with #8888 second. On the current heads, `git merge-tree` merges #8888 cleanly with each of #8748, #8912, #8913 and #8672, so the order is about measurement, not conflicts. The interaction I'd watch is the one you named: with #8888 a large host request takes its size class's capacity, so #8913's exact-size scan meets class-sized buffers on that tier. If #8748 lands first, I'll rerun #8888's BO2 menu A/B on top of it and post the numbers there before asking for review again. AI-assisted: yes (Claude Code)
Celegans12 commented 2026-10-22 09:49:29 +00:00 (Migrated from github.com)

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


@CnRJay I ran each of the three pool PRs on its own now. 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 I can't give you main-vs-PR summary lines in the world. What I can give is our tree (our local merge with main of 2026-10-21) with only this PR's switch, APS5_NO_SMALL_DEVICE_TIER, flipped every 60 s in one 1,300 s run: same scene and session for both halves.

On presents this one is in the noise: 5.75 per 10 s with the tier vs 5.16 without, but paired against neighbouring phases it's -0.13 +- 0.62, so I wouldn't claim anything there. The per-draw cost is clearer: room wait on queue 0 goes from 94 to 113 us per draw without the tier (+18 +- 4 us, the one difference here well past noise), buffer allocation per upload from 3.5 to 12.7 us and the import lookup from 15 to 37 us. With the tier on, small device-local buffers hit about 88k times per phase against 357 misses.

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 using them. On the order with #8748, #8888 and #8672: I'm happy to rerun this A/B on top of whichever lands first.

Details

Run pb-8912, 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_SMALL_DEVICE_TIER 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 /    766 /    825  3/0/5/3     10.23 presents/10 s
  B  1     825 /    826 /    852  4/0/5/4     4.43 presents/10 s
  A  2     852 /    853 /    879  4/0/5/4     4.34 presents/10 s
  B  3     879 /    880 /    906  5/0/5/4     4.38 presents/10 s
  A  4     906 /    907 /    940  4/0/5/4     5.57 presents/10 s
  B  5     940 /    942 /    971  4/0/4/4     5.03 presents/10 s
  A  6     971 /    973 /   1007  4/0/4/4     5.96 presents/10 s
  B  7    1007 /   1009 /   1038  4/0/5/4     5.05 presents/10 s
  A  8    1038 /   1040 /   1073  4/0/5/4     5.84 presents/10 s
  B  9    1073 /   1074 /   1105  4/0/5/5     5.31 presents/10 s
  A 10    1105 /   1107 /   1141  4/0/5/5     5.84 presents/10 s
  B 11    1141 /   1143 /   1175  4/0/5/5     5.57 presents/10 s
  A 12    1175 /   1177 /   1208  5/0/4/5     5.46 presents/10 s
  B 13    1208 /   1210 /   1242  4/0/4/5     5.61 presents/10 s
  A 14    1242 /   1244 /   1260  1/0/2/2     2.76 presents/10 s
  B 15    1260 /   1262 /   1296  4/0/5/5     5.88 presents/10 s
  A 16    1296 /   1298 /      -  2/0/1/1     unfinished

per phase mean                          A          B        B-A    B/A-1   noise: B vs neighbouring A, mean diff +- SE (SD, n)
presents/10s                         5.75       5.16      -0.59   -10.3%   -0.13 +- 0.62 (SD 1.77, n 8)
frame ms                          1953.82    1959.13      +5.31    +0.3%   -159.89 +- 298.19 (SD 843.41, n 8)
GPU busy ms/frame                  655.93     697.91     +41.99    +6.4%   +16.46 +- 43.79 (SD 123.86, n 8)
GPU idle gaps ms/frame            1762.37    1251.05    -511.32   -29.0%   -626.25 +- 580.26 (SD 1641.21, n 8)
committer us/commit                313.28     321.40      +8.12    +2.6%   +16.21 +- 16.63 (SD 47.04, n 8)
committer % busy                    57.93      63.94      +6.01   +10.4%   +4.58 +- 3.00 (SD 8.48, n 8)
room wait us/draw                   93.94     113.15     +19.22   +20.5%   +18.33 +- 4.01 (SD 11.33, n 8)
drain ms/10s                      1703.96    1733.12     +29.16    +1.7%   -6.47 +- 77.15 (SD 218.23, n 8)
syncwait GPU ms/10s                917.89     815.38    -102.51   -11.2%   -116.54 +- 28.20 (SD 79.77, n 8)
A total (8 phases): alloc 3.5 us/upload, lookup 15.2 us/upload; per phase: small misses 0, small-device hits/misses 87793/357, device misses 162, exact-size hits 400656, rebound 364096, held-read checks skipped 778675, held 0
B total (8 phases): alloc 12.7 us/upload, lookup 36.8 us/upload; per phase: small misses 0, small-device hits/misses 0/0, device misses 29, exact-size hits 381848, rebound 378548, held-read checks skipped 883116, held 0
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6337829469 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8912#issuecomment-6337829469). Originally posted by [Celegans12](https://github.com/Celegans12) on 2026-10-22T09:49:29Z. --- @CnRJay I ran each of the three pool PRs on its own now. 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 I can't give you main-vs-PR summary lines in the world. What I can give is our tree (our local merge with main of 2026-10-21) with only this PR's switch, `APS5_NO_SMALL_DEVICE_TIER`, flipped every 60 s in one 1,300 s run: same scene and session for both halves. On presents this one is in the noise: 5.75 per 10 s with the tier vs 5.16 without, but paired against neighbouring phases it's -0.13 +- 0.62, so I wouldn't claim anything there. The per-draw cost is clearer: room wait on queue 0 goes from 94 to 113 us per draw without the tier (+18 +- 4 us, the one difference here well past noise), buffer allocation per upload from 3.5 to 12.7 us and the import lookup from 15 to 37 us. With the tier on, small device-local buffers hit about 88k times per phase against 357 misses. 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 using them. On the order with #8748, #8888 and #8672: I'm happy to rerun this A/B on top of whichever lands first. <details><summary>Details</summary> Run `pb-8912`, 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_SMALL_DEVICE_TIER` 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 / 766 / 825 3/0/5/3 10.23 presents/10 s B 1 825 / 826 / 852 4/0/5/4 4.43 presents/10 s A 2 852 / 853 / 879 4/0/5/4 4.34 presents/10 s B 3 879 / 880 / 906 5/0/5/4 4.38 presents/10 s A 4 906 / 907 / 940 4/0/5/4 5.57 presents/10 s B 5 940 / 942 / 971 4/0/4/4 5.03 presents/10 s A 6 971 / 973 / 1007 4/0/4/4 5.96 presents/10 s B 7 1007 / 1009 / 1038 4/0/5/4 5.05 presents/10 s A 8 1038 / 1040 / 1073 4/0/5/4 5.84 presents/10 s B 9 1073 / 1074 / 1105 4/0/5/5 5.31 presents/10 s A 10 1105 / 1107 / 1141 4/0/5/5 5.84 presents/10 s B 11 1141 / 1143 / 1175 4/0/5/5 5.57 presents/10 s A 12 1175 / 1177 / 1208 5/0/4/5 5.46 presents/10 s B 13 1208 / 1210 / 1242 4/0/4/5 5.61 presents/10 s A 14 1242 / 1244 / 1260 1/0/2/2 2.76 presents/10 s B 15 1260 / 1262 / 1296 4/0/5/5 5.88 presents/10 s A 16 1296 / 1298 / - 2/0/1/1 unfinished per phase mean A B B-A B/A-1 noise: B vs neighbouring A, mean diff +- SE (SD, n) presents/10s 5.75 5.16 -0.59 -10.3% -0.13 +- 0.62 (SD 1.77, n 8) frame ms 1953.82 1959.13 +5.31 +0.3% -159.89 +- 298.19 (SD 843.41, n 8) GPU busy ms/frame 655.93 697.91 +41.99 +6.4% +16.46 +- 43.79 (SD 123.86, n 8) GPU idle gaps ms/frame 1762.37 1251.05 -511.32 -29.0% -626.25 +- 580.26 (SD 1641.21, n 8) committer us/commit 313.28 321.40 +8.12 +2.6% +16.21 +- 16.63 (SD 47.04, n 8) committer % busy 57.93 63.94 +6.01 +10.4% +4.58 +- 3.00 (SD 8.48, n 8) room wait us/draw 93.94 113.15 +19.22 +20.5% +18.33 +- 4.01 (SD 11.33, n 8) drain ms/10s 1703.96 1733.12 +29.16 +1.7% -6.47 +- 77.15 (SD 218.23, n 8) syncwait GPU ms/10s 917.89 815.38 -102.51 -11.2% -116.54 +- 28.20 (SD 79.77, n 8) A total (8 phases): alloc 3.5 us/upload, lookup 15.2 us/upload; per phase: small misses 0, small-device hits/misses 87793/357, device misses 162, exact-size hits 400656, rebound 364096, held-read checks skipped 778675, held 0 B total (8 phases): alloc 12.7 us/upload, lookup 36.8 us/upload; per phase: small misses 0, small-device hits/misses 0/0, device misses 29, exact-size hits 381848, rebound 378548, held-read checks skipped 883116, held 0 ``` </details>
MarcZX10 commented 2026-10-29 11:31:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T11:31:12Z.

Review: CHANGES_REQUESTED


I reviewed the current head b7fd852e0cba5c2078b742d220a50262d82a5055 against live main ba5b5330b37724bca4b99f30faab504653635a04.

The pool change and SmallDeviceOwnTier regression are understandable, and the patch merges cleanly onto current main. git diff --check and tools/check_conventions.py pass on that comparison. The author’s reported focused Windows and WSL test runs are useful; I did not independently run the product tests here. On the current PR head, only conventions/labels ran; the Windows, Linux, write-watch, register-context and relinker jobs are skipped.

I’m requesting two follow-ups before approval:

  1. Performance evidence: the title-menu main/change captures are well matched, but the report says this scene does not exercise the new small-device tier, and the measured change is within main’s run-to-run spread. The open-world result combines #8911, #8912 and #8913 on a non-main tree, so it cannot attribute the result to this PR. Please provide a same-title/scene/machine comparison on current main versus current main plus this PR in a workload that actually exercises the tier, including both summary lines, traces and trace_digest.py output. If this is intended as a correctness-only change, please remove the unsupported performance claim/label and coordinate that scope with maintainers.

  2. Overlap order: #8748 remains open and the PR body acknowledges a shared BufferPool::Take edit, but this PR’s checklist still says Depends on: none and I could not find an author-agreed landing order. Please agree the order with #8748’s author and record the dependency on the second PR, as the contribution rules require.

The current-main merge preview, whitespace check and conventions check are clean; they do not resolve the performance attribution or ordering questions above.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5696967268 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8912#pullrequestreview-5696967268). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-29T11:31:12Z. **Review:** CHANGES_REQUESTED --- I reviewed the current head `b7fd852e0cba5c2078b742d220a50262d82a5055` against live `main` `ba5b5330b37724bca4b99f30faab504653635a04`. The pool change and `SmallDeviceOwnTier` regression are understandable, and the patch merges cleanly onto current `main`. `git diff --check` and `tools/check_conventions.py` pass on that comparison. The author’s reported focused Windows and WSL test runs are useful; I did not independently run the product tests here. On the current PR head, only conventions/labels ran; the Windows, Linux, write-watch, register-context and relinker jobs are skipped. I’m requesting two follow-ups before approval: 1. **Performance evidence:** the title-menu main/change captures are well matched, but the report says this scene does not exercise the new small-device tier, and the measured change is within main’s run-to-run spread. The open-world result combines #8911, #8912 and #8913 on a non-main tree, so it cannot attribute the result to this PR. Please provide a same-title/scene/machine comparison on current `main` versus current `main` plus this PR in a workload that actually exercises the tier, including both summary lines, traces and `trace_digest.py` output. If this is intended as a correctness-only change, please remove the unsupported performance claim/label and coordinate that scope with maintainers. 2. **Overlap order:** #8748 remains open and the PR body acknowledges a shared `BufferPool::Take` edit, but this PR’s checklist still says `Depends on: none` and I could not find an author-agreed landing order. Please agree the order with #8748’s author and record the dependency on the second PR, as the contribution rules require. The current-main merge preview, whitespace check and conventions check are clean; they do not resolve the performance attribution or ordering questions above.
MarcZX10 commented 2026-11-14 11:09:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-14T11:09:15Z.

Review: APPROVED


Reviewed — looks good

The reviewed change adds a separate retention tier for small device-local buffers and its regression test; I found no verified blocking defect in the changed code.

What I ran

Reviewed head edfd2f5dc0b323a5b1db517816c83e6421f9e49a using the prepared diff and the pinned repo_read.py reader. No tests or build commands were run; the Windows test results in the PR description are author-reported.

Results

Check Result Note
Changed code review passed Three changed files read
Automated tests not run Author reports Windows tests passed
Other platforms not run Linux, AMD, Intel, and console behavior unverified

Findings

Blocking

None.

Non-blocking

None.

Not verified

Did not run tests or a build, and did not independently verify the author-reported results. The review bundle lists all three changed files as included and reviewed: core/libs/prx/libSceAgcDriver/Graphics/include/BufferPool.hpp, core/libs/prx/libSceAgcDriver/Graphics/src/BufferPool.cpp, and core/libs/prx/libSceAgcDriver/tests/BufferPool.cpp. No changed files were excluded.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5904003768 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8912#pullrequestreview-5904003768). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-14T11:09:15Z. **Review:** APPROVED --- # Reviewed — looks good The reviewed change adds a separate retention tier for small device-local buffers and its regression test; I found no verified blocking defect in the changed code. ## What I ran Reviewed head `edfd2f5dc0b323a5b1db517816c83e6421f9e49a` using the prepared diff and the pinned `repo_read.py` reader. No tests or build commands were run; the Windows test results in the PR description are author-reported. ## Results | Check | Result | Note | |---|---|---| | Changed code review | passed | Three changed files read | | Automated tests | not run | Author reports Windows tests passed | | Other platforms | not run | Linux, AMD, Intel, and console behavior unverified | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified Did not run tests or a build, and did not independently verify the author-reported results. The review bundle lists all three changed files as included and reviewed: `core/libs/prx/libSceAgcDriver/Graphics/include/BufferPool.hpp`, `core/libs/prx/libSceAgcDriver/Graphics/src/BufferPool.cpp`, and `core/libs/prx/libSceAgcDriver/tests/BufferPool.cpp`. No changed files were excluded. ## To get this to a good state Nothing is required.
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!8912
No description provided.