fix(agc): allocate Windows page permissions on demand #8139

Merged
Izamaru merged 5 commits from upstream-pr/8139 into main 2026-10-23 16:45:20 +00:00
Izamaru commented 2026-10-19 23:56:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Izamaru on 2026-10-19T23:56:46Z.


What

On Windows, PageSpan::allocate commits one byte per 4-KiB guest page even when most of the arena has never been queried. Replace that dense allocation with a small atomic directory and 64-KiB metadata chunks allocated when readable pages are recorded.

Missing chunks remain unknown and take the ordinary query path. Recording an inaccessible run does not allocate missing chunks; inaccessible entries in existing chunks are still cached. Invalidation, accessSerial, initialization publication and access flags are retained. Chunks have process lifetime, like the previous flat allocation. Linux retains its flat allocation.

This is a memory-allocation change, independent of merged #6701's write-generation stamps and #7788's Linux image caching. It overlaps the PageSpan implementation in #6921 (run scanning). Sequencing is agreed with @milescoviello: #8139 goes first; after it merges, @milescoviello will rebase #6921 and adapt its summaries to the sparse chunks, preserving the fences and the Linux flat allocation. This PR has no prerequisite and does not bundle #6921. We can help validate the author's rebased #6921 on Windows.

Tested

Current-integration Windows revalidation, 2026-10-23

  • Pinned upstream main: 342ac2eda0696b40775e09eb8c928b180758bc1d.
  • Exact final PR head: 0ef6f9fc9a53f2962b6fa238b0dcb5e6ae1e04c6.
  • Full final-head tree: b655ff3e4424e765ba0d64581f81449067cfabdd.
  • Main-production control: 0ec002d3ddcd5717c68f234527baa82212b470d0, tree d63906895db5de0962eecb33083a02f28840b652.

The main branch advanced during preparation, so the final paired comparison was repeated on the pinned main above. The only merge conflict was in core/libs/prx/libSceAgcDriver/CMakeLists.txt: preserve both main's agc_locks_tests block and this PR's Windows page-state test block. The production GuestMemory.cpp merged automatically; the sparse implementation and PageStates.cpp fixture are unchanged. The diff against the pinned main still contains only the original three files. #6921 is not bundled.

The control uses the pinned main's production code, byte for byte, with only the same CMake registration and PageStates.cpp fixture added so both sides run identical cases. It is a fixture-only control, not a claim that unmodified main already contains these new tests. The exact final commit was created in the fork, fetched by SHA, checked against the complete locally resolved tree, rebuilt and tested before moving the PR branch to it.

Same environment on both sides: Release, Windows 11 build 26200, WinLibs MinGW-w64 GCC 15.2.0 r7; NVIDIA GeForce RTX 4090, driver 617.14; Khronos validation 1.4.363.0.

The same eight behavioral cases pass on both:
agc_page_states, agc_driver_graphics, agc_sparse_buffer_holes, agc_copy_input_kept_bytes, agc_depth_copy_kept_bytes, agc_draw_inputs_copied, agc_space_pending_writes, agc_pending_write_snapshot.

Selection Behavioral cases Metadata regression Khronos instance-layer insertions VUIDs / missing layer / skips
main-production control 0ec002d3d 8/8 expected dense-table failure in a separate run 3 0 / none / none
exact final head 0ef6f9fc9 8/8; 9/9 including metadata pass 3 0 / none / none

Run serially with ctest -V --timeout 30, ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation and loader layer diagnostics. Both behavioral selections confirm three actual Khronos instance-layer insertions and the RTX 4090 device. Their VUID sets are empty; neither log reports the requested layer missing or skipped cases. The page-state and metadata fixtures themselves are CPU tests and create no Vulkan instance.

Fresh-process metadata control on this pinned integration

With main production, agc_page_state_metadata fails as expected with page permissions committed a dense arena table and 262,664,192 bytes incremental private commit. With the exact final head it passes at 102,400 bytes, a 262,561,792-byte (250.40-MiB) reduction in this fixture. Querying an untouched reserved chunk also passes its no-allocation check.

The behavioral fixture covers concurrent first publication, chunk boundaries, guest bytes, reserved holes, protection changes, decommit and recommit through the access observer.

git diff --check and conventions against the pinned main pass. The literal origin/main conventions check was also run; its unrelated upstream findings come from that ref tracking the older fork main.

Limitations: focused synthetic Windows/NVIDIA validation only; no full-suite, Linux runtime, other-vendor GPU, title-runtime, title-unblock, FPS or whole-game memory claim. The 250.40-MiB figure is a metadata-initialization measurement, not a saving measured in Yōtei. Full Windows/Linux CI still requires a collaborator to dispatch the project build workflow for the updated head. Subsequent main commits are outside these pinned results.

The independent Windows 10 reports below retain their original heads and are separate from this author's 2026-10-23 revalidation.

Independent Windows 10 validation

TheSovietWaffle reports that agc_page_states and agc_page_state_metadata pass 5 of 5 on the earlier head 20ddc95c5: Windows 10 Pro 22H2 build 19045, WinLibs GCC 15.2.0, Release, Ryzen system with an RTX 3080 and Radeon iGPU.

This independently extends the page-state and metadata test coverage to Windows 10. These two fixtures exercise CPU-side memory-permission and metadata paths; the listed adapters do not establish Vulkan/GPU coverage. No exact private-commit measurements were supplied, so this report is not an independent measurement of the 250.40-MiB reduction above.

Earlier published head with a baseline

xXPBSXx reports a paired Windows run on the earlier head 2533730bf2: Windows 10 Pro 10.0.19045, Ryzen 7 5800X3D, WinLibs GCC 15.2.0 (MinGW-w64 UCRT), Release. Only agc_page_state_tests was built, with ctest -N confirming the two cases.

  • With the PR, agc_page_states and agc_page_state_metadata both pass in all three runs.
  • For the baseline, the PR's tests/PageStates.cpp was retained and only production Execution/src/GuestMemory.cpp was replaced by merge-base cabd80f472. The behavioral test passes; the metadata test fails in all three runs with page permissions committed a dense arena table and 262,664,192 bytes of initialization private commit.
  • The PR's production source was restored after the control.

This independently reproduces the dense baseline on Windows 10 for that earlier published head. These are CPU permission/metadata fixtures only; no other tests, platforms, full suite or titles were run. No PR-side private-commit value was supplied, so the exact 250.40-MiB reduction above has not been independently remeasured by this report.

Checklist

  • Based on current main; no other open PR implements the same functions — refreshed against the pinned main above. #6921 has an agreed merge order: #8139 first, then the author rebases #6921.
  • 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 — none added
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 4090, driver 617.14, Windows 11 build 26200; earlier independent Windows 10 reports above concern CPU permission/metadata fixtures only
  • AI-assisted: yes, OpenAI Codex; author reviewed and is responsible for the submitted change
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4928992557 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8139). Originally posted by [Izamaru](https://github.com/Izamaru) on 2026-10-19T23:56:46Z. --- ### What On Windows, `PageSpan::allocate` commits one byte per 4-KiB guest page even when most of the arena has never been queried. Replace that dense allocation with a small atomic directory and 64-KiB metadata chunks allocated when readable pages are recorded. Missing chunks remain unknown and take the ordinary query path. Recording an inaccessible run does not allocate missing chunks; inaccessible entries in existing chunks are still cached. Invalidation, `accessSerial`, initialization publication and access flags are retained. Chunks have process lifetime, like the previous flat allocation. Linux retains its flat allocation. This is a memory-allocation change, independent of merged #6701's write-generation stamps and #7788's Linux image caching. It overlaps the `PageSpan` implementation in #6921 (run scanning). [Sequencing is agreed with @milescoviello](https://github.com/boykopovar/AnyPS5/pull/8139#issuecomment-6291362870): **#8139 goes first**; after it merges, @milescoviello will rebase #6921 and adapt its summaries to the sparse chunks, preserving the fences and the Linux flat allocation. This PR has no prerequisite and does not bundle #6921. We can help validate the author's rebased #6921 on Windows. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> **Current-integration Windows revalidation, 2026-10-23** - Pinned upstream main: `342ac2eda0696b40775e09eb8c928b180758bc1d`. - Exact final PR head: `0ef6f9fc9a53f2962b6fa238b0dcb5e6ae1e04c6`. - Full final-head tree: `b655ff3e4424e765ba0d64581f81449067cfabdd`. - Main-production control: `0ec002d3ddcd5717c68f234527baa82212b470d0`, tree `d63906895db5de0962eecb33083a02f28840b652`. The main branch advanced during preparation, so the final paired comparison was repeated on the pinned main above. The only merge conflict was in `core/libs/prx/libSceAgcDriver/CMakeLists.txt`: preserve both main's `agc_locks_tests` block and this PR's Windows page-state test block. The production `GuestMemory.cpp` merged automatically; the sparse implementation and `PageStates.cpp` fixture are unchanged. The diff against the pinned main still contains only the original three files. #6921 is not bundled. The control uses the pinned main's production code, byte for byte, with only the same CMake registration and `PageStates.cpp` fixture added so both sides run identical cases. It is a fixture-only control, not a claim that unmodified main already contains these new tests. The exact final commit was created in the fork, fetched by SHA, checked against the complete locally resolved tree, rebuilt and tested before moving the PR branch to it. Same environment on both sides: Release, Windows 11 build 26200, WinLibs MinGW-w64 GCC 15.2.0 r7; NVIDIA GeForce RTX 4090, driver 617.14; Khronos validation 1.4.363.0. The same eight behavioral cases pass on both: `agc_page_states`, `agc_driver_graphics`, `agc_sparse_buffer_holes`, `agc_copy_input_kept_bytes`, `agc_depth_copy_kept_bytes`, `agc_draw_inputs_copied`, `agc_space_pending_writes`, `agc_pending_write_snapshot`. | Selection | Behavioral cases | Metadata regression | Khronos instance-layer insertions | VUIDs / missing layer / skips | |---|---:|---|---:|---| | main-production control `0ec002d3d` | 8/8 | expected dense-table failure in a separate run | 3 | 0 / none / none | | exact final head `0ef6f9fc9` | 8/8; 9/9 including metadata | pass | 3 | 0 / none / none | Run serially with `ctest -V --timeout 30`, `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` and loader layer diagnostics. Both behavioral selections confirm three actual Khronos instance-layer insertions and the RTX 4090 device. Their VUID sets are empty; neither log reports the requested layer missing or skipped cases. The page-state and metadata fixtures themselves are CPU tests and create no Vulkan instance. **Fresh-process metadata control on this pinned integration** With main production, `agc_page_state_metadata` fails as expected with `page permissions committed a dense arena table` and **262,664,192 bytes** incremental private commit. With the exact final head it passes at **102,400 bytes**, a **262,561,792-byte (250.40-MiB)** reduction in this fixture. Querying an untouched reserved chunk also passes its no-allocation check. The behavioral fixture covers concurrent first publication, chunk boundaries, guest bytes, reserved holes, protection changes, decommit and recommit through the access observer. `git diff --check` and conventions against the pinned main pass. The literal `origin/main` conventions check was also run; its unrelated upstream findings come from that ref tracking the older fork main. Limitations: focused synthetic Windows/NVIDIA validation only; no full-suite, Linux runtime, other-vendor GPU, title-runtime, title-unblock, FPS or whole-game memory claim. The 250.40-MiB figure is a metadata-initialization measurement, not a saving measured in Yōtei. Full Windows/Linux CI still requires a collaborator to dispatch the project build workflow for the updated head. Subsequent main commits are outside these pinned results. The independent Windows 10 reports below retain their original heads and are separate from this author's 2026-10-23 revalidation. ### Independent Windows 10 validation [TheSovietWaffle reports](https://github.com/boykopovar/AnyPS5/pull/8139#issuecomment-6285949718) that `agc_page_states` and `agc_page_state_metadata` pass 5 of 5 on the earlier head `20ddc95c5`: Windows 10 Pro 22H2 build 19045, WinLibs GCC 15.2.0, Release, Ryzen system with an RTX 3080 and Radeon iGPU. This independently extends the page-state and metadata test coverage to Windows 10. These two fixtures exercise CPU-side memory-permission and metadata paths; the listed adapters do not establish Vulkan/GPU coverage. No exact private-commit measurements were supplied, so this report is not an independent measurement of the 250.40-MiB reduction above. #### Earlier published head with a baseline [xXPBSXx reports a paired Windows run](https://github.com/boykopovar/AnyPS5/pull/8139#issuecomment-6305643345) on the earlier head `2533730bf2`: Windows 10 Pro 10.0.19045, Ryzen 7 5800X3D, WinLibs GCC 15.2.0 (MinGW-w64 UCRT), Release. Only `agc_page_state_tests` was built, with `ctest -N` confirming the two cases. - With the PR, `agc_page_states` and `agc_page_state_metadata` both pass in all three runs. - For the baseline, the PR's `tests/PageStates.cpp` was retained and only production `Execution/src/GuestMemory.cpp` was replaced by merge-base `cabd80f472`. The behavioral test passes; the metadata test fails in all three runs with `page permissions committed a dense arena table` and **262,664,192 bytes** of initialization private commit. - The PR's production source was restored after the control. This independently reproduces the dense baseline on Windows 10 for that earlier published head. These are CPU permission/metadata fixtures only; no other tests, platforms, full suite or titles were run. No PR-side private-commit value was supplied, so the exact 250.40-MiB reduction above has not been independently remeasured by this report. ### 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 — refreshed against the pinned main above. #6921 has an [agreed merge order](https://github.com/boykopovar/AnyPS5/pull/8139#issuecomment-6291362870): #8139 first, then the author rebases #6921. - [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 — none added - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 4090, driver 617.14, Windows 11 build 26200; earlier independent Windows 10 reports above concern CPU permission/metadata fixtures only - [x] AI-assisted: yes, OpenAI Codex; author reviewed and is responsible for the submitted change
TheSovietWaffle commented 2026-10-20 07:40:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by TheSovietWaffle on 2026-10-20T07:40:44Z.


Windows 10 data point (Windows 10 Pro 22H2 19045, WinLibs GCC 15.2.0, Release, Ryzen with RTX 3080 and Radeon iGPU), head 20ddc95c5: agc_page_states and agc_page_state_metadata pass 5 of 5.

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6285949718 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8139#issuecomment-6285949718). Originally posted by [TheSovietWaffle](https://github.com/TheSovietWaffle) on 2026-10-20T07:40:44Z. --- Windows 10 data point (Windows 10 Pro 22H2 19045, WinLibs GCC 15.2.0, Release, Ryzen with RTX 3080 and Radeon iGPU), head `20ddc95c5`: `agc_page_states` and `agc_page_state_metadata` pass 5 of 5. AI-assisted: yes (Claude Code).
Izamaru commented 2026-10-20 12:45:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Izamaru on 2026-10-20T12:45:17Z.


@milescoviello, could we agree on sequencing between #8139 and #6921? The changes are complementary: #8139 makes Windows page-state storage sparse, while #6921 accelerates scans using block summaries.

Local merge-tree checks found conflicts in GuestMemory.cpp in either order. The combined implementation needs to preserve sparse allocation, summary invalidation and the concurrency fences.

Would merging #8139 first work for you? We can help adapt and validate the Windows path afterward. If you and the maintainer prefer #6921 first, we can instead rebase #8139 onto it and preserve both behaviors.

Could we agree on the merge order and who handles the combined adaptation before taking #8139 out of draft?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6291146714 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8139#issuecomment-6291146714). Originally posted by [Izamaru](https://github.com/Izamaru) on 2026-10-20T12:45:17Z. --- @milescoviello, could we agree on sequencing between #8139 and #6921? The changes are complementary: #8139 makes Windows page-state storage sparse, while #6921 accelerates scans using block summaries. Local merge-tree checks found conflicts in `GuestMemory.cpp` in either order. The combined implementation needs to preserve sparse allocation, summary invalidation and the concurrency fences. Would merging #8139 first work for you? We can help adapt and validate the Windows path afterward. If you and the maintainer prefer #6921 first, we can instead rebase #8139 onto it and preserve both behaviors. Could we agree on the merge order and who handles the combined adaptation before taking #8139 out of draft?
milescoviello commented 2026-10-20 12:56:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-20T12:56:52Z.


@Izamaru Yes, #8139 first works for me, and I'll handle the combined version in #6921. #8139 fixes how much memory the Windows table commits, while #6921 only speeds up scans, so it makes sense for the fix to go in first.

After #8139 is merged, I'll rebase #6921 onto it:

  • The 64-page summaries move into each Chunk. 65536 entries is a whole number of 64-page blocks, so every chunk carries its own 1024 summary bytes, and the sparse allocation stays as #8139 has it.
  • A chunk that isn't allocated is skipped as one block run, as #8139's run already does for zero.
  • The settle and forget fences stay on the chunk's entries and summaries.
  • Linux keeps one calloc with the summaries after the pages, as #6921 does now.

I'll add a case to your PageStates test with a run that crosses a chunk boundary into an unallocated chunk. If you can, a Windows check of the rebased #6921 would help: agc_page_states plus #6921's GuestAllocations cases.

Thanks also, @TheSovietWaffle, for the Windows run here.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6291362870 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8139#issuecomment-6291362870). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-20T12:56:52Z. --- @Izamaru Yes, #8139 first works for me, and I'll handle the combined version in #6921. #8139 fixes how much memory the Windows table commits, while #6921 only speeds up scans, so it makes sense for the fix to go in first. After #8139 is merged, I'll rebase #6921 onto it: - The 64-page summaries move into each `Chunk`. 65536 entries is a whole number of 64-page blocks, so every chunk carries its own 1024 summary bytes, and the sparse allocation stays as #8139 has it. - A chunk that isn't allocated is skipped as one block run, as #8139's `run` already does for zero. - The `settle` and `forget` fences stay on the chunk's entries and summaries. - Linux keeps one `calloc` with the summaries after the pages, as #6921 does now. I'll add a case to your `PageStates` test with a run that crosses a chunk boundary into an unallocated chunk. If you can, a Windows check of the rebased #6921 would help: `agc_page_states` plus #6921's `GuestAllocations` cases. Thanks also, @TheSovietWaffle, for the Windows run here. AI-assisted: yes (Claude Code)
Izamaru commented 2026-10-20 14:01:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Izamaru on 2026-10-20T14:01:54Z.


@milescoviello Thanks, #8139 first works for us too. I refreshed it against main cabd80f47; the standalone PR still contains only its original three files.

The experiment is now published in our fork: lab/compat-8139-6921 (diff against the pinned main). It combines #8139 at 20ddc95c5 and #6921 at f05f64ab3, based on main 44e3389c8. This is an independent integration experiment for review, not validation of your future rebase.

Pinned published tip: 70cc3909b92c4b3b07defb0c9058c1f94dd0893b. Its complete Git tree 68c20938ba97225d6ddac0ca94b652097603e43e exactly matches the locally tested candidate c6e0b6854756ebf8ee950dd86041214984f68eaf; the original upstream commits are retained in the merge history. The additional Windows fixture is included.

On Windows 11 build 26200, GCC 15.2.0 r7, Release, RTX 4090 driver 617.14:

  • The combined selection passed 10/10. The same nine behavioral tests passed with main's production GuestMemory.cpp and identical fixtures.
  • Our additional agc_page_state_runs case exercises 64/512-page and chunk boundaries, read-only pages, decommit/recommit, synchronized reader/writer transitions and churn. agc_page_states and agc_page_state_runs each passed 20 fresh-process repetitions.
  • Removing only summary clearing in forget made the new test fail on stale writable access; restoring the committed source passed 10/10 again. This checks that the fixture detects that integration defect.
  • The synthetic metadata fixture retained the sparse-allocation saving: 262,664,192 to 102,400 incremental private-commit bytes (250.40 MiB). This is not a whole-game memory measurement.
  • The focused Vulkan runs used ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_LAYER_KHRONOS_validation. All three Vulkan processes per selection confirmed layer insertion; zero VUIDs, missing layers or skipped tests.

The experiment puts the 1024 summary bytes in each 65536-entry chunk, skips missing chunks and preserves the settle/forget fences and Linux flat allocation, consistent with your proposed direction. Linux and the full suite were not run. The agreed order remains #8139 first, then your adapted #6921. We can test agc_page_states plus your GuestAllocations cases when you publish the rebase. No loading-time, FPS or gameplay claim.

AI-assisted: yes (OpenAI Codex); author reviewed and is responsible for the results.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6292673726 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8139#issuecomment-6292673726). Originally posted by [Izamaru](https://github.com/Izamaru) on 2026-10-20T14:01:54Z. --- @milescoviello Thanks, #8139 first works for us too. I refreshed it against main cabd80f47; the standalone PR still contains only its original three files. The experiment is now published in our fork: **[lab/compat-8139-6921](https://github.com/Izamaru/AnyPS5-Yotei/tree/lab/compat-8139-6921)** ([diff against the pinned main](https://github.com/Izamaru/AnyPS5-Yotei/compare/44e3389c882c8ee3249e16933aad6479c3e00d08...70cc3909b92c4b3b07defb0c9058c1f94dd0893b)). It combines #8139 at `20ddc95c5` and #6921 at `f05f64ab3`, based on main `44e3389c8`. This is an independent integration experiment for review, not validation of your future rebase. Pinned published tip: [`70cc3909b92c4b3b07defb0c9058c1f94dd0893b`](https://github.com/Izamaru/AnyPS5-Yotei/commit/70cc3909b92c4b3b07defb0c9058c1f94dd0893b). Its complete Git tree `68c20938ba97225d6ddac0ca94b652097603e43e` exactly matches the locally tested candidate `c6e0b6854756ebf8ee950dd86041214984f68eaf`; the original upstream commits are retained in the merge history. The [additional Windows fixture](https://github.com/Izamaru/AnyPS5-Yotei/blob/70cc3909b92c4b3b07defb0c9058c1f94dd0893b/core/libs/prx/libSceAgcDriver/tests/PageStates.cpp) is included. On Windows 11 build 26200, GCC 15.2.0 r7, Release, RTX 4090 driver 617.14: - The combined selection passed 10/10. The same nine behavioral tests passed with main's production GuestMemory.cpp and identical fixtures. - Our additional agc_page_state_runs case exercises 64/512-page and chunk boundaries, read-only pages, decommit/recommit, synchronized reader/writer transitions and churn. agc_page_states and agc_page_state_runs each passed 20 fresh-process repetitions. - Removing only summary clearing in forget made the new test fail on stale writable access; restoring the committed source passed 10/10 again. This checks that the fixture detects that integration defect. - The synthetic metadata fixture retained the sparse-allocation saving: 262,664,192 to 102,400 incremental private-commit bytes (250.40 MiB). This is not a whole-game memory measurement. - The focused Vulkan runs used ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_LAYER_KHRONOS_validation. All three Vulkan processes per selection confirmed layer insertion; zero VUIDs, missing layers or skipped tests. The experiment puts the 1024 summary bytes in each 65536-entry chunk, skips missing chunks and preserves the settle/forget fences and Linux flat allocation, consistent with your proposed direction. Linux and the full suite were not run. The agreed order remains #8139 first, then your adapted #6921. We can test agc_page_states plus your GuestAllocations cases when you publish the rebase. No loading-time, FPS or gameplay claim. AI-assisted: yes (OpenAI Codex); author reviewed and is responsible for the results.
milescoviello commented 2026-10-20 14:15:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-20T14:15:41Z.


Thanks @Izamaru, that is useful ahead of the rebase. The check that removing the summary clear in forget makes your test fail is exactly the integration defect I would worry about. Yes, please share agc_page_state_runs (a gist or a branch is fine). I will carry it in the rebased #6921 with you credited in the description, next to my GuestAllocations cases, and ping you here when it is up so you can run the Windows side.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6292960170 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8139#issuecomment-6292960170). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-20T14:15:41Z. --- Thanks @Izamaru, that is useful ahead of the rebase. The check that removing the summary clear in `forget` makes your test fail is exactly the integration defect I would worry about. Yes, please share `agc_page_state_runs` (a gist or a branch is fine). I will carry it in the rebased #6921 with you credited in the description, next to my `GuestAllocations` cases, and ping you here when it is up so you can run the Windows side. AI-assisted: yes (Claude Code)
Izamaru commented 2026-10-20 14:24:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Izamaru on 2026-10-20T14:24:52Z.


@milescoviello I updated my earlier comment after your reply with the published lab/compat-8139-6921 branch. The agc_page_state_runs fixture is included; the pinned commit, test results and limitations are all in that updated comment. We can run the Windows checks when your rebase is ready.

AI-assisted: yes (OpenAI Codex).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6293151013 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8139#issuecomment-6293151013). Originally posted by [Izamaru](https://github.com/Izamaru) on 2026-10-20T14:24:52Z. --- @milescoviello I updated [my earlier comment](https://github.com/boykopovar/AnyPS5/pull/8139#issuecomment-6292673726) after your reply with the published [lab/compat-8139-6921 branch](https://github.com/Izamaru/AnyPS5-Yotei/tree/lab/compat-8139-6921). The `agc_page_state_runs` fixture is included; the pinned commit, test results and limitations are all in that updated comment. We can run the Windows checks when your rebase is ready. AI-assisted: yes (OpenAI Codex).
milescoviello commented 2026-10-20 14:27:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-20T14:27:53Z.


Thanks @Izamaru, I will take agc_page_state_runs from lab/compat-8139-6921 for the rebase and credit it.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6293217751 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8139#issuecomment-6293217751). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-20T14:27:53Z. --- Thanks @Izamaru, I will take `agc_page_state_runs` from `lab/compat-8139-6921` for the rebase and credit it. AI-assisted: yes (Claude Code)
xXPBSXx commented 2026-10-21 01:20:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-21T01:20:53Z.


Independent Windows run of this PR with a baseline (data only).

Environment: Windows 10 Pro 10.0.19045, Ryzen 7 5800X3D, WinLibs GCC 15.2.0 (MinGW-w64 UCRT), Release. PR head 2533730bf2; merge-tree against main is clean. I built only agc_page_state_tests; the two tests are agc_page_states and agc_page_state_metadata (ctest -N lists both; the GPU on this machine plays no part in them).

Results (3 runs each):

  • PR head: both tests pass 3/3.
  • Baseline: I kept the PR's tests/PageStates.cpp and replaced only Execution/src/GuestMemory.cpp with its version from the merge base cabd80f472, then rebuilt. agc_page_state_metadata fails 3/3 with page permissions committed a dense arena table and page-permission initialization: 262664192 bytes of private commit; agc_page_states passes. I restored the PR's GuestMemory.cpp afterwards.

This adds the failing baseline to the earlier pass-only Windows data point.

Not run: other platforms, the other tests, the full repository CTest, and any title or console run.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6305643345 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8139#issuecomment-6305643345). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-21T01:20:53Z. --- Independent Windows run of this PR with a baseline (data only). **Environment:** Windows 10 Pro 10.0.19045, Ryzen 7 5800X3D, WinLibs GCC 15.2.0 (MinGW-w64 UCRT), Release. PR head `2533730bf2`; merge-tree against `main` is clean. I built only `agc_page_state_tests`; the two tests are `agc_page_states` and `agc_page_state_metadata` (`ctest -N` lists both; the GPU on this machine plays no part in them). **Results (3 runs each):** - PR head: both tests pass 3/3. - Baseline: I kept the PR's `tests/PageStates.cpp` and replaced only `Execution/src/GuestMemory.cpp` with its version from the merge base `cabd80f472`, then rebuilt. `agc_page_state_metadata` fails 3/3 with `page permissions committed a dense arena table` and `page-permission initialization: 262664192 bytes of private commit`; `agc_page_states` passes. I restored the PR's `GuestMemory.cpp` afterwards. This adds the failing baseline to the earlier pass-only Windows data point. **Not run:** other platforms, the other tests, the full repository CTest, and any title or console run. AI-assisted (Claude Code).
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!8139
No description provided.