fix(agc): cache Linux describePages results (PR #1810 resubmission) #2660

Closed
sridhar777911 wants to merge 3 commits from upstream-pr/2660 into main
sridhar777911 commented 2026-10-10 10:21:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by sridhar777911 on 2026-10-10T10:21:42Z.


Description

This PR safely resubmits PR #1810 which was previously closed due to administrative/conventions issues initially, now resolved.

What

describePages stored the whole VMA that PROCMAP_QUERY or /proc/self/maps returned. Linux merges adjacent anonymous mappings with equal flags, so an arena VMA can span GiBs, and the first table miss inside it after an invalidation rewrote every page of it. Only the pages of the request, rounded out to whole pages, are stored now, as #1791 describes.

Tested

Rechecked conventions locally. Wait for CI tests to pass.

Checklist

  • Tested with ctest
  • Checked with tools/check_conventions.py
  • No inline comments
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4810487619 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2660). Originally posted by [sridhar777911](https://github.com/sridhar777911) on 2026-10-10T10:21:42Z. --- ### Description This PR safely resubmits PR #1810 which was previously closed due to administrative/conventions issues initially, now resolved. ### What describePages stored the whole VMA that PROCMAP_QUERY or /proc/self/maps returned. Linux merges adjacent anonymous mappings with equal flags, so an arena VMA can span GiBs, and the first table miss inside it after an invalidation rewrote every page of it. Only the pages of the request, rounded out to whole pages, are stored now, as #1791 describes. ### Tested Rechecked conventions locally. Wait for CI tests to pass. ### Checklist - [x] Tested with `ctest` - [x] Checked with `tools/check_conventions.py` - [x] No inline comments
github-actions[bot] commented 2026-10-10 10:27:15 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T10:27:15Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#1810 core/libs/prx/libSceAgcDriver/tests/GuestAllocations.cpp L2, L189
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6096557682 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2660#issuecomment-6096557682). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-10T10:27:15Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #1810 | `core/libs/prx/libSceAgcDriver/tests/GuestAllocations.cpp` [L2](https://github.com/boykopovar/AnyPS5/blob/57f96fd2b36563e8380c603a92b1ef0d9d3a6aa4/core/libs/prx/libSceAgcDriver/tests/GuestAllocations.cpp#L2), [L189](https://github.com/boykopovar/AnyPS5/blob/57f96fd2b36563e8380c603a92b1ef0d9d3a6aa4/core/libs/prx/libSceAgcDriver/tests/GuestAllocations.cpp#L189) | | |
ArjenS-LA commented 2026-10-10 10:34:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ArjenS-LA on 2026-10-10T10:34:31Z.


At head 25c5e395, the new GuestAllocations.cpp tests still call Mutation::Add and Mutation::Protect without the gpu argument required by current main. These calls need updating before the Linux test target can compile.

Also, #1810 is still open, and its latest maintainer update already includes that API repair and a regression that fails when caching is reverted. Could the bounded-range recording change here be coordinated with #1810, retaining its regression and Depends on #861? The description currently says #1810 was closed, which doesn’t match its current state.

Made with AI Assistance.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6096611336 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2660#issuecomment-6096611336). Originally posted by [ArjenS-LA](https://github.com/ArjenS-LA) on 2026-10-10T10:34:31Z. --- At head `25c5e395`, the new `GuestAllocations.cpp` tests still call `Mutation::Add` and `Mutation::Protect` without the `gpu` argument required by current main. These calls need updating before the Linux test target can compile. Also, \#1810 is still open, and its latest maintainer update already includes that API repair and a regression that fails when caching is reverted. Could the bounded-range recording change here be coordinated with \#1810, retaining its regression and `Depends on #861`? The description currently says \#1810 was closed, which doesn’t match its current state. Made with AI Assistance.
popcoder565 commented 2026-10-10 15:57:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-10T15:57:35Z.


Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), RTX 3060 Laptop (NVIDIA 616.92), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head 25c5e395, merged onto main 57f96fd2b in one build with 4 other new PRs.

  • The change is Linux-only. On Windows, agc_driver_graphics (which includes GuestAllocations.cpp) passes, so this only checks that the Windows build and test are unaffected.
  • Full ctest in that build: 711 of 711.

No title was run.

🤖 Addressed by Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6099393418 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2660#issuecomment-6099393418). Originally posted by [popcoder565](https://github.com/popcoder565) on 2026-10-10T15:57:35Z. --- Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), RTX 3060 Laptop (NVIDIA 616.92), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head `25c5e395`, merged onto `main` 57f96fd2b in one build with 4 other new PRs. - The change is Linux-only. On Windows, `agc_driver_graphics` (which includes `GuestAllocations.cpp`) passes, so this only checks that the Windows build and test are unaffected. - Full ctest in that build: 711 of 711. No title was run. _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
oneandonlydean commented 2026-10-10 18:08:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-10T18:08:27Z.


Closing: this is #1810, which is still open, and the new test doesn't build on main (Mutation::Add/Protect need the gpu argument). Changes to that fix belong on #1810.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6100605433 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2660#issuecomment-6100605433). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-10T18:08:27Z. --- Closing: this is #1810, which is still open, and the new test doesn't build on main (`Mutation::Add`/`Protect` need the `gpu` argument). Changes to that fix belong on #1810.

Pull request closed

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!2660
No description provided.