perf(libc): arm clean 64 KiB guest blocks under APS5_ARM_BLOCKS #18293
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18293"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by klosixgaming-arch on 2026-11-11T04:17:38Z.
What
This adds on to #16372 by Nesyth. The branch is #16372's head
a1c8c80be5with one commit of mine on top,97bdd198bd, and merges ofmain. Only that commit is new here; the rest of the diff is #16372 and #16371, which #16372 contains. #16372 conflicts with currentmain, and my merges resolve that inRuntimeSwitches,WindowsMappings.hppandWindowsWriteWatch.cpp.Collects of private and resident guest memory call
GetWriteWatchover the whole range, and the call's cost grows with the range, not with the pages written. #16372 answers collects of a resident run without the call once the whole run is settled, but returns the run to write watching for good at its first guest store, and it does not arm private allocations. In Cyberpunk 2077 most runs see a store somewhere, so that arming rarely engages there:APS5_ARM_RESIDENTmade no difference on the intro (+0.2% +- 0.4%, n 9).With
APS5_ARM_BLOCKS, a whole 64 KiB block of committed private or resident read-write memory that three clearing walks found clean is made read-only, and collects skip it while it stays armed.Like
APS5_ARM_RESIDENT, it needs the title relinked with red-zone framing (--frame-red-zonewithAPS5_RELINK_RELOCATE_RED_ZONE=1, #361), so it is off by default;APS5_ABcan toggle it. On Cyberpunk 2077 the relinker framed 4,982 and relocated 512 of the 5,498 leaves that keep values below RSP; 4 were skipped and 3 not relocated. A fault taken inside one of those 7 leaves is the remaining risk, the same as forAPS5_ARM_RESIDENT.Tested
Body Type on current
main, 2026-11-15Cyberpunk 2077 (PPSA03974) 02.120.000, character creator Body Type, 3200x1800; Windows 11 (10.0.26200), RTX 5090 (NVIDIA 617.42), Ryzen 9 9950X3D. Both builds are
mainb39603dbdc+ #19071 (the game only reaches the creator with it); the change is merged on top. Each line is the 20 s trace window opened about 80 s after entering the creator, one boot each, the same environment on both sides. Both sides relink with red-zone framing (--frame-red-zone,APS5_RELINK_RELOCATE_RED_ZONE=1) and setAPS5_ARM_BLOCKS=1;maindoes not read it.main+ #19071 (262be96458), 129 presents in the window:This PR on the same base (
3a39d499e4), 154 presents in the window:In-run A/B on this PR's build,
APS5_AB=10:APS5_ARM_BLOCKSfrom 150 s, phases after 200 s (Body Type): n 15 B-A +14.62 +- 0.57 presents/10 s (+21.5% +- 0.9) A 68.2 B 82.8. B turns arming on: +21.5% +- 0.9.Earlier abort, now gone: when this was written, 1 of 4 boots of this build with arming on aborted 17 s into the intro with "storing storage image results pending over memory outside the write watch without the guest bytes saved before them is not implemented (unit 0 of 1: no copy of its bytes was taken at its upload)". Since #23790 landed on
main, 12 Cyberpunk 2077 boots withAPS5_ARM_BLOCKS=1(75 s each, through the intro) had no abort and no lost device. I take #23790 as the fix for that abort. The switch stays off by default in this PR anyway.Traces, the two summary lines,
tools/trace_digest.pyoutput (digest-mbase-arm.txt,digest-m18293c.txt) and the A/B phases: https://github.com/klosixgaming-arch/AnyPS5/releases/tag/perf-captures-2026-11-15Summary lines of
mainand of this PR (2026-11-10, same machine and session)Cyberpunk 2077 (PPSA03974), the intro movie, 3200x1800, warm caches; Windows 11, RTX 5090 (driver 617.42), Ryzen 9 9950X3D. Each line is its own run with no switches but the capture ones (
APS5_TRACE_SECONDS=60:10,APS5_TRACE_SUMMARY_EVERY=10,APS5_TRACE_EVENTS=1048576) andAPS5_ARM_BLOCKS=1on this PR.mainis relinked as usual; this PR is relinked with--frame-red-zoneandAPS5_RELINK_RELOCATE_RED_ZONE=1. Traces and all summary lines: https://github.com/klosixgaming-arch/AnyPS5/releases/tag/perf-captures-2026-11-10main3339e01f59:this PR,
89aae72dc8, withAPS5_ARM_BLOCKS=1:Steady 10 s windows 3 to 7 of the movie, all on the same machine and day:
APS5_ARM_BLOCKSmain3339e01f59(two runs)89aae72dc889aae72dc889aae72dc8main: this PR withAPS5_ARM_BLOCKS=1ran 7 to 8% faster. These are separate runs, which vary by several percent on this machine, so the in-run A/B below is the number to go by.APS5_AB=10:APS5_ARM_BLOCKS, 12 B phases inside the movie), it gives +13.6%: 40.31 to 45.79 presents per 10 s, B vs neighbouring A +5.49 +- 0.10 (SD 0.35).Recorder.Syncslices per present in the trace windows were 47.1 onmainand 48.2 here, so the gain comes from cheaper collects, not from fewer GPU waits.Pictures. I dumped frames with
APS5_DUMP_FRAMESand the switch on, on this commit's code plus a measurement commit that forces the framing and adds sync counters. The logos, the legal screens and four scenes of the intro movie all render correctly. The contact sheetarmblocks-frames.jpgis in the release.Tests (Windows, RTX 5090), on
89aae72dc8:windows_write_watch(with the newCheckArmedPrivateBlocksandCheckArmedResidentRun),windows_write_watch_verify_direct,guest_owned_memory,windows_mappings_releaseand its three mismatch modes,agc_runtime_switchesandagc_runtime_switches_refusedpass.guest_owned_memory_limitswas not built here.trace_digest.py, main
3339e01f59seconds 60:10 from present 355: 43 presents, frame p50 233.9 / p90 239.5 / p99 243.6 / max 243.6 ms, GPU busy 47.5 ms per present
NVIDIA GeForce RTX 5090, NVIDIA 617.42, Windows 10.0.26200, 3200x1800, commit
3339e01f59, dropped: noSlowest frames (largest slices inside each, inclusive)
Threads (ms per frame)
Largest slices (ms per frame, inclusive, all threads): Driver.Packet 446.6, Driver.Packet.dispatch 221.2, Driver.Packet.memory_wait 202.8, Driver.Dispatch 154.3, Vulkan.Dispatch 108.2
Longest waits
Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)
trace_digest.py, this PR
89aae72dc8with APS5_ARM_BLOCKS=1seconds 60:10 from present 391: 47 presents, frame p50 214.0 / p90 223.7 / p99 233.6 / max 233.6 ms, GPU busy 46.7 ms per present
NVIDIA GeForce RTX 5090, NVIDIA 617.42, Windows 10.0.26200, 3200x1800, commit
89aae72dc8, dropped: noSlowest frames (largest slices inside each, inclusive)
Threads (ms per frame)
Largest slices (ms per frame, inclusive, all threads): Driver.Packet 411.2, Driver.Packet.dispatch 202.7, Driver.Packet.memory_wait 187.1, Driver.Dispatch 143.9, Vulkan.Dispatch 106.2
Longest waits
Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)
Checklist
main(#16372's branch merged withmain3339e01f59); no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Summary by CodeRabbit
APS5_ARM_BLOCKSandAPS5_ARM_RESIDENT.APS5_RELINK_RELOCATE_RED_ZONE.APS5_ARM_COMPARED.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-12T19:15:20Z.
Review: COMMENTED
Reviewed the write-tracking and red-zone changes — no blocking findings
Nothing blocks this; the points below are optional.
What I ran
Head reviewed:
80bb177f33bc7764750167f7aa18fb80c3748194, basemain. No build and no tests were run; this is a review by reading the diff and repository files at the head.Also a content search of
diff.patchfor added comment lines.Results
Findings
Blocking
None.
Non-blocking
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cpp:237: the arm gate forArmBlocksis registered when the driver starts, soAPS5_ABcan switch block arming on at run time. The code cannot tell whether the title was relinked with red-zone relocation, and the PR says that relink is what makes arming safe. Failure scenario: a title relinked withoutAPS5_RELINK_RELOCATE_RED_ZONEruns withAPS5_AB=…:APS5_ARM_BLOCKSturned on; a store into an armed block faults inside a leaf that keeps values below rsp, and the exception dispatch writes below rsp over that value. The default is off, and the requirement is written indocs/dev/ENVIRONMENT.md, so this does not block.Sources
Not verified
windows_write_watchand related tests passing on89aae72dc8, not on the reviewed head80bb177f33. That is an author-reported run, not one I performed.89aae72dc8plus a measurement commit, which is not the reviewed head.guest_memory_limitswas not built (author's note). Linux and the non-Windows paths were not run.comparedWhenSharedstays unset underAPS5_ARM_COMPAREDwas not traced; I checked only that the early return skips the marking inCompareWhenShared.armedPrivateaccess andVirtualProtectcalls inside it) was not traced.walkWritesreads the environment-seededAPS5_ARM_RESIDENTflag while the runtime switch differs after anAPS5_ABtoggle was not traced.diff.patch. Their full text infiles/was not opened. Files excluded by rule: none.To get this to a good state
Nothing is required. Optional: re-run the measurements and the Windows tests on
80bb177f33bcbefore the numbers in the description are quoted for this head.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T01:38:51Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: prevent callers from writing through private allocations after a partial protection change has removed arming metadata.
What I ran
Reviewed head
a7b1a6f5eb2f2e6ad47e0d5f25319f1f0b1140b2using the prepared diff andrepo_read.pyat the pinned head. No commands or tests were run.Results
Findings
Blocking
core/libs/prx/libc/include/WindowsMappings.hpp:248-249: A partialSetProtectionreopens edge blocks that were armed, then erases theirarmedPrivaterecords. The untouched pages in those blocks are left writable, whileCollectonly arms full 64 KiB blocks (noteWalkedBlocks); future writes to those pages therefore do not fault or get reported by write-watch. Preserve tracking for the still-committed portions, or otherwise ensure the remainder stays tracked after the partial protection change.Non-blocking
None.
Not verified
Tests reported in the PR description were not run here. All 20 changed files in the manifest were included, but only the principal write-watch, guest-memory collection, runtime-switch, and red-zone relocation code and relevant test hunks were read; the remaining changed-file bodies were not reviewed. The relinker’s broader instruction coverage and runtime behavior remain unverified.
To get this to a good state
Fix the partial-protection tracking case and add a regression test confirming writes to unaffected pages in an edge block are collected afterward.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T11:04:23Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: investigate and fix the armed private block data loss described below.
What I ran
Reviewed head
24ad1064727f4443ea7b867100e2ecbea0702684using the prepared diff andrepo_read.pyat the pinned head. No build or tests were run.Results
Findings
Blocking
core/libs/prx/libc/include/WindowsMappings.hpp:924: Arming makes a private block read-only, then callsGetWriteWatch(..., WRITE_WATCH_FLAG_RESET, ...). A guest write can occur after the protection change and before this walk; its fault handler records the page inownedPendingand reopens the block. If the write occurs beforeGetWriteWatch, this reset consumes its write-watch mark, while the newly populatedownedPendingis only checked to prevent rearming and is not used by the privateCollectpath to report writes. Thus a write racing the arming sequence can be omitted from the collect result. Preserve/merge the post-protection walk's reported pages with pending fault pages, or otherwise ensure the race cannot consume the write indication before the next collect.Non-blocking
None.
Not verified
No build, unit tests, integration tests, or console run were performed. The author reports one abort in four boots with arming enabled and says its cause is unresolved; the supplied traces and measurements were not independently inspected. The relocation implementation was reviewed only in targeted ranges, not exhaustively.
Files read:
review/description.md,review/commits.md,review/manifest.json,review/README.md,review/diff.patch; targeted head ranges incore/libs/prx/libc/include/WindowsMappings.hpp,core/relinker/codegen/src/x86/RedZoneFramer.cpp,core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cpp, andcore/libs/prx/libSceAgcDriver/Graphics/src/RuntimeSwitches.cpp. All 20 changed files are listed as included in the manifest; not every changed line was read. No files were excluded by the manifest.To get this to a good state
Fix the race in the armed-block transition and add a regression test that exercises a write between protection and the follow-up write-watch reset. Then rerun the relevant Windows write-watch tests and build on the new head.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T23:08:16Z.
Review: COMMENTED
Reviewed — comments
The change adds opt-in guest memory arming and red-zone leaf relocation; an author-reported run aborted with arming enabled, and its cause remains unresolved.
What I ran
Reviewed head
53f68f1a702c6918f837a8784a6fc583421615d2. No commands or tests were run. Readdescription.md,commits.md,manifest.json,diff.patch, and targeted sections ofWindowsMappings.hpp,RedZoneFramer.cpp, and related source search results.Results
Findings
Blocking
None.
Non-blocking
APS5_ARM_BLOCKS=1, with a storage-image error concerning memory outside the write watch; the cause is still unknown. The implementation marks a block armed after making it read-only atcore/libs/prx/libc/include/WindowsMappings.hpp:917-935. Please identify the cause and add coverage for the failing path before enabling this mode broadly.Not verified
The remaining changed source and tests listed in
manifest.jsonwere not read; in particular, the full relocation implementation, its callers, and all test changes were not reviewed. No tests, builds, or console runs were performed by this reviewer. Performance captures and the reported boot failure are author-supplied, not independently verified.To get this to a good state
Nothing is required. Optional: investigate and cover the reported abort before recommending use of
APS5_ARM_BLOCKS.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-17T15:07:31Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this; the points below are optional. The change is opt-in behind
APS5_ARM_BLOCKS, so merging it does not change default builds, but the author's own open abort should be explained before the switch is turned on by default.What I ran
2ed48604de2c67e96965ed98a4a2757c54845c8a, basemain. Merged-preview check: not run.diff.patch(all 21 changed files, as hunks). Read the house-rule sections "Readable reviews", "Accuracy and evidence" and "Standard PR response format".Results
89aae72dc8, not on this headFindings
Blocking
None found.
Non-blocking
core/libs/prx/libc/include/WindowsMappings.hpp:347: the author reports that one of four boots withAPS5_ARM_BLOCKS=1aborted 17 s into the intro with the "storing storage image results pending over memory outside the write watch" message. That message comes from the check atTexture.cpp:7526(not in this diff), which depends on whether a layer counts as tracked. The diff does not change that tracking, so I could not confirm the author's guess that an armed block counts as untracked. The write-fault path at this line is where the armed state changes, so it is the place to look first.core/relinker/codegen/tests/RedZoneFramerTests.cpp:1168: this change adds the relocation cases (refusesRelocatingSegmentOperandsand the others from line 1168). The PR's Tests section lists no run of the red-zone relinker tests, so the relocation logic that arming depends on has no reported run.Not verified
2ed48604de2c67e96965ed98a4a2757c54845c8a. The author reports them on89aae72dc8; I did not run them.GuestMemory.cpp,WindowsMappings.hppandGuestArena.cpp. Only the changed hunks and the short ranges above were read.GuestArenaSetArmGate_nid_no_patchis a no-op there). Not checked.files.jsonwas not read, so the list of files excluded by rule is not given here.Sources
github.com/boykopovar/AnyPS5@2ed48604de/core/libs/prx/libc/include/WindowsMappings.hpp (L347)github.com/boykopovar/AnyPS5@2ed48604de/core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp (L7526)To get this to a good state
Nothing is required. Optional, before the switch is enabled by default:
2ed48604de2c67e96965ed98a4a2757c54845c8aand report them.2ed48604de2c67e96965ed98a4a2757c54845c8a.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-18T02:48:07Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: address the write-watch race when arming clean private blocks.
What I ran
5928e303b54c799ace97bad695183acfe6c7a7ddusing the prepared diff and pinned readerrepo_read.py.Results
Findings
Blocking
core/libs/prx/libc/include/WindowsMappings.hpp:924:armBlockchanges the block toPAGE_READONLYbefore it callsGetWriteWatch(WRITE_WATCH_FLAG_RESET, ...). A guest store in that interval can fault while the block is not yet recorded as armed; the fault handler then does not reopen it. The subsequent walk may report that store and reopen the block if it races before the reset, but a store after the reset and beforeentry.armed = 0xffffucan leave the block read-only and unwatched by the armed-block fault path. The guest write can therefore remain faulting or fail to be reported. Close the interval by establishing fault-handler-visible armed state before protection takes effect, and roll it back safely if validation/reset fails.Non-blocking
Not verified
description.md,commits.md,manifest.json,diff.patch,Lifecycle.cpp,GuestMemory.cpp,RuntimeSwitches.hpp,RuntimeSwitches.cpp,WindowsMappings.hpp,GuestArena.hpp,GuestArena.cpp,GuestMemory.cpptests,WindowsWriteWatch.cpp,RedZoneFramer.hpp,RedZoneFramer.cpp,RedZoneFramerExecutionTests.cpp,RedZoneFramerTests.cpp,WindowsTrampolineBuilder.cpp,Conversion.cpp, andENVIRONMENT.md. Full text was supplied for the manifest's included files; targeted ranges were read for additional implementation context. Excluded files listed infiles.jsonwere not available to inspect.To get this to a good state
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-18T14:27:40Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: investigate and fix the reproducible-in-principle block arming abort described below.
What I ran
Reviewed head
d600aa5651ca0c16dd2a4ec66c89ffe05cd169d9. I read the prepared description, commits, manifest, README and diff, plus targeted Windows write-watch and red-zone relocation code. No build or tests were run.Results
Findings
Blocking
HandleWriterecords the page inownedPendingand reopens the whole block (core/libs/prx/libc/include/WindowsMappings.hpp:354-356). The next private collect limits theGetWriteWatchcapacity to remaining output slots (:819-827), thencollectOwnedWritesthrows if pending pages exceed that capacity (:1189-1191). If the caller supplies a buffer with fewer slots than pending dirty pages, this causes an exception during collection instead of returning the available pages and preserving the rest for later. The new mechanism should retain unreturned pending pages and defer them until capacity is available.Non-blocking
Not verified
To get this to a good state
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T04:10:17Z.
Review: DISMISSED
Reviewed — changes requested
Changes are required before merge: fix private-block arming so a concurrent store between protection and the follow-up write-watch reset cannot be lost.
What I ran
Reviewed head
8030ba31517e229798a5a2e87a5ddd6e84830d29by reading the prepared diff and selected changed code. No commands or tests were run.Results
Findings
Blocking
core/libs/prx/libc/include/WindowsMappings.hpp:412:armBlockmakes the block read-only, invokes the arm hook, then resets write-watch state. A concurrent store can fault while the hook is running; the handler records it inownedPendingand reopens the block. The subsequentGetWriteWatch(WRITE_WATCH_FLAG_RESET, ...)can then consume that store's write-watch mark while leaving the block open. Because the arming path only records pages observed by this reset walk when it reports nonzero pages, that race can lose the store from future collection. Preserve/reconcile the fault's pending page across the reset, or otherwise prevent/reset safely around concurrent writes.Non-blocking
None.
Not verified
No tests or builds were run. The prepared bundle lists 20 changed files, all marked included, but only the diff and selected code were read; the remaining changed-file text and excluded-file listing were not inspected. The author's reported intermittent game abort was not independently reproduced or traced.
To get this to a good state
Fix the concurrent-store/reset race, then rerun the Windows write-watch tests that cover store-while-arming and small collection buffers.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T20:45:51Z.
Review: COMMENTED
Reviewed — comments
The changed code adds optional write-watch arming, but the description reports an unexplained game abort in one of four boots with arming enabled, so the reliability risk remains unresolved.
What I ran
Reviewed head
5256eca0a55a1f34af70800f7cbba0a32485ec1b. I read the prepared description, commits, manifest, and diff, and inspected targeted code throughrepo_read.py. No tests or builds were run.Results
Findings
Blocking
None verified.
Non-blocking
APS5_ARM_BLOCKSenabled, while about 12 boots without arming did not abort. The cause is still a guess. Please identify and fix the failure, then repeat the boot test before recommending this switch for use. The changed arming and pending-write collection paths are incore/libs/prx/libc/include/WindowsMappings.hpp:394andcore/libs/prx/libc/include/WindowsMappings.hpp:1182.Sources
Not verified
No tests, builds, or console runs were performed. The report of the abort is author-supplied and was not independently reproduced. I read targeted ranges in
core/libs/prx/libc/include/WindowsMappings.hpp; other changed files were inspected through the prepared diff, not read in full. The manifest lists all changed files as included, but I did not read every listed file's full text.To get this to a good state
Nothing is required for this comment. Optional: diagnose the reported abort and provide a repeatable run showing the fix.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T04:36:02Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this change based on the code inspected; the reported intermittent abort still needs investigation before enabling block arming broadly.
What I ran
Reviewed head
b9c1bc4fc2bd6e9a6dbbd15394a6f6ae7fbdf1e2using the prepared diff andrepo_read.pytargeted reads. No tests were run.Results
Findings
Blocking
None verified in the inspected code.
Non-blocking
description.md:34). Please investigate before recommending broad use ofAPS5_ARM_BLOCKS; this report alone does not establish a code defect.Not verified
Did not read every changed file or inspect every relinker transformation path. All files marked
included: trueinmanifest.jsonwere available, but only targeted portions ofWindowsMappings.hppandRedZoneFramer.cppplus the description, commits, manifest, and diff were read. No tests or builds were run; the author’s reported runtime measurements and abort were not independently reproduced.To get this to a good state
Nothing is required. The intermittent abort investigation is optional follow-up.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-28T09:51:50Z.
Review: COMMENTED
Actionable comments posted: 8
c14b25e3-8f9f-40b2-88f8-2213c9177884Reviewing files that changed from the base of the PR and between
29b14e4c5eandcf4cc0d004.core/libs/prx/libSceAgcDriver/Execution/src/Driver/Lifecycle.cppcore/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/include/RuntimeSwitches.hppcore/libs/prx/libSceAgcDriver/Graphics/src/RuntimeSwitches.cppcore/libs/prx/libSceAgcDriver/tests/cmake/agc_collect_memo_generation_tests.cmakecore/libs/prx/libSceAgcDriver/tests/cmake/agc_mapped_copy_tests.cmakecore/libs/prx/libSceAgcDriver/tests/cmake/agc_shader_memory_tests.cmakecore/libs/prx/libSceAgcDriver/tests/cmake/agc_write_tracking_tests.cmakecore/libs/prx/libc/include/GuestArena.hppcore/libs/prx/libc/include/WindowsMappings.hppcore/libs/prx/libc/src/GuestArena.cppcore/libs/prx/libkernel/CMakeLists.txtcore/libs/tests/GuestMemory.cppcore/libs/tests/WindowsWriteWatch.cppcore/relinker/codegen/include/codegen/x86/RedZoneFramer.hppcore/relinker/codegen/src/x86/RedZoneFramer.cppcore/relinker/codegen/tests/RedZoneFramerExecutionTests.cppcore/relinker/codegen/tests/RedZoneFramerTests.cppcore/relinker/elfpatcher/src/windows/WindowsTrampolineBuilder.cppcore/relinker/relinker/src/pipeline/Conversion.cppdocs/dev/ENVIRONMENT.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-28T09:57:53Z.
Review: COMMENTED
Reviewed — no blocking findings
The reviewed code supports the described opt-in block arming behavior, but this review is incomplete, so a formal approval is not justified.
What I ran
Head:
cf4cc0d00455faa89c46256410e9a2affbea5eb9. I read the prepared description, commit list, manifest, and diff; no commands or tests were run.Results
Negative control
Not run.
Findings
Blocking
None verified in the code inspected.
Non-blocking
None.
Sources
The arming, write-fault, collection, and lifecycle behavior was checked against the pinned diff and targeted code ranges in
WindowsMappings.hpp,WindowsWriteWatch.cpp,GuestArena.cpp, andLifecycle.cpp.Not verified
This is not a complete review. I did not read every changed file or every changed section. I read
description.md,commits.md,manifest.json, and the first 180 lines ofdiff.patch; targeted repository reads coveredWindowsMappings.hpp,WindowsWriteWatch.cpp,GuestArena.cpp, andRedZoneFramer.cpp. Other changed files and remaining portions of these files were not verified. The separatefiles.jsonexclusion list was unavailable through the reader; the manifest entries inspected mark files as included.To get this to a good state
Nothing is required. Optional: complete the review of the remaining changed files and run the relevant tests before relying on this review for a merge decision.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-29T04:35:42Z.
Review: COMMENTED
Reviewed — no blocking findings
This review is incomplete, so a formal approval or change request is not justified.
What I ran
Inspected the prepared description, commit summary, manifest, and diff for head
972453a932cbaf9f41275f6337d1a47699cb8f1b. No build or tests were run.Results
Findings
Blocking
None verified in the portions inspected.
Non-blocking
None.
Not verified
The diff spans 19 changed files. I inspected the change summary and portions of the diff, including the Windows memory arming logic and its tests, but did not read every changed file or all relevant code paths.
files.jsonwas unavailable through the reader, so excluded files were not verified. Build and runtime behavior are also unverified. The incomplete review does not support approval.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-12-03T10:17:26Z.
Review: COMMENTED
Actionable comments
APS5_ARM_COMPAREDis set.ArmOwnedadmits requests afterownedPendingexceeds its budget.d2867252-a12e-4eb3-a626-35494a9f6520Reviewing files that changed from the base of the PR and between
972453a932and3ce612d3c8.core/libs/prx/libSceAgcDriver/Execution/src/GuestMemory.cppcore/libs/prx/libSceAgcDriver/Graphics/src/RuntimeSwitches.cppcore/libs/prx/libc/include/GuestArena.hppcore/libs/prx/libc/include/WindowsMappings.hppcore/libs/prx/libc/src/GuestArena.cppcore/libs/prx/libkernel/CMakeLists.txtcore/libs/tests/GuestMemory.cppcore/libs/tests/WindowsWriteWatch.cppcore/relinker/relinker/src/pipeline/Conversion.cppdocs/dev/ENVIRONMENT.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-03T10:24:22Z.
Review: COMMENTED
Reviewed — no blocking findings
The prepared diff and targeted source context show no verified blocking defect, but the review is incomplete, so a formal approval is not justified.
What I ran
Reviewed head
3ce612d3c8972e0254cf4ad612b8c92ea0fa4281using the prepared review materials andrepo_read.pyat the pinned head. No tests or builds were run.Results
Findings
Blocking
None verified.
Non-blocking
None reported.
Sources
Not verified
The full contents and behavior of every changed file were not examined; the prepared diff output was truncated, and source review was targeted.
files.jsonlists 22 files underreviewedand none underexcluded. The prepared diff, description, commits, manifest, and files were available; targeted repository context was read forWindowsMappings.hpp,GuestArena.cpp, andRedZoneFramer.cpp.To get this to a good state
Nothing is required. Optional: complete a full review of the remaining changed code before making a formal decision.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T22:33:17Z.
Review: COMMENTED
The trial merge onto
c1601e56d5was clean. The added coverage distinguishes a store while arming a clean block from a later store to an already armed block, and checks that a one-page output buffer does not lose remaining dirty pages. Please keep those paths separate from the resident-run fixture when rebasing the #16372 stack. Any speed claim for the extra arming step needs paired traces that differ only by this change. My review is source-based and I have no native Windows result.AI-assisted: yes.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.