fix(agc): an address-based build evicts idle imports instead of copying past the cap #9514

Merged
EagleBearerYS merged 10 commits from upstream-pr/9514 into main 2026-10-25 07:40:38 +00:00
EagleBearerYS commented 2026-10-21 23:59:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-21T23:59:46Z.


What

An address-based build (AcquireRegistered) imports each registered GPU range whole and never evicts to do it. When the host import budget refuses a range and no heap mirror serves it, the build copies the range, and copies past APS5_ADDRESS_COPY_MAX_MIB (64 MiB by default) abort the process in AddressCopyOverflow. On main a6dcea9279 the pass still imports without eviction, and the cap still aborts.

Titles that abort this way on main:

  • Demon's Souls (PPSA01342), Linux, RADV, RX 6900 XT, 32 GiB, main 36f60df9e (discussion #1283, Mouhand-Kaddo):
    [gpu] host import budget: 7893 MiB live of 7955 MiB (APS5_HOST_IMPORT_MIB); 294335 imports (615986 MiB) refused so far, last 0x2a2b00000+0x38170000
    FATAL: an address-based build copies 359 MiB of 1 registered ranges, past 64 MiB (APS5_ADDRESS_COPY_MAX_MIB); the largest: 0x260100000+0x16730000 (359.2 MiB committed, outside the write-watched arena)
    
  • ASTRO BOT (PPSA21564), Windows, RTX 4090, 32 GB, main a569f47cb (discussion #357, frankea). In Sky Garden the budget refuses 7 to 11 imports, then FATAL: an address-based build copies 1099 MiB of 1 registered ranges (2 runs of 2; 285 MiB in a second run). That post doesn't give the reason part of the line.
  • Sword of the Sea (PPSA25344), Windows 10, RTX 4060 8 GB, 16 GB, main 0c6a5bd59, New Game from the title (parl0v's runs, discussion #7657): FATAL: an address-based build copies 118 MiB of 1812 registered ranges, past 64 MiB (APS5_ADDRESS_COPY_MAX_MIB), with the host import budget at 4054 of 4055 MiB. With this PR (307bf8157a, on main a6dcea9279), the build logs imported by evicting idle imports, as copying it would pass APS5_ADDRESS_COPY_MAX_MIB and doesn't abort. The load then runs out of host-visible memory (vkAllocateMemory ... heap 1 7704/7448 MiB), which main also reaches with APS5_ADDRESS_COPY_MAX_MIB=1024, so that's a separate limit.
  • Resident Evil Village (PPSA01556) aborted the same way on a 768 MiB heap in our runs on 10-14. Our runs on later trees haven't hit it.

The change (three commits, and a debt entry):

  • 7d6c475b95, the fix. The pass retries a refused range's import with eviction only when copying it would take the build's copies past the cap, i.e. only when the build would abort otherwise.
    • Imports the build already looked up or made count as held (buildFloor) and are never evicted.
    • The retire moves the import epoch, which Upload and the address-space cache already honour.
    • Every other build still imports without eviction, so the set of imported ranges stays as stable across builds as before.
    • A rate-limited line reports each such import: [gpu] host import budget: 0x…+0x… imported by evicting idle imports, as copying it would pass APS5_ADDRESS_COPY_MAX_MIB.
    • A refusal answered from the remembered refusals counts as a budget refusal too. A copied heap's reason now names what refused it (an import over the host import budget, a heap not fully write-watched, a refused heap mirror) instead of "outside the write-watched arena" for every heap.
    • The in-process cap override (SetAddressCopyLimit) is read once with the env cap, so eviction triggers exactly where the abort would.
  • 6fcf7b6573, the tests. agc_address_copy_cap builds over a partly unwatched heap whose import the budget refuses, so no mirror serves it, while idle imports hold the budget. agc_address_copy_cap_remembered is the same build answered from the remembered refusal. Both run on the mock device.
  • 307bf8157a. A heap's copy reason asked GuestMemory::Watched for every copied heap range on every plan. That takes the tracker's global mutex and walks its coverage, only to label a FATAL line. Now a copy records that it is a heap and whether the budget refused it, and AddressCopyOverflow names the reason only for the copies its report lists. The report's text is unchanged.
  • f2e4290e9c, a debt entry. A registered range larger than the device's largest allocation is imported in pieces since #7292. If the budget refuses a piece, the range is mirrored or copied without this PR's evicting retry, so such a copy can still exceed APS5_ADDRESS_COPY_MAX_MIB and end the build. The entry says so; covering it needs importPieces to evict, which is a follow-up after this PR.

Related: #7844 (Mouhand-Kaddo) raises the host import budget on hosts with a large heap, which makes this refusal rarer there. This PR removes the abort when a refusal still happens, so the two compose. They share one line of the debt entry; this PR goes after #7844 and resolves it.

Overlap: checked with git merge-tree against every open PR touching these files, on main a6dcea9279. The conflicts are on adjacent lines:

  • Behavioural overlaps that need an order:
    • #7292 (billythemenace2) merged first and imports a range larger than the device's largest allocation in pieces, at the same import call in the address-based pass where this PR notes a budget refusal. This PR's merge keeps the piece import as it is: a range imported in pieces doesn't get this PR's evicting retry when the budget refuses a piece, which the new debt entry records. #8380 (Zenodeon) built on #7292 and now conflicts with main itself.
    • #7844 (Mouhand-Kaddo): merge order only, this PR goes after it (see Related).
  • Adjacent, test or debt edits that only need a rebase, in either order. The code of each merges cleanly with this PR, except where noted:
    • #8896 (teepean) adds a cache of recently found imports, with its fields next to this PR's in HostImports. The cache is dropped whenever the import epoch or the number of imports changes, which this PR's evicting import changes, so it never returns a retired import. The conflict is the adjacent fields.
    • #9402 (janzezno) changes importRunAt and retireImport too, on other lines. It records pending imports, and retireImport drops them, which covers this PR's evicting import as well. The conflict is a neighbouring line of the debt file.
    • #8104 (Celegans12) stages the written elements of address-based compute builds. It sorts a build's regions by whether they are imported or mirrored, so a range this PR imports instead of copying goes with the imported ones. The conflict is a neighbouring line of the debt file.
    • #8874 (JJenkx) reuses heap mirror reference buffers in WriteBack, which this PR doesn't touch. The conflict is a test declaration in BdaTests.hpp.
    • #7978 (fma-rc): a separate line of the debt file.

Tested

  • Red/green on GitHub's runners (run), with main's GuestBufferMemory.cpp and this PR's tests:
    • Both tests abort 3/3 on Windows and Linux: FATAL: an address-based build copies 2 MiB of 1 registered ranges, past 1 MiB (APS5_ADDRESS_COPY_MAX_MIB); the largest: 0x…+0x200000 (2.0 MiB committed, outside the write-watched arena).
    • With the fix and its tests (6fcf7b6573), both pass 10/10 on Windows and Linux, and the libc and libkernel suites pass (Windows 142 and 207, Linux 115 and 197).
  • This head on GitHub's runners (run): the two copy-cap tests and the heap-mirror, sparse-buffer, BDA, graphics and pipeline tests around them pass ×10, 30 on Windows and 31 on Linux. The libc and libkernel suites pass on Windows (142 and 207). On Linux the libc suite's only failure is precise_wait, a timing test that flakes on that runner.
  • Linux, as CI runs it, at 307bf8157a (Ubuntu 24.04, GCC 13.3, lavapipe, unprivileged user):
    • 1824 tests, 4 failed. agc_driver_sgpr_pattern_fill_keys is a load flake that main shares; it then passed ×20 alone. guest_socket_stream_options, guest_socket_address_length and guest_tcp fail because that machine has no IPv6.
    • check_test_registration.py: none new. check_skips.py: guest_sce_net skipped, for the same IPv6 reason.
  • Each commit's own tests pass at that commit, with ctest -R '^agc_(address|heap_mirror|driver_bda|driver_graphics)': 11/11, 13/13, and 13/13 ×5.
  • More reds:
    • Without the remembered-refusal count, agc_address_copy_cap_remembered aborts 3/3.
    • With the report using a stored reason, agc_driver_graphics fails: "the copy limit does not name a copied heap's reason".
  • The normal path costs nothing measurable. A mock-device bench (not committed): a 768 MiB registered heap, mirrored or imported, 200 builds of AcquireRegistered + Upload + WriteBack, main and this PR alternated over two rounds, with the address-space cache on and off. Later builds agree within 0.1–3 µs. First-of-epoch builds scatter ±15% on both sides alike.
  • After the merge with main at ab347d144d (f7d4e920ca, no conflicts, the PR's own diff unchanged), on GitHub's runners (run): the focused tests pass 10 runs in a row on Linux and Windows, and the libc and libkernel suites pass on both (116 and 197 on Linux, 143 and 207 on Windows).
  • Validation layer, main against this PR (CONTRIBUTING's AGC rule), on one GitHub Linux runner (run). Both runs used VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1 and ctest -V, with VK_LOADER_DEBUG=layer to show the layer loading. The device was llvmpipe (LLVM 20.1.2) on Mesa 25.2.8, Ubuntu 24.04.5, Khronos validation layers 1.3.275.
    • This PR's own tests run on the mock device and create no Vulkan instance, so the comparison adds the real-device tests on the same import path: agc_driver_guest_memory_lifetime_{copy,direct,locked,heap,heap_uncached}, agc_driver_host_import_lifetime, agc_driver_host_import_mutation_race and agc_driver_host_import_failure_handles.
    • main's tree ran these tests once and this PR's three times. The loader inserted VK_LAYER_KHRONOS_validation in every test process, 8 times on main and 24 with this PR, and neither log has was not found but was requested by env var VK_INSTANCE_LAYERS.
    • Both logs report the same single message, VUID-VkDeviceCreateInfo-pNext-pNext, for a device-creation structure newer than that layer version. This PR adds no VUID- message.
  • check_conventions.py: no errors and no comment lines added. One warning, debt-length, on the host import entry: 3,911 characters, against 3,708 on main.
  • EdouardSence's ASTRO BOT (PPSA21567) run on Linux (comment): Sky Garden, AMD Radeon RX 9070 XT (RADV, Mesa 26.2.4), all builds on main d6eafa54d, with and without this PR and #7844, a warm-up and two interleaved rounds each.
    • On that machine Sky Garden never reaches the copy cap: the budget refuses 22-24 imports on main and with this PR, and nothing logs copies ... past 64 MiB or this PR's eviction line.
    • So this PR doesn't change the frame time there, and with #7844 it gives the same numbers as #7844 alone.
  • a0885b0c08 and 846f95650a, merges of main 938812df14 and then 4997726a5f. The first conflict was the debt file, where main added a Device-local staging entry next to this PR's sentence in Host import windows and budget; both are kept. The second was GuestBufferMemory.cpp's address-based pass, where #7292 added its piece import next to this PR's overBudget flag; both are kept, and this PR's copy-limit override variable is renamed from limit to copyOverride, so #7292's limit in the loop doesn't shadow it. Apart from that rename, the PR's own changes are unchanged. On GitHub's runners (run), the two copy-cap tests and the heap-mirror, BDA, graphics and host-import tests the harness maps from the changed files pass 10 runs in a row: on Linux 36 of 36; on Windows 32 of 35, with 3 skipped without a Vulkan device; none fail. The libc and libkernel suites pass on both (119 and 201 tests on Linux, 146 and 211 on Windows), run with APS5_SKIP_TIMING_TESTS=1, which relaxes precise_wait's median bounds on GitHub's hosted runners.
  • Chronyyx's ASTRO BOT (PPSA21564) runs on Windows (comment): 01.007.000, Windows 11, RTX 3080 (driver 610.88), WinLibs GCC 15.2.0, Release, warm shader cache, this PR at 041df5af17 on main 941ace5f34 with #6182, 7 minutes per run, no input.
    • The 1037 MiB copy abort is gone and the title draws. The log shows this PR's imported by evicting idle imports, as copying it would pass APS5_ADDRESS_COPY_MAX_MIB line.
    • Without --frame-red-zone, both runs then crash in the title's mixer thread (SceSndzAudioOutMain). That's the Windows red-zone problem from #361: a leaf keeps a pointer at [rsp-0x20], and a resumed write fault overwrites it. Relinked with --frame-red-zone (#5640), the same build reaches the title screen at about 10 FPS with no crash, with the eviction taking place (1 run).
    • So on Windows, titles with such red-zone leaves need --frame-red-zone, which is opt-in. Chronyyx then measured the eviction's part (comment), in 150 s runs without --frame-red-zone. This PR's retry retires 3 idle imports for the 1 GiB range, none of them holding the mixer's buffer, and fills the budget. About 2 s later, main's least-recently-used eviction retires about 25 more for an 88 MiB import, one of them holding the mixer's output buffer, and the re-import of that range is refused. Resumed write faults go from 16 in each of two runs with a larger budget and no eviction to 169–189 with it, all after this PR's eviction line, and the mixer's next store faults into #361's red-zone damage. The sound crash came in 5 of 6 runs with the eviction and 0 of 1 without; with --frame-red-zone, in 0 of 4 runs with the eviction. By his reading, nothing in this PR needs to change.
  • Not tested: Demon's Souls and a Resident Evil Village scene on this tree.

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: #7844
  • Fixes: none
  • Unblocks: PPSA01342 #1283, PPSA21564 #357, PPSA25344 #7657
  • GPUs tested: Mesa lavapipe (llvmpipe, LLVM 20.1.2, Mesa 25.2.8), Ubuntu 24.04, on GitHub's runner and a Linux build machine, with the validation comparison on GitHub's runner; the mock device on GitHub's Windows runner; NVIDIA GeForce RTX 4060 8 GB, Windows 10 (parl0v's Sword of the Sea runs; driver not reported); AMD Radeon RX 9070 XT (RADV, Mesa 26.2.4), Linux, in EdouardSence's run
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4959977902 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9514). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-21T23:59:46Z. --- ### What An address-based build (`AcquireRegistered`) imports each registered GPU range whole and never evicts to do it. When the host import budget refuses a range and no heap mirror serves it, the build copies the range, and copies past `APS5_ADDRESS_COPY_MAX_MIB` (64 MiB by default) abort the process in `AddressCopyOverflow`. On `main` a6dcea9279 the pass still imports without eviction, and the cap still aborts. **Titles that abort this way on `main`:** - **Demon's Souls (PPSA01342)**, Linux, RADV, RX 6900 XT, 32 GiB, `main` 36f60df9e ([discussion #1283](https://github.com/boykopovar/AnyPS5/discussions/1283#discussioncomment-19037774), Mouhand-Kaddo): ``` [gpu] host import budget: 7893 MiB live of 7955 MiB (APS5_HOST_IMPORT_MIB); 294335 imports (615986 MiB) refused so far, last 0x2a2b00000+0x38170000 FATAL: an address-based build copies 359 MiB of 1 registered ranges, past 64 MiB (APS5_ADDRESS_COPY_MAX_MIB); the largest: 0x260100000+0x16730000 (359.2 MiB committed, outside the write-watched arena) ``` - **ASTRO BOT (PPSA21564)**, Windows, RTX 4090, 32 GB, `main` a569f47cb ([discussion #357](https://github.com/boykopovar/AnyPS5/discussions/357#discussioncomment-19058078), frankea). In Sky Garden the budget refuses 7 to 11 imports, then `FATAL: an address-based build copies 1099 MiB of 1 registered ranges` (2 runs of 2; 285 MiB in a second run). That post doesn't give the reason part of the line. - **Sword of the Sea (PPSA25344)**, Windows 10, RTX 4060 8 GB, 16 GB, `main` 0c6a5bd59, New Game from the title ([parl0v's runs](https://github.com/boykopovar/AnyPS5/pull/9514#issuecomment-6331394396), discussion #7657): `FATAL: an address-based build copies 118 MiB of 1812 registered ranges, past 64 MiB (APS5_ADDRESS_COPY_MAX_MIB)`, with the host import budget at 4054 of 4055 MiB. With this PR (307bf8157a, on `main` a6dcea9279), the build logs `imported by evicting idle imports, as copying it would pass APS5_ADDRESS_COPY_MAX_MIB` and doesn't abort. The load then runs out of host-visible memory (`vkAllocateMemory ... heap 1 7704/7448 MiB`), which `main` also reaches with `APS5_ADDRESS_COPY_MAX_MIB=1024`, so that's a separate limit. - Resident Evil Village (PPSA01556) aborted the same way on a 768 MiB heap in our runs on 10-14. Our runs on later trees haven't hit it. **The change** (three commits, and a debt entry): - **7d6c475b95, the fix.** The pass retries a refused range's import with eviction only when copying it would take the build's copies past the cap, i.e. only when the build would abort otherwise. - Imports the build already looked up or made count as held (`buildFloor`) and are never evicted. - The retire moves the import epoch, which `Upload` and the address-space cache already honour. - Every other build still imports without eviction, so the set of imported ranges stays as stable across builds as before. - A rate-limited line reports each such import: `[gpu] host import budget: 0x…+0x… imported by evicting idle imports, as copying it would pass APS5_ADDRESS_COPY_MAX_MIB`. - A refusal answered from the remembered refusals counts as a budget refusal too. A copied heap's reason now names what refused it (an import over the host import budget, a heap not fully write-watched, a refused heap mirror) instead of "outside the write-watched arena" for every heap. - The in-process cap override (`SetAddressCopyLimit`) is read once with the env cap, so eviction triggers exactly where the abort would. - **6fcf7b6573, the tests.** `agc_address_copy_cap` builds over a partly unwatched heap whose import the budget refuses, so no mirror serves it, while idle imports hold the budget. `agc_address_copy_cap_remembered` is the same build answered from the remembered refusal. Both run on the mock device. - **307bf8157a.** A heap's copy reason asked `GuestMemory::Watched` for every copied heap range on every plan. That takes the tracker's global mutex and walks its coverage, only to label a FATAL line. Now a copy records that it is a heap and whether the budget refused it, and `AddressCopyOverflow` names the reason only for the copies its report lists. The report's text is unchanged. - **f2e4290e9c, a debt entry.** A registered range larger than the device's largest allocation is imported in pieces since #7292. If the budget refuses a piece, the range is mirrored or copied without this PR's evicting retry, so such a copy can still exceed `APS5_ADDRESS_COPY_MAX_MIB` and end the build. The entry says so; covering it needs `importPieces` to evict, which is a follow-up after this PR. **Related:** #7844 (Mouhand-Kaddo) raises the host import budget on hosts with a large heap, which makes this refusal rarer there. This PR removes the abort when a refusal still happens, so the two compose. They share one line of the debt entry; this PR goes after #7844 and resolves it. **Overlap:** checked with `git merge-tree` against every open PR touching these files, on `main` a6dcea9279. The conflicts are on adjacent lines: - **Behavioural overlaps that need an order:** - #7292 (billythemenace2) merged first and imports a range larger than the device's largest allocation in pieces, at the same import call in the address-based pass where this PR notes a budget refusal. This PR's merge keeps the piece import as it is: a range imported in pieces doesn't get this PR's evicting retry when the budget refuses a piece, which the new debt entry records. #8380 (Zenodeon) built on #7292 and now conflicts with `main` itself. - #7844 (Mouhand-Kaddo): merge order only, this PR goes after it (see Related). - **Adjacent, test or debt edits that only need a rebase,** in either order. The code of each merges cleanly with this PR, except where noted: - #8896 (teepean) adds a cache of recently found imports, with its fields next to this PR's in `HostImports`. The cache is dropped whenever the import epoch or the number of imports changes, which this PR's evicting import changes, so it never returns a retired import. The conflict is the adjacent fields. - #9402 (janzezno) changes `importRunAt` and `retireImport` too, on other lines. It records pending imports, and `retireImport` drops them, which covers this PR's evicting import as well. The conflict is a neighbouring line of the debt file. - #8104 (Celegans12) stages the written elements of address-based compute builds. It sorts a build's regions by whether they are imported or mirrored, so a range this PR imports instead of copying goes with the imported ones. The conflict is a neighbouring line of the debt file. - #8874 (JJenkx) reuses heap mirror reference buffers in `WriteBack`, which this PR doesn't touch. The conflict is a test declaration in `BdaTests.hpp`. - #7978 (fma-rc): a separate line of the debt file. ### Tested - **Red/green on GitHub's runners** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39692167688)), with `main`'s `GuestBufferMemory.cpp` and this PR's tests: - Both tests abort 3/3 on Windows and Linux: `FATAL: an address-based build copies 2 MiB of 1 registered ranges, past 1 MiB (APS5_ADDRESS_COPY_MAX_MIB); the largest: 0x…+0x200000 (2.0 MiB committed, outside the write-watched arena)`. - With the fix and its tests (6fcf7b6573), both pass 10/10 on Windows and Linux, and the libc and libkernel suites pass (Windows 142 and 207, Linux 115 and 197). - **This head on GitHub's runners** ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39687836373)): the two copy-cap tests and the heap-mirror, sparse-buffer, BDA, graphics and pipeline tests around them pass ×10, 30 on Windows and 31 on Linux. The libc and libkernel suites pass on Windows (142 and 207). On Linux the libc suite's only failure is `precise_wait`, a timing test that flakes on that runner. - **Linux, as CI runs it,** at 307bf8157a (Ubuntu 24.04, GCC 13.3, lavapipe, unprivileged user): - 1824 tests, 4 failed. `agc_driver_sgpr_pattern_fill_keys` is a load flake that `main` shares; it then passed ×20 alone. `guest_socket_stream_options`, `guest_socket_address_length` and `guest_tcp` fail because that machine has no IPv6. - `check_test_registration.py`: none new. `check_skips.py`: `guest_sce_net` skipped, for the same IPv6 reason. - **Each commit's own tests** pass at that commit, with `ctest -R '^agc_(address|heap_mirror|driver_bda|driver_graphics)'`: 11/11, 13/13, and 13/13 ×5. - **More reds:** - Without the remembered-refusal count, `agc_address_copy_cap_remembered` aborts 3/3. - With the report using a stored reason, `agc_driver_graphics` fails: "the copy limit does not name a copied heap's reason". - **The normal path costs nothing measurable.** A mock-device bench (not committed): a 768 MiB registered heap, mirrored or imported, 200 builds of `AcquireRegistered` + `Upload` + `WriteBack`, `main` and this PR alternated over two rounds, with the address-space cache on and off. Later builds agree within 0.1–3 µs. First-of-epoch builds scatter ±15% on both sides alike. - **After the merge with `main` at ab347d144d** (f7d4e920ca, no conflicts, the PR's own diff unchanged), on GitHub's runners ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39723049448)): the focused tests pass 10 runs in a row on Linux and Windows, and the libc and libkernel suites pass on both (116 and 197 on Linux, 143 and 207 on Windows). - **Validation layer, `main` against this PR** (CONTRIBUTING's AGC rule), on one GitHub Linux runner ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39726267625)). Both runs used `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ANYPS5_NO_SHADER_CACHE=1`, `ANYPS5_REQUIRE_VULKAN=1` and `ctest -V`, with `VK_LOADER_DEBUG=layer` to show the layer loading. The device was llvmpipe (LLVM 20.1.2) on Mesa 25.2.8, Ubuntu 24.04.5, Khronos validation layers 1.3.275. - This PR's own tests run on the mock device and create no Vulkan instance, so the comparison adds the real-device tests on the same import path: `agc_driver_guest_memory_lifetime_{copy,direct,locked,heap,heap_uncached}`, `agc_driver_host_import_lifetime`, `agc_driver_host_import_mutation_race` and `agc_driver_host_import_failure_handles`. - `main`'s tree ran these tests once and this PR's three times. The loader inserted `VK_LAYER_KHRONOS_validation` in every test process, 8 times on `main` and 24 with this PR, and neither log has `was not found but was requested by env var VK_INSTANCE_LAYERS`. - Both logs report the same single message, `VUID-VkDeviceCreateInfo-pNext-pNext`, for a device-creation structure newer than that layer version. This PR adds no `VUID-` message. - `check_conventions.py`: no errors and no comment lines added. One warning, `debt-length`, on the host import entry: 3,911 characters, against 3,708 on `main`. - **EdouardSence's ASTRO BOT (PPSA21567) run on Linux** ([comment](https://github.com/boykopovar/AnyPS5/pull/9514#issuecomment-6337116376)): Sky Garden, AMD Radeon RX 9070 XT (RADV, Mesa 26.2.4), all builds on `main` d6eafa54d, with and without this PR and #7844, a warm-up and two interleaved rounds each. - On that machine Sky Garden never reaches the copy cap: the budget refuses 22-24 imports on `main` and with this PR, and nothing logs `copies ... past 64 MiB` or this PR's eviction line. - So this PR doesn't change the frame time there, and with #7844 it gives the same numbers as #7844 alone. - **a0885b0c08 and 846f95650a, merges of `main` 938812df14 and then 4997726a5f.** The first conflict was the debt file, where `main` added a `Device-local staging` entry next to this PR's sentence in `Host import windows and budget`; both are kept. The second was `GuestBufferMemory.cpp`'s address-based pass, where #7292 added its piece import next to this PR's `overBudget` flag; both are kept, and this PR's copy-limit override variable is renamed from `limit` to `copyOverride`, so #7292's `limit` in the loop doesn't shadow it. Apart from that rename, the PR's own changes are unchanged. On GitHub's runners ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39970524300)), the two copy-cap tests and the heap-mirror, BDA, graphics and host-import tests the harness maps from the changed files pass 10 runs in a row: on Linux 36 of 36; on Windows 32 of 35, with 3 skipped without a Vulkan device; none fail. The libc and libkernel suites pass on both (119 and 201 tests on Linux, 146 and 211 on Windows), run with `APS5_SKIP_TIMING_TESTS=1`, which relaxes `precise_wait`'s median bounds on GitHub's hosted runners. - **Chronyyx's ASTRO BOT (PPSA21564) runs on Windows** ([comment](https://github.com/boykopovar/AnyPS5/pull/9514#issuecomment-6393008198)): 01.007.000, Windows 11, RTX 3080 (driver 610.88), WinLibs GCC 15.2.0, Release, warm shader cache, this PR at 041df5af17 on `main` 941ace5f34 with #6182, 7 minutes per run, no input. - The 1037 MiB copy abort is gone and the title draws. The log shows this PR's `imported by evicting idle imports, as copying it would pass APS5_ADDRESS_COPY_MAX_MIB` line. - Without `--frame-red-zone`, both runs then crash in the title's mixer thread (`SceSndzAudioOutMain`). That's the Windows red-zone problem from #361: a leaf keeps a pointer at `[rsp-0x20]`, and a resumed write fault overwrites it. Relinked with `--frame-red-zone` (#5640), the same build reaches the title screen at about 10 FPS with no crash, with the eviction taking place (1 run). - So on Windows, titles with such red-zone leaves need `--frame-red-zone`, which is opt-in. Chronyyx then measured the eviction's part ([comment](https://github.com/boykopovar/AnyPS5/pull/9514#issuecomment-6393788261)), in 150 s runs without `--frame-red-zone`. This PR's retry retires 3 idle imports for the 1 GiB range, none of them holding the mixer's buffer, and fills the budget. About 2 s later, `main`'s least-recently-used eviction retires about 25 more for an 88 MiB import, one of them holding the mixer's output buffer, and the re-import of that range is refused. Resumed write faults go from 16 in each of two runs with a larger budget and no eviction to 169–189 with it, all after this PR's eviction line, and the mixer's next store faults into #361's red-zone damage. The sound crash came in 5 of 6 runs with the eviction and 0 of 1 without; with `--frame-red-zone`, in 0 of 4 runs with the eviction. By his reading, nothing in this PR needs to change. - Not tested: Demon's Souls and a Resident Evil Village scene on this tree. ### 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: #7844 - [x] Fixes: none - [x] Unblocks: PPSA01342 #1283, PPSA21564 #357, PPSA25344 #7657 - [x] GPUs tested: Mesa lavapipe (llvmpipe, LLVM 20.1.2, Mesa 25.2.8), Ubuntu 24.04, on GitHub's runner and a Linux build machine, with the validation comparison on GitHub's runner; the mock device on GitHub's Windows runner; NVIDIA GeForce RTX 4060 8 GB, Windows 10 (parl0v's Sword of the Sea runs; driver not reported); AMD Radeon RX 9070 XT (RADV, Mesa 26.2.4), Linux, in EdouardSence's run - [x] AI-assisted: yes
MarcZX10 commented 2026-10-22 00:09:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T00:09:48Z.


Before marking this ready, please bring the checklist into line with the repository rules in two places:

  • Unblocks names Demon’s Souls and ASTRO BOT and the body links their Game bring-up discussions (#1283 and #357), but the checklist needs each title ID paired with its discussion, e.g. Unblocks: PPSA01342 #1283, PPSA21564 #357.
  • The overlap section identifies open PRs #8380, #7292, #8896, #8874, #9402, #8104, #7978 and #7844, while the checklist says Depends on: none. CONTRIBUTING.md asks authors to agree on order for reported overlaps and declare the agreed dependencies. Please coordinate with the affected authors, then update the dependency line and overlap notes to reflect the agreed merge order.

I have not reviewed or rerun the full implementation/tests yet; this note is limited to the template and overlap requirements visible in the current draft.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6329412939 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9514#issuecomment-6329412939). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T00:09:48Z. --- Before marking this ready, please bring the checklist into line with the repository rules in two places: - `Unblocks` names Demon’s Souls and ASTRO BOT and the body links their Game bring-up discussions (#1283 and #357), but the checklist needs each title ID paired with its discussion, e.g. `Unblocks: PPSA01342 #1283, PPSA21564 #357`. - The overlap section identifies open PRs #8380, #7292, #8896, #8874, #9402, #8104, #7978 and #7844, while the checklist says `Depends on: none`. `CONTRIBUTING.md` asks authors to agree on order for reported overlaps and declare the agreed dependencies. Please coordinate with the affected authors, then update the dependency line and overlap notes to reflect the agreed merge order. I have not reviewed or rerun the full implementation/tests yet; this note is limited to the template and overlap requirements visible in the current draft.
MarcZX10 commented 2026-10-22 02:05:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T02:05:40Z.


The title unblock checklist is now correct, and #7844 is declared. I reviewed the live functional overlaps: #8380 and #7292 modify the same import path with piece imports, and your description proposes that #9514 merge first so those branches rebase afterward. The proposal is technically plausible from the adjacent branches, but I do not see either author agreeing in the PR threads. Please get explicit confirmation from both authors (or revise the order and dependency entries to their agreed sequence) before merge. For #8896, #8874, #9402 and #8104, please document which are behavioral overlaps requiring ordering and which are adjacent/test/debt edits that only need a rebase; “whichever lands second” by itself does not record an agreed order. #7978 appears to be a separate debt-line edit, while #7844 is now declared.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6330933609 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9514#issuecomment-6330933609). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T02:05:40Z. --- The title unblock checklist is now correct, and #7844 is declared. I reviewed the live functional overlaps: #8380 and #7292 modify the same import path with piece imports, and your description proposes that #9514 merge first so those branches rebase afterward. The proposal is technically plausible from the adjacent branches, but I do not see either author agreeing in the PR threads. Please get explicit confirmation from both authors (or revise the order and dependency entries to their agreed sequence) before merge. For #8896, #8874, #9402 and #8104, please document which are behavioral overlaps requiring ordering and which are adjacent/test/debt edits that only need a rebase; “whichever lands second” by itself does not record an agreed order. #7978 appears to be a separate debt-line edit, while #7844 is now declared.
EagleBearerYS commented 2026-10-22 02:12:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-22T02:12:28Z.


Thanks, @MarcZX10. The Overlap section now separates the two kinds:

  • Order needed: #7292 and #8380, at the same import call. The proposal that this PR goes first is in their threads, and their answer will go in the description and on Depends on. #7844 is declared.
  • Rebase only, in either order: #8896, #9402, #8104, #8874 and #7978. For each, the description says what it changes next to this PR and why the two don't depend on each other. In short:
    • #8896's recent-import cache drops itself when the import epoch or count changes, as this PR's evicting import does;
    • #9402's pending-import record is cleared in retireImport, which this PR's eviction goes through;
    • #8104 sorts regions by imported or mirrored, so a range this PR imports goes with those;
    • #8874's change is in WriteBack, with only a test declaration next to ours;
    • #7978 is a separate debt line.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6331022523 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9514#issuecomment-6331022523). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-22T02:12:28Z. --- Thanks, @MarcZX10. The Overlap section now separates the two kinds: - **Order needed:** #7292 and #8380, at the same import call. The proposal that this PR goes first is in their threads, and their answer will go in the description and on Depends on. #7844 is declared. - **Rebase only, in either order:** #8896, #9402, #8104, #8874 and #7978. For each, the description says what it changes next to this PR and why the two don't depend on each other. In short: - #8896's recent-import cache drops itself when the import epoch or count changes, as this PR's evicting import does; - #9402's pending-import record is cleared in `retireImport`, which this PR's eviction goes through; - #8104 sorts regions by imported or mirrored, so a range this PR imports goes with those; - #8874's change is in `WriteBack`, with only a test declaration next to ours; - #7978 is a separate debt line.
parl0v commented 2026-10-22 02:42:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by parl0v on 2026-10-22T02:42:44Z.


I tested this on Sword of the Sea (PPSA25344, 01.510.000), starting New Game from the title. My machine: RTX 4060 8 GB, i5-14400F, 16 GB RAM, Windows 10. Same relinked executable for every run, APS5_PROFILE_DRAW=1, no other env.

Build Result about 60 s into the New Game load
main 0c6a5bd59 FATAL: an address-based build copies 118 MiB of 1812 registered ranges, past 64 MiB (APS5_ADDRESS_COPY_MAX_MIB); host import budget 4054 of 4055 MiB live, 11414 imports (4410 MiB) refused
main 0c6a5bd59 + APS5_ADDRESS_COPY_MAX_MIB=1024 past the cap, then vkAllocateMemory buffer slab ... heap 1 7704/7448 MiB
this PR (307bf8157) imported by evicting idle imports, as copying it would pass APS5_ADDRESS_COPY_MAX_MIB logged, no copy-cap abort; 10068 imports (3813 MiB) refused; then heap mirror of 0x32af9e0000+0x100000: vkAllocateMemory buffer ... heap 1 7704/7448 MiB; heap mirrors hold 2858 MiB

So on this title the PR does what it says: the cap abort is gone. The load then runs out of host-visible memory (heap 1), which also happens on main once the cap is raised. That looks like a separate limit, so it shouldn't block this PR. The main runs are on 0c6a5bd59 and the PR is on a6dcea927, so the bases differ by the main commits in between; none of those touch the relinker.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6331394396 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9514#issuecomment-6331394396). Originally posted by [parl0v](https://github.com/parl0v) on 2026-10-22T02:42:44Z. --- I tested this on Sword of the Sea (PPSA25344, 01.510.000), starting New Game from the title. My machine: RTX 4060 8 GB, i5-14400F, 16 GB RAM, Windows 10. Same relinked executable for every run, `APS5_PROFILE_DRAW=1`, no other env. | Build | Result about 60 s into the New Game load | |---|---| | main 0c6a5bd59 | `FATAL: an address-based build copies 118 MiB of 1812 registered ranges, past 64 MiB (APS5_ADDRESS_COPY_MAX_MIB)`; host import budget 4054 of 4055 MiB live, 11414 imports (4410 MiB) refused | | main 0c6a5bd59 + `APS5_ADDRESS_COPY_MAX_MIB=1024` | past the cap, then `vkAllocateMemory buffer slab ... heap 1 7704/7448 MiB` | | this PR (307bf8157) | `imported by evicting idle imports, as copying it would pass APS5_ADDRESS_COPY_MAX_MIB` logged, no copy-cap abort; 10068 imports (3813 MiB) refused; then `heap mirror of 0x32af9e0000+0x100000: vkAllocateMemory buffer ... heap 1 7704/7448 MiB; heap mirrors hold 2858 MiB` | So on this title the PR does what it says: the cap abort is gone. The load then runs out of host-visible memory (heap 1), which also happens on main once the cap is raised. That looks like a separate limit, so it shouldn't block this PR. The main runs are on 0c6a5bd59 and the PR is on a6dcea927, so the bases differ by the main commits in between; none of those touch the relinker.
EagleBearerYS commented 2026-10-22 02:49:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-22T02:49:54Z.


@parl0v thanks for the three runs on Sword of the Sea (PPSA25344), and for keeping the relinked executable and the env the same in all of them. They show what the PR is for: on main the New Game load aborts at the copy cap, and with the PR the build imports by evicting instead, with no abort. Agreed that the host-visible heap running out afterwards is a separate limit, since main reaches it too once the cap is raised. Your runs are in the description now, and the title is on the Unblocks line.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6331481333 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9514#issuecomment-6331481333). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-22T02:49:54Z. --- @parl0v thanks for the three runs on Sword of the Sea (PPSA25344), and for keeping the relinked executable and the env the same in all of them. They show what the PR is for: on `main` the New Game load aborts at the copy cap, and with the PR the build imports by evicting instead, with no abort. Agreed that the host-visible heap running out afterwards is a separate limit, since `main` reaches it too once the cap is raised. Your runs are in the description now, and the title is on the Unblocks line.
EagleBearerYS commented 2026-10-22 02:55:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-22T02:55:35Z.


@parl0v if you'd like to try one more thing: two open PRs target the heap 1 stop you hit next. #7647 (fma-rc) binds heap mirrors in device-local memory, only where the guest holds bytes, when the GPU reports sparse aliased buffers. #8016 (PayloadAnim) falls back to device-local heap mirrors when the host-visible allocation fails. A run of this PR with either one on Sword of the Sea (PPSA25344) would show whether the load gets further. Nothing here waits on it.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6331551440 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9514#issuecomment-6331551440). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-22T02:55:35Z. --- @parl0v if you'd like to try one more thing: two open PRs target the heap 1 stop you hit next. #7647 (fma-rc) binds heap mirrors in device-local memory, only where the guest holds bytes, when the GPU reports sparse aliased buffers. #8016 (PayloadAnim) falls back to device-local heap mirrors when the host-visible allocation fails. A run of this PR with either one on Sword of the Sea (PPSA25344) would show whether the load gets further. Nothing here waits on it.
MarcZX10 commented 2026-10-22 04:20:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T04:20:27Z.

Review: DISMISSED


I reviewed the implementation and reported regressions. The cap is reused for both the decision to evict and the final fatal check; imported ranges already held by the build are retained, and the tests exercise both fresh and remembered budget refusals. The Sword of the Sea report usefully shows this removes the copy-cap abort while clearly separating the later heap-allocation failure.

I’m requesting changes for these remaining repository requirements:

  1. The PR and its validation report are based on main a6dcea9279, while current upstream main is c61d20f548. Please update the branch and rerun the focused regression and required validation checks against that current base.
  2. This AGC change lacks the required same-machine, same-GPU focused comparison on current main and the updated PR head using ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, and ctest -V. Please show that the layer loaded in both runs and compare logs for new VUID errors, with GPU model, driver, and OS. The mock-device red/green cases and title runs are useful but do not provide this required comparison.
  3. The proposed behavioral order with #7292 and #8380 still has no explicit confirmation from those authors in the linked PR threads. Please record their agreement and list the agreed predecessors in Depends on. #7844 is already correctly declared; the adjacent/test/debt-only overlaps are separately explained.

The existing report includes extensive focused tests and title evidence; I did not rerun them locally. Hosted checks shown here are policy checks only, with product jobs skipped.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5609218015 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9514#pullrequestreview-5609218015). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T04:20:27Z. **Review:** DISMISSED --- I reviewed the implementation and reported regressions. The cap is reused for both the decision to evict and the final fatal check; imported ranges already held by the build are retained, and the tests exercise both fresh and remembered budget refusals. The Sword of the Sea report usefully shows this removes the copy-cap abort while clearly separating the later heap-allocation failure. I’m requesting changes for these remaining repository requirements: 1. The PR and its validation report are based on main a6dcea9279, while current upstream main is c61d20f54801efc3798555829f6fedcff71ad7ff. Please update the branch and rerun the focused regression and required validation checks against that current base. 2. This AGC change lacks the required same-machine, same-GPU focused comparison on current main and the updated PR head using ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, and ctest -V. Please show that the layer loaded in both runs and compare logs for new VUID errors, with GPU model, driver, and OS. The mock-device red/green cases and title runs are useful but do not provide this required comparison. 3. The proposed behavioral order with #7292 and #8380 still has no explicit confirmation from those authors in the linked PR threads. Please record their agreement and list the agreed predecessors in Depends on. #7844 is already correctly declared; the adjacent/test/debt-only overlaps are separately explained. The existing report includes extensive focused tests and title evidence; I did not rerun them locally. Hosted checks shown here are policy checks only, with product jobs skipped.
EagleBearerYS commented 2026-10-22 05:46:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-22T05:46:54Z.


Thanks, @MarcZX10. On your three points:

  1. The branch has main at ab347d144d merged in (f7d4e920ca), with the PR's own diff unchanged, and the focused tests pass 10 runs in a row on both runners (run).
  2. The validation comparison is in Tested (run): the same tests on main and on this PR, on one Linux runner, with llvmpipe on Mesa 25.2.8 and Ubuntu 24.04.5. The layer loaded in every test process on both sides, and the only message, VUID-VkDeviceCreateInfo-pNext-pNext, appears on both. This PR's own tests run on the mock device, so the comparison adds the real-device guest-memory and host-import tests on the same path.
  3. #7292 and #8380 haven't answered the order note yet. Their answers will go under Depends on when they come.
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6333733988 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9514#issuecomment-6333733988). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-22T05:46:54Z. --- Thanks, @MarcZX10. On your three points: 1. The branch has `main` at ab347d144d merged in (f7d4e920ca), with the PR's own diff unchanged, and the focused tests pass 10 runs in a row on both runners ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39723049448)). 2. The validation comparison is in Tested ([run](https://github.com/EagleBearerYS/AnyPS5/actions/runs/39726267625)): the same tests on `main` and on this PR, on one Linux runner, with llvmpipe on Mesa 25.2.8 and Ubuntu 24.04.5. The layer loaded in every test process on both sides, and the only message, `VUID-VkDeviceCreateInfo-pNext-pNext`, appears on both. This PR's own tests run on the mock device, so the comparison adds the real-device guest-memory and host-import tests on the same path. 3. #7292 and #8380 haven't answered the order note yet. Their answers will go under Depends on when they come.
EdouardSence commented 2026-10-22 09:11:55 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EdouardSence on 2026-10-22T09:11:55Z.


A Linux/RADV data point for the ASTRO BOT Sky Garden case, since the description's ASTRO BOT run is Windows/NVIDIA.

Setup: ASTRO BOT PPSA21567 01.019.000, -lvl underwater_aerial_garden, no input, Ryzen 7 7800X3D, 31 GiB, RX 9070 XT (RADV Mesa 26.2.4), CachyOS kernel 7.3.0. Headless gamescope at 3840x2160, APS5_TRACE_SECONDS=90:50, default host import budget (7807 MiB on main here). All builds are on main d6eafa54d: main, + this PR (f7d4e920c), + #7844, + both (only a doc conflict). One warm-up run per build, then two rounds interleaved. Frame p50 in ms:

Build warm-up round 1 round 2
main 4550 4786 3594
+ #9514 4842 4524 4447
+ #7844 267 256 256
+ #9514 + #7844 257 260 257
  • No build aborts. On this machine Sky Garden never hits AddressCopyOverflow: the budget refuses 22–24 imports on main and with this PR, but nothing logs copies ... past 64 MiB or the PR's eviction line.
  • So this PR doesn't change the frame time here, and it composes with #7844 (same numbers as #7844 alone). It's about frankea's Windows abort, which I can't reproduce here.
  • The ~4.5 s frames on main are not a regression of a merge: at the default budget Sky Garden lands at random in a fast (~0.7 s) or slow (~4.5 s) state on the same build, which explains main's spread here. Details on #7844.

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

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6337116376 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9514#issuecomment-6337116376). Originally posted by [EdouardSence](https://github.com/EdouardSence) on 2026-10-22T09:11:55Z. --- A Linux/RADV data point for the ASTRO BOT Sky Garden case, since the description's ASTRO BOT run is Windows/NVIDIA. **Setup:** ASTRO BOT PPSA21567 01.019.000, `-lvl underwater_aerial_garden`, no input, Ryzen 7 7800X3D, 31 GiB, RX 9070 XT (RADV Mesa 26.2.4), CachyOS kernel 7.3.0. Headless gamescope at 3840x2160, `APS5_TRACE_SECONDS=90:50`, default host import budget (7807 MiB on `main` here). All builds are on `main` d6eafa54d: `main`, + this PR (f7d4e920c), + #7844, + both (only a doc conflict). One warm-up run per build, then two rounds interleaved. Frame p50 in ms: | Build | warm-up | round 1 | round 2 | |---|---|---|---| | `main` | 4550 | 4786 | 3594 | | + #9514 | 4842 | 4524 | 4447 | | + #7844 | 267 | 256 | 256 | | + #9514 + #7844 | 257 | 260 | 257 | - No build aborts. On this machine Sky Garden never hits `AddressCopyOverflow`: the budget refuses 22–24 imports on `main` and with this PR, but nothing logs `copies ... past 64 MiB` or the PR's eviction line. - So this PR doesn't change the frame time here, and it composes with #7844 (same numbers as #7844 alone). It's about frankea's Windows abort, which I can't reproduce here. - The ~4.5 s frames on `main` are not a regression of a merge: at the default budget Sky Garden lands at random in a fast (~0.7 s) or slow (~4.5 s) state on the same build, which explains `main`'s spread here. Details on #7844. *Tested and written by Claude (AI assistant) on a contributor's machine.* AI-assisted: yes
EagleBearerYS commented 2026-10-22 09:30:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by EagleBearerYS on 2026-10-22T09:30:03Z.


@EdouardSence thanks for the Linux/RADV run of ASTRO BOT (PPSA21567)'s Sky Garden, with #7844 alongside. That the cap never trips there, and that the two together give #7844's numbers, is in Tested and on the GPUs tested line now.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6337472991 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9514#issuecomment-6337472991). Originally posted by [EagleBearerYS](https://github.com/EagleBearerYS) on 2026-10-22T09:30:03Z. --- @EdouardSence thanks for the Linux/RADV run of ASTRO BOT (PPSA21567)'s Sky Garden, with #7844 alongside. That the cap never trips there, and that the two together give #7844's numbers, is in Tested and on the GPUs tested line now.
adriadam10 commented 2026-10-24 01:39:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-24T01:39:13Z.

Review: CHANGES_REQUESTED


The full Build of this head merged onto current main fails on Windows only: agc_driver_graphics (run 40046736775, Linux green; both agc_address_copy_cap* tests pass on Windows in that run). The output ends at the failed requirement AGC graphics: the unregistered heap copy range is write-watched, i.e. Require(!AgcDriver::GuestMemory::Watched(0x10000, 0x20000), ...) at tests/BdaResources.cpp:3852, added in 307bf8157a.

  • On Windows Watched answers from the tracker's coverage (GuestMemory.cpp covers: coverage.Covers(...)), which earlier tests in the same process leave behind, so the precondition depends on test order and on what main currently registers. Please make it independent of global state: drop it, Unwatch(0x10000, 0x20000) before the check, or use a range no test can have watched.
  • Please keep the assertions that follow it (heapCopies reasons) as they are.

The rest of the diff is unchanged from the last review.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5636214453 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9514#pullrequestreview-5636214453). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-24T01:39:13Z. **Review:** CHANGES_REQUESTED --- The full Build of this head merged onto current `main` fails on Windows only: `agc_driver_graphics` (run 40046736775, Linux green; both `agc_address_copy_cap*` tests pass on Windows in that run). The output ends at the failed requirement `AGC graphics: the unregistered heap copy range is write-watched`, i.e. `Require(!AgcDriver::GuestMemory::Watched(0x10000, 0x20000), ...)` at `tests/BdaResources.cpp:3852`, added in 307bf8157a. - On Windows `Watched` answers from the tracker's coverage (`GuestMemory.cpp` `covers`: `coverage.Covers(...)`), which earlier tests in the same process leave behind, so the precondition depends on test order and on what `main` currently registers. Please make it independent of global state: drop it, `Unwatch(0x10000, 0x20000)` before the check, or use a range no test can have watched. - Please keep the assertions that follow it (`heapCopies` reasons) as they are. The rest of the diff is unchanged from the last review.
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!9514
No description provided.