perf(libc): skip the known occupied guest arena prefix #7938

Merged
JJenkx merged 1 commit from upstream-pr/7938 into main 2026-11-01 06:17:49 +00:00
JJenkx commented 2026-10-19 15:11:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-19T15:11:45Z.


What

Repeated first-fit guest-arena allocations can rescan the same occupied ranges. Cache the contiguous prefixes already proven occupied from the arena base and from the default-allocation start. Nonempty searches use the cache appropriate to their hint. Releases lower both cached bounds before changing the address map. The existing arena mutex protects both caches.

This rebase preserves current main's default allocation placement, explicit lower hints, alignment and wrap behavior. It adds a cross-range regression alongside the existing 8,192-allocation/partial-release/wrap regression and the independent 4,096-operation page model.

Tested

October 23 rebase qualification: rebased as d1e04a23494cd064f77633711d396633ef90b1c3 onto upstream 11e8ad293422aad5e30e6c8f5c85048d4dc56649. The control f4a99f4fdcb2d8c8770553388a7cdec0e54bea74 uses that exact main production code plus the same GuestMemory.cpp test fixtures as the change. Both coherent Release libs builds pass. Pinned Linux validation bundle. On each arm, guest_memory, guest_mmap_fixed_anonymous and MemoryPoolTest each pass three consecutive runs (9 executions per arm). The tests cover default/lower-hint allocation, cross-range cache invalidation, partial release, wrap and the independent page model. Conventions and whitespace checks pass. A fresh read-only merge preview against main dcd7e3a61e8a361be622c34ca0f907c263331b87 is clean; this is not a claim that those tests were rerun on that newer merge.

Historical title-performance evidence: all timings, traces and summary lines below retain their original pins. They do not measure the October 23 rebase. Fresh current-base Lodoss warmups are staged after the CPU qualification; the scenes must be reviewed before collecting or claiming a new gain.

  • Linux 7.2.9-arch1-1, Ryzen 9 7950X (16 cores/32 threads), Radeon RX 6650 XT, RADV Mesa 26.2.4-arch1.1, Release build.
  • Same three focused tests pass on the original main and candidate with the new model tests in both: guest_memory, guest_mmap_fixed_anonymous, MemoryPoolTest. They also pass after rebasing this one-commit change onto 00d7e611efc97d3d1a1c80e79115a1a1955b2267; libs builds, conventions and whitespace checks pass. Windows/macOS execution was not tested locally.
  • Native title: Record of Lodoss War: Deedlit in Wonder Labyrinth, PPSA05347; stationary opening forest, Deedlit centered, HP 100, attack/jump tutorial visible. Each arm uses its own initially empty shader/Mesa cache, runs the scene once, exits and restarts for capture. No game movement during capture.
  • Historical October 19 pair: main 00d7e611efc97d3d1a1c80e79115a1a1955b2267 against this change 7bc3826c81065e6292f2ced6a8b7affe76b41f47, APS5_TRACE_SECONDS=200:30, no other trace/profile switches, measured stdout attached to the terminal. Both processes exit normally and restore the temporary kernel setting. Screenshots before and after capture are retained for visual review.
  • The trace reports 3840×2160; compositor screenshots are 1536×864 on DP-2. These are different reported sizes, not a claim that the window's pixel dimensions are 3840×2160.
Capture Main FPS Change FPS Difference
Earlier base, AB (10 s) 25.41 26.39 +3.85%
Earlier base, BA (10 s) 24.13 27.22 +12.81%
October 19 tested base, AB (30 s) 24.17 27.59 +14.13%
Historical October 19 frame time Main (ms) Change (ms)
p50 40.320 33.439
p90 49.766 48.620
p99 59.767 61.088
max 66.888 71.270

The earlier AB/BA captures used main bcdee66d109008334b07c0ff73a27e845708675f and candidate 1fda13dc754a5f73062e836942f3be76227bc064, before subsequent upstream AGC merges. Their combined observed FPS difference was +8.21%; that result is historical and is not substituted for the October 19 comparison. Earlier candidate p99 was worse in both pairs (64.381 vs 56.551 ms; 60.372 vs 59.335 ms), despite improved median/p90. All individual distributions remain in the evidence. A few timed windows do not establish statistical significance or a gain across titles.

Historical October 19 official summary lines, main then change:

{"commit":"00d7e611efc9","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"4096","APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"1","APS5_SPIRV_OPT":"full","APS5_TRACE_SECONDS":"200:30"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","resolution":"3840x2160","window":{"spec":"seconds 200:30","first_present":9488,"ms":30035.241},"presents":726,"frame_ms":{"p50":40.32,"p90":49.766,"p99":59.767,"max":66.888},"gpu_busy_ms_per_present":2.273,"worker_busy_pct":{"queue worker 0x0":42.198},"top_phases_ms_per_frame":{"Driver.Packet":17.454,"Driver.Packet.device_lock":12.0,"Graphics.Draw":9.016,"Graphics.Draw.validate":7.257,"Driver.Packet.prepare_memory":4.597,"GpuMutex.wait.label":2.976,"Recorder.Sync":2.878,"GpuMutex.wait.other":2.771},"trace_dropped":false,"trace":"aps5-trace-00d7e611efc9-2460262.json.gz"}
{"commit":"7bc3826c8106","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"4096","APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"1","APS5_SPIRV_OPT":"full","APS5_TRACE_SECONDS":"200:30"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","resolution":"3840x2160","window":{"spec":"seconds 200:30","first_present":9723,"ms":30014.118},"presents":828,"frame_ms":{"p50":33.439,"p90":48.62,"p99":61.088,"max":71.27},"gpu_busy_ms_per_present":2.238,"worker_busy_pct":{"queue worker 0x0":39.379},"top_phases_ms_per_frame":{"Driver.Packet":14.271,"Driver.Packet.device_lock":9.851,"Graphics.Draw":7.277,"Graphics.Draw.validate":5.541,"Driver.Packet.prepare_memory":3.651,"Recorder.Sync":2.48,"GpuMutex.wait.other":2.084,"GpuMutex.wait.label":1.966},"trace_dropped":false,"trace":"aps5-trace-7bc3826c8106-2623542.json.gz"}

The current rebase resolves the GuestArena.cpp conflict by retaining upstream default-placement and lower-hint behavior and using separate prefix bounds for those search regions. Fresh Windows qualification and new Lodoss scene checks are requested on the pinned rebase; they are not included in the retained historical measurements.

Windows CPU qualification (2026-10-23): Windows-worker fresh independent full-library/memory builds on d1e04a2349 and main fixture f4a99f4fdc (production base 11e8ad2934) pass the same three tests three times per arm: 18/18 executions, no skips. All six raw ctest logs were reviewed by Codex. Windows 11 22621 / Ryzen 9 5950X / WinLibs GCC 15.2.0 UCRT r7 / Ninja Release; conventions and whitespace pass. The raw summaries' base field is the moving origin/main, not the tested baseline; both commits have parent 11e8ad2934. Pinned report and retained Windows logs. CPU correctness evidence only; no new title/FPS result.

Current rebase qualification (2026-10-28)

Refreshed onto main 2227f1366188cda5699dd20e2e756a18006a5d4b as 5e59022182b326917f8026302abdc4e5ee35584e. Production and test topic additions/removals are preserved exactly; the test-call conflict retains main’s resident-mapping bookkeeping test and all three arena first-fit regressions. Main fixtures and submodule pointers are retained.

Linux Release: libc/libkernel and guest_memory_tests build; guest_memory passes three consecutive runs with zero skips. Conventions and whitespace pass. This is focused CPU rebase qualification. Existing same-scene/native performance evidence retains its historical pins; no refreshed performance improvement is claimed. AI-assisted: yes.

Source-preservation proofs, builds, controls, logs and JUnit, SHA-256 17fa7113ae7732ef2704bcb76e11ef6528c6fd74684037c27fb1a5b516ce9988. Existing historical platform and title measurements retain their original source pins.

Additional main-conflict refresh — 2026-10-30

Refreshed to a87ce798925b83382f1cfc5e8e82feb967002bb9 against tested main de2ba4cecb30ffb1c04d7e7dd693b03eace96b1b. Original authored changes, authorship and main gitlinks are preserved; publication used an exact old-head lease.

The allocator conflict retains main's __EMSCRIPTEN__ dirty-range tracking and both occupied-prefix rewinds. Existing alignment, partial-free/wrap, first-fit/model and lower-hint regressions are preserved. Fresh libc/libkernel and test builds pass guest_memory, guest_mmap_fixed_anonymous and MemoryPoolTest three times: nine executions, zero skips. The WebAssembly branch was preserved from source and was not executed. Earlier native-title performance and Windows results retain their original pins.

Conventions, whitespace and source preservation checks pass. Latest main 42d009f5f37c8f388b01fbfe38d2e704c792c46f has a clean merge preview; that preview tree was not executed. This refresh adds Linux CPU qualification; it adds no Windows/macOS, SDK, GPU, title or performance execution.

Immutable source, build and test receipts, SHA-256 098ecc93f56b576370b295af428157ef9e4b8ae2dabfdcb9816869be02270985 (download verified). AI-assisted: yes (Codex).

Packaging note: the archive's nested result.json retains an earlier packaging digest. The download SHA-256 above is authoritative; all 81 source/test proof files were checked unchanged, including the raw JUnit counts and published-head patches.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a (libc arena change; native performance captured on AMD RX 6650 XT/RADV as described above)
  • AI-assisted: yes

Slave Zero X startup observations — 2026-10-31

Successful startup repeats show a lower loading marker and less native CPU time, but one candidate startup crashed, and attribution is unresolved. These results do not establish stable operation or a gameplay FPS gain.

Pinned main 60bdb061356db736928eee431cd8bd4c9ba68036, control c0853b4aa591be9b6748d23ab2e32422243a3025, candidate b7bb866126b37793377db290635633c6afc253bc (this PR's unchanged public topic a87ce798925b83382f1cfc5e8e82feb967002bb9 applied to that main). Both local commits are clean and have byte-identical GuestMemory fixtures; the sole production difference is GuestArena.cpp. Both rebuilds pass guest_memory, guest_mmap_fixed_anonymous and guest_mmap_executable, 3/3 groups per arm.

Same machine, PPSA13899 v01.000.006, same inactive ordinary-save seed, same guest executable hash, no input, shader caches disabled (not an OS page-cache cold run). Whole arms serialize through the host FIFO, with an ordinary close scheduled at 180 seconds; early failures are retained.

Successful pair Main final Loading strings marker36 Candidate marker36
A1/B1 61,092.89ms 43,712.35ms
A3/B3 59,080.10ms 44,301.09ms

In A3/B3, native-TTY-to-playerprefs observed time was60.439s vs45.499s. Sampled startup native CPU time was67.75 vs48.95CPU-seconds (windows2.505–60.639s and2.505–45.598s respectively). External host busy time differed: estimated3.645 vs2.232 other core equivalents. Thus the25.0% lower game-reported marker is an observed successful-run result, not an isolated causal estimate. CPU accounting includes all native threads; host-minus-native is an aggregate estimate.

The90:30 traces and100s captures show the same autosave screen, approximately60FPS on both. These are inactive composite captures, without independent active X11 verification. A1/B1 used60:30 and can straddle startup; their traces are excluded from settled-scene comparison.

All six unmodified run receipts are retained: A1,B1,A2,A3,B3 exit0; B2 exits139 at16.1s before the trace, with a host-libc read fault at0x2412a0000. A subsequent debugger run exits normally, but its final diagnostic JSON write fails; that run is excluded from performance. No crash fix is claimed. Every run restores udmabuf64, leaves no private native process, and preserves the original inputs.

Source patches, exact pins, CPU tests, all native receipts including the failure, host/native CPU samples, official traces/digests and reviewed captures. SHA-256 6bb4b7420891b48d2529f6e48162d515dfa6a51e4264f79596d135a7d9b7e2e8 (download verified). No game binaries, raw memory or perf.data. AI-assisted: yes (Codex).

Official same-scene summary lines (A3/B3)
{"commit":"c0853b4aa591","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"90:30"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.6-arch1.1","os":"Linux 7.2.11-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA13899","title":"Slave Zero X","content_version":"01.000.006","resolution":"3840x2160","window":{"spec":"seconds 90:30","first_present":1846,"ms":30013.306},"presents":1799,"frame_ms":{"p50":16.683,"p90":16.692,"p99":16.705,"max":16.945},"gpu_busy_ms_per_present":4.3,"worker_busy_pct":{"queue worker 0x0":99.423},"top_phases_ms_per_frame":{"VideoOut.Flip":16.639,"Driver.Packet":16.564,"VideoOut.Flip.vblank_wait":16.021,"Driver.Packet.rendering_wait":14.779,"Graphics.Draw":1.358,"Graphics.Draw.validate":1.013,"VideoOut.Flip.present":0.575,"Driver.Present":0.569},"trace_dropped":false,"trace":"aps5-trace-c0853b4aa591-1387147.json.gz"}
{"commit":"b7bb866126b3","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"90:30"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.6-arch1.1","os":"Linux 7.2.11-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA13899","title":"Slave Zero X","content_version":"01.000.006","resolution":"3840x2160","window":{"spec":"seconds 90:30","first_present":2749,"ms":30013.324},"presents":1799,"frame_ms":{"p50":16.683,"p90":16.695,"p99":16.707,"max":16.816},"gpu_busy_ms_per_present":5.013,"worker_busy_pct":{"queue worker 0x0":99.409},"top_phases_ms_per_frame":{"VideoOut.Flip":16.636,"Driver.Packet":16.563,"VideoOut.Flip.vblank_wait":16.138,"Driver.Packet.rendering_wait":14.878,"Graphics.Draw":1.272,"Graphics.Draw.validate":0.939,"VideoOut.Flip.present":0.459,"Driver.Present":0.454},"trace_dropped":false,"trace":"aps5-trace-b7bb866126b3-1556590.json.gz"}
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4923153278 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7938). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-19T15:11:45Z. --- ### What Repeated first-fit guest-arena allocations can rescan the same occupied ranges. Cache the contiguous prefixes already proven occupied from the arena base and from the default-allocation start. Nonempty searches use the cache appropriate to their hint. Releases lower both cached bounds before changing the address map. The existing arena mutex protects both caches. This rebase preserves current main's default allocation placement, explicit lower hints, alignment and wrap behavior. It adds a cross-range regression alongside the existing 8,192-allocation/partial-release/wrap regression and the independent 4,096-operation page model. ### Tested **October 23 rebase qualification:** rebased as `d1e04a23494cd064f77633711d396633ef90b1c3` onto upstream `11e8ad293422aad5e30e6c8f5c85048d4dc56649`. The control `f4a99f4fdcb2d8c8770553388a7cdec0e54bea74` uses that exact main production code plus the same `GuestMemory.cpp` test fixtures as the change. Both coherent Release `libs` builds pass. [Pinned Linux validation bundle](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/pr7938-headd1e04a23-linux-validation.tar.gz). On each arm, `guest_memory`, `guest_mmap_fixed_anonymous` and `MemoryPoolTest` each pass three consecutive runs (9 executions per arm). The tests cover default/lower-hint allocation, cross-range cache invalidation, partial release, wrap and the independent page model. Conventions and whitespace checks pass. A fresh read-only merge preview against main `dcd7e3a61e8a361be622c34ca0f907c263331b87` is clean; this is not a claim that those tests were rerun on that newer merge. **Historical title-performance evidence:** all timings, traces and summary lines below retain their original pins. They do not measure the October 23 rebase. Fresh current-base Lodoss warmups are staged after the CPU qualification; the scenes must be reviewed before collecting or claiming a new gain. - Linux 7.2.9-arch1-1, Ryzen 9 7950X (16 cores/32 threads), Radeon RX 6650 XT, RADV Mesa 26.2.4-arch1.1, Release build. - Same three focused tests pass on the original main and candidate with the new model tests in both: `guest_memory`, `guest_mmap_fixed_anonymous`, `MemoryPoolTest`. They also pass after rebasing this one-commit change onto `00d7e611efc97d3d1a1c80e79115a1a1955b2267`; `libs` builds, conventions and whitespace checks pass. Windows/macOS execution was not tested locally. - Native title: Record of Lodoss War: Deedlit in Wonder Labyrinth, PPSA05347; stationary opening forest, Deedlit centered, HP 100, attack/jump tutorial visible. Each arm uses its own initially empty shader/Mesa cache, runs the scene once, exits and restarts for capture. No game movement during capture. - Historical October 19 pair: main `00d7e611efc97d3d1a1c80e79115a1a1955b2267` against this change `7bc3826c81065e6292f2ced6a8b7affe76b41f47`, `APS5_TRACE_SECONDS=200:30`, no other trace/profile switches, measured stdout attached to the terminal. Both processes exit normally and restore the temporary kernel setting. Screenshots before and after capture are retained for visual review. - The trace reports 3840×2160; compositor screenshots are 1536×864 on DP-2. These are different reported sizes, not a claim that the window's pixel dimensions are 3840×2160. | Capture | Main FPS | Change FPS | Difference | |---|---:|---:|---:| | Earlier base, AB (10 s) | 25.41 | 26.39 | +3.85% | | Earlier base, BA (10 s) | 24.13 | 27.22 | +12.81% | | October 19 tested base, AB (30 s) | 24.17 | 27.59 | +14.13% | | Historical October 19 frame time | Main (ms) | Change (ms) | |---|---:|---:| | p50 | 40.320 | 33.439 | | p90 | 49.766 | 48.620 | | p99 | 59.767 | 61.088 | | max | 66.888 | 71.270 | The earlier AB/BA captures used main `bcdee66d109008334b07c0ff73a27e845708675f` and candidate `1fda13dc754a5f73062e836942f3be76227bc064`, before subsequent upstream AGC merges. Their combined observed FPS difference was +8.21%; that result is historical and is not substituted for the October 19 comparison. Earlier candidate p99 was worse in both pairs (64.381 vs 56.551 ms; 60.372 vs 59.335 ms), despite improved median/p90. All individual distributions remain in the evidence. A few timed windows do not establish statistical significance or a gain across titles. Historical October 19 official summary lines, main then change: ```json {"commit":"00d7e611efc9","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"4096","APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"1","APS5_SPIRV_OPT":"full","APS5_TRACE_SECONDS":"200:30"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","resolution":"3840x2160","window":{"spec":"seconds 200:30","first_present":9488,"ms":30035.241},"presents":726,"frame_ms":{"p50":40.32,"p90":49.766,"p99":59.767,"max":66.888},"gpu_busy_ms_per_present":2.273,"worker_busy_pct":{"queue worker 0x0":42.198},"top_phases_ms_per_frame":{"Driver.Packet":17.454,"Driver.Packet.device_lock":12.0,"Graphics.Draw":9.016,"Graphics.Draw.validate":7.257,"Driver.Packet.prepare_memory":4.597,"GpuMutex.wait.label":2.976,"Recorder.Sync":2.878,"GpuMutex.wait.other":2.771},"trace_dropped":false,"trace":"aps5-trace-00d7e611efc9-2460262.json.gz"} {"commit":"7bc3826c8106","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"4096","APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"1","APS5_SPIRV_OPT":"full","APS5_TRACE_SECONDS":"200:30"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","resolution":"3840x2160","window":{"spec":"seconds 200:30","first_present":9723,"ms":30014.118},"presents":828,"frame_ms":{"p50":33.439,"p90":48.62,"p99":61.088,"max":71.27},"gpu_busy_ms_per_present":2.238,"worker_busy_pct":{"queue worker 0x0":39.379},"top_phases_ms_per_frame":{"Driver.Packet":14.271,"Driver.Packet.device_lock":9.851,"Graphics.Draw":7.277,"Graphics.Draw.validate":5.541,"Driver.Packet.prepare_memory":3.651,"Recorder.Sync":2.48,"GpuMutex.wait.other":2.084,"GpuMutex.wait.label":1.966},"trace_dropped":false,"trace":"aps5-trace-7bc3826c8106-2623542.json.gz"} ``` - [main trace](https://github.com/JJenkx/AnyPS5/releases/download/game-library-checks-20261016/aps5-trace-00d7e611efc9-2460262.json.gz); [main trace digest](https://github.com/JJenkx/AnyPS5/releases/download/game-library-checks-20261016/sync146-main-digest.txt) - [candidate trace](https://github.com/JJenkx/AnyPS5/releases/download/game-library-checks-20261016/aps5-trace-7bc3826c8106-2623542.json.gz); [candidate trace digest](https://github.com/JJenkx/AnyPS5/releases/download/game-library-checks-20261016/sync146-candidate-digest.txt) - [Evidence bundle: full traces, digests, protocols, native reports, screenshots, source patch and focused test logs](https://github.com/JJenkx/AnyPS5/releases/download/game-library-checks-20261016/sync146-guest-arena-prefix-evidence.tar.gz). The current rebase resolves the `GuestArena.cpp` conflict by retaining upstream default-placement and lower-hint behavior and using separate prefix bounds for those search regions. Fresh Windows qualification and new Lodoss scene checks are requested on the pinned rebase; they are not included in the retained historical measurements. <!-- 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. --> **Windows CPU qualification (2026-10-23):** Windows-worker fresh independent full-library/memory builds on `d1e04a2349` and main fixture `f4a99f4fdc` (production base `11e8ad2934`) pass the same three tests three times per arm: 18/18 executions, no skips. All six raw ctest logs were reviewed by Codex. Windows 11 22621 / Ryzen 9 5950X / WinLibs GCC 15.2.0 UCRT r7 / Ninja Release; conventions and whitespace pass. The raw summaries' `base` field is the moving `origin/main`, not the tested baseline; both commits have parent `11e8ad2934`. [Pinned report and retained Windows logs](https://github.com/boykopovar/AnyPS5/pull/7938#issuecomment-6376522240). CPU correctness evidence only; no new title/FPS result. <!-- codex-rebase-20261028-repeat-pr7938 --> ### Current rebase qualification (2026-10-28) Refreshed onto `main` `2227f1366188cda5699dd20e2e756a18006a5d4b` as `5e59022182b326917f8026302abdc4e5ee35584e`. Production and test topic additions/removals are preserved exactly; the test-call conflict retains main’s resident-mapping bookkeeping test and all three arena first-fit regressions. Main fixtures and submodule pointers are retained. Linux Release: libc/libkernel and guest_memory_tests build; guest_memory passes three consecutive runs with zero skips. Conventions and whitespace pass. This is focused CPU rebase qualification. Existing same-scene/native performance evidence retains its historical pins; no refreshed performance improvement is claimed. AI-assisted: yes. [Source-preservation proofs, builds, controls, logs and JUnit](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/cpu-http-qualified-linux-20261028.tar.gz), SHA-256 `17fa7113ae7732ef2704bcb76e11ef6528c6fd74684037c27fb1a5b516ce9988`. Existing historical platform and title measurements retain their original source pins. <!-- codex-maintenance-20261030-repeat2-final-7938 --> **Additional main-conflict refresh — 2026-10-30** Refreshed to `a87ce798925b83382f1cfc5e8e82feb967002bb9` against tested main `de2ba4cecb30ffb1c04d7e7dd693b03eace96b1b`. Original authored changes, authorship and main gitlinks are preserved; publication used an exact old-head lease. The allocator conflict retains main's `__EMSCRIPTEN__` dirty-range tracking and both occupied-prefix rewinds. Existing alignment, partial-free/wrap, first-fit/model and lower-hint regressions are preserved. Fresh libc/libkernel and test builds pass `guest_memory`, `guest_mmap_fixed_anonymous` and `MemoryPoolTest` three times: nine executions, zero skips. The WebAssembly branch was preserved from source and was not executed. Earlier native-title performance and Windows results retain their original pins. Conventions, whitespace and source preservation checks pass. Latest main `42d009f5f37c8f388b01fbfe38d2e704c792c46f` has a clean merge preview; that preview tree was not executed. This refresh adds Linux CPU qualification; it adds no Windows/macOS, SDK, GPU, title or performance execution. [Immutable source, build and test receipts](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/final-three-main-de2-cpu-linux-refresh-20261030.tar.gz), SHA-256 `098ecc93f56b576370b295af428157ef9e4b8ae2dabfdcb9816869be02270985` (download verified). AI-assisted: yes (Codex). Packaging note: the archive's nested `result.json` retains an earlier packaging digest. The download SHA-256 above is authoritative; all 81 source/test proof files were checked unchanged, including the raw JUnit counts and published-head patches. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a (libc arena change; native performance captured on AMD RX 6650 XT/RADV as described above) - [x] AI-assisted: yes ### Slave Zero X startup observations — 2026-10-31 <!-- codex-pr7938-slave-startup-20261031 --> Successful startup repeats show a lower loading marker and less native CPU time, but **one candidate startup crashed, and attribution is unresolved**. These results do not establish stable operation or a gameplay FPS gain. Pinned main `60bdb061356db736928eee431cd8bd4c9ba68036`, control `c0853b4aa591be9b6748d23ab2e32422243a3025`, candidate `b7bb866126b37793377db290635633c6afc253bc` (this PR's unchanged public topic `a87ce798925b83382f1cfc5e8e82feb967002bb9` applied to that main). Both local commits are clean and have byte-identical GuestMemory fixtures; the sole production difference is GuestArena.cpp. Both rebuilds pass guest_memory, guest_mmap_fixed_anonymous and guest_mmap_executable, 3/3 groups per arm. Same machine, PPSA13899 v01.000.006, same inactive ordinary-save seed, same guest executable hash, no input, shader caches disabled (not an OS page-cache cold run). Whole arms serialize through the host FIFO, with an ordinary close scheduled at 180 seconds; early failures are retained. | Successful pair | Main final `Loading strings` marker36 | Candidate marker36 | |---|---:|---:| | A1/B1 | 61,092.89ms | 43,712.35ms | | A3/B3 | 59,080.10ms | 44,301.09ms | In A3/B3, native-TTY-to-playerprefs observed time was60.439s vs45.499s. Sampled startup native CPU time was67.75 vs48.95CPU-seconds (windows2.505–60.639s and2.505–45.598s respectively). External host busy time differed: estimated3.645 vs2.232 other core equivalents. Thus the25.0% lower game-reported marker is an observed successful-run result, not an isolated causal estimate. CPU accounting includes all native threads; host-minus-native is an aggregate estimate. The90:30 traces and100s captures show the same autosave screen, approximately60FPS on both. These are inactive composite captures, without independent active X11 verification. A1/B1 used60:30 and can straddle startup; their traces are excluded from settled-scene comparison. All six unmodified run receipts are retained: A1,B1,A2,A3,B3 exit0; B2 exits139 at16.1s before the trace, with a host-libc read fault at0x2412a0000. A subsequent debugger run exits normally, but its final diagnostic JSON write fails; that run is excluded from performance. No crash fix is claimed. Every run restores udmabuf64, leaves no private native process, and preserves the original inputs. [Source patches, exact pins, CPU tests, all native receipts including the failure, host/native CPU samples, official traces/digests and reviewed captures](https://github.com/JJenkx/AnyPS5/releases/download/linux-validation-20261023/pr7938-slave-main60b-startup-20261031.tar.gz). SHA-256 `6bb4b7420891b48d2529f6e48162d515dfa6a51e4264f79596d135a7d9b7e2e8` (download verified). No game binaries, raw memory or perf.data. AI-assisted: yes (Codex). <details><summary>Official same-scene summary lines (A3/B3)</summary> ```json {"commit":"c0853b4aa591","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"90:30"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.6-arch1.1","os":"Linux 7.2.11-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA13899","title":"Slave Zero X","content_version":"01.000.006","resolution":"3840x2160","window":{"spec":"seconds 90:30","first_present":1846,"ms":30013.306},"presents":1799,"frame_ms":{"p50":16.683,"p90":16.692,"p99":16.705,"max":16.945},"gpu_busy_ms_per_present":4.3,"worker_busy_pct":{"queue worker 0x0":99.423},"top_phases_ms_per_frame":{"VideoOut.Flip":16.639,"Driver.Packet":16.564,"VideoOut.Flip.vblank_wait":16.021,"Driver.Packet.rendering_wait":14.779,"Graphics.Draw":1.358,"Graphics.Draw.validate":1.013,"VideoOut.Flip.present":0.575,"Driver.Present":0.569},"trace_dropped":false,"trace":"aps5-trace-c0853b4aa591-1387147.json.gz"} {"commit":"b7bb866126b3","dirty":false,"env":{"APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"90:30"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.6-arch1.1","os":"Linux 7.2.11-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA13899","title":"Slave Zero X","content_version":"01.000.006","resolution":"3840x2160","window":{"spec":"seconds 90:30","first_present":2749,"ms":30013.324},"presents":1799,"frame_ms":{"p50":16.683,"p90":16.695,"p99":16.707,"max":16.816},"gpu_busy_ms_per_present":5.013,"worker_busy_pct":{"queue worker 0x0":99.409},"top_phases_ms_per_frame":{"VideoOut.Flip":16.636,"Driver.Packet":16.563,"VideoOut.Flip.vblank_wait":16.138,"Driver.Packet.rendering_wait":14.878,"Graphics.Draw":1.272,"Graphics.Draw.validate":0.939,"VideoOut.Flip.present":0.459,"Driver.Present":0.454},"trace_dropped":false,"trace":"aps5-trace-b7bb866126b3-1556590.json.gz"} ``` </details>
JJenkx commented 2026-10-19 20:51:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-19T20:51:21Z.


Additional integration evidence: the occupied-prefix change still showed an observed benefit with #7849, #6951 and #6321 present.

This is an incremental composition check, not a fresh unmodified-main comparison or a new dependency. Baseline 0b74bcd8f63465dc7630247d3899531e21e29b44 is upstream 283cde8987 plus those three peers; candidate ad7eb35dbc4d32aabd538a9b3c57edd8260530e4 adds only this PR, cherry-picked locally. Latest fetched main 9127ea36d2 differs from that upstream base only by the syntax-check tooling in #7435. None of the peer code was added to this PR branch.

Same Ryzen 9 7950X / RX 6650 XT, RADV Mesa 26.2.4-arch1.1; PPSA05347 stationary opening forest, centered character, HP100, tutorial visible. Same scripted inputs, initially byte-identical warm shader/Mesa cache clones, pipelined draws and DMA enabled, APS5_TRACE_SECONDS=200:30. Screenshots at190/240 seconds remain visually consistent. One ordered baseline-then-change pair; different first-present indices are preserved in the summaries. This does not establish statistical significance or gains across titles.

Metric Peer baseline + this PR
FPS 29.704 33.226
Frame p50 ms 32.690 29.117
Frame p90 ms 38.852 35.302
Frame p99 ms 46.796 43.296
Frame max ms 69.068 49.968

Observed FPS difference: +11.86%. Both traces report no dropped events. Both native processes exited0, disappeared, and restored the kernel setting to64MiB. libs and guest_memory_tests build; the same19 focused tests pass on baseline and candidate with Vulkan required, shader cache disabled, core validation enabled, no skips/missing layer/VUIDs. Candidate also passes MemoryPoolTest and guest_mmap_fixed_anonymous; conventions/whitespace checks pass. Windows/macOS execution was not tested.

Official summary lines, peer baseline then addition of this PR:

{"commit": "0b74bcd8f634", "dirty": false, "env": {"APS5_DRAW_CACHE_ENTRIES": "4096", "APS5_HOST_IMPORT_MIB": "16384", "APS5_PAD_INPUT_FILE": "<path>", "APS5_PIPELINED_DRAWS": "1", "APS5_PIPELINE_DMA": "1", "APS5_SPIRV_OPT": "full", "APS5_TRACE_SECONDS": "200:30"}, "gpu": "AMD Radeon RX 6650 XT (RADV NAVI23)", "driver": "radv Mesa 26.2.4-arch1.1", "os": "Linux 7.2.9-arch1-1", "resolution": "3840x2160", "window": {"spec": "seconds 200:30", "first_present": 10027, "ms": 30029.949}, "presents": 892, "frame_ms": {"p50": 32.69, "p90": 38.852, "p99": 46.796, "max": 69.068}, "gpu_busy_ms_per_present": 2.212, "worker_busy_pct": {"queue worker 0x0": 22.942}, "top_phases_ms_per_frame": {"Driver.Packet": 7.712, "Graphics.Draw": 3.335, "Graphics.Draw.validate": 1.854, "VideoOut.Flip": 1.691, "Recorder.Sync": 1.683, "VideoOut.Flip.present": 1.647, "Driver.Present": 1.646, "Graphics.Draw.draw_and_resource_release": 1.466}, "trace_dropped": false, "trace": "aps5-trace-0b74bcd8f634-1384082.json.gz"}
{"commit":"ad7eb35dbc4d","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"4096","APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"1","APS5_PIPELINE_DMA":"1","APS5_SPIRV_OPT":"full","APS5_TRACE_SECONDS":"200:30"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","resolution":"3840x2160","window":{"spec":"seconds 200:30","first_present":10323,"ms":30006.941},"presents":997,"frame_ms":{"p50":29.117,"p90":35.302,"p99":43.296,"max":49.968},"gpu_busy_ms_per_present":2.211,"worker_busy_pct":{"queue worker 0x0":25.241},"top_phases_ms_per_frame":{"Driver.Packet":7.587,"Graphics.Draw":3.371,"Graphics.Draw.validate":1.913,"Recorder.Sync":1.713,"VideoOut.Flip":1.671,"VideoOut.Flip.present":1.626,"Driver.Present":1.625,"Graphics.Draw.draw_and_resource_release":1.444},"trace_dropped":false,"trace":"aps5-trace-ad7eb35dbc4d-1557566.json.gz"}

Evidence bundle includes both full traces, summaries, protocols, screenshots, focused logs, source patches and diagnostic CPU reports. Downloaded back and SHA-256 verified: 70d7d42b7f056675958af17970a64cc9ba4d765c32a19fe472b5bbefdd580e9e.

The separate15s CPU samples start at232s, after the official measurement interval. Tree-iteration self samples fell from24.45% to16.44% of sampled user CPU; these are relative shares, not absolute timing. Remaining registry snapshot work is visible through real map/unmap callbacks, which is the next profiling lead.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6277046306 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7938#issuecomment-6277046306). Originally posted by [JJenkx](https://github.com/JJenkx) on 2026-10-19T20:51:21Z. --- Additional integration evidence: the occupied-prefix change still showed an observed benefit with #7849, #6951 and #6321 present. This is an **incremental composition check**, not a fresh unmodified-main comparison or a new dependency. Baseline `0b74bcd8f63465dc7630247d3899531e21e29b44` is upstream `283cde8987` plus those three peers; candidate `ad7eb35dbc4d32aabd538a9b3c57edd8260530e4` adds only this PR, cherry-picked locally. Latest fetched main `9127ea36d2` differs from that upstream base only by the syntax-check tooling in #7435. None of the peer code was added to this PR branch. Same Ryzen 9 7950X / RX 6650 XT, RADV Mesa 26.2.4-arch1.1; PPSA05347 stationary opening forest, centered character, HP100, tutorial visible. Same scripted inputs, initially byte-identical warm shader/Mesa cache clones, pipelined draws and DMA enabled, `APS5_TRACE_SECONDS=200:30`. Screenshots at190/240 seconds remain visually consistent. One ordered baseline-then-change pair; different first-present indices are preserved in the summaries. This does not establish statistical significance or gains across titles. | Metric | Peer baseline | + this PR | |---|---:|---:| | FPS | 29.704 | 33.226 | | Frame p50 ms | 32.690 | 29.117 | | Frame p90 ms | 38.852 | 35.302 | | Frame p99 ms | 46.796 | 43.296 | | Frame max ms | 69.068 | 49.968 | Observed FPS difference: +11.86%. Both traces report no dropped events. Both native processes exited0, disappeared, and restored the kernel setting to64MiB. `libs` and `guest_memory_tests` build; the same19 focused tests pass on baseline and candidate with Vulkan required, shader cache disabled, core validation enabled, no skips/missing layer/VUIDs. Candidate also passes `MemoryPoolTest` and `guest_mmap_fixed_anonymous`; conventions/whitespace checks pass. Windows/macOS execution was not tested. Official summary lines, peer baseline then addition of this PR: ```json {"commit": "0b74bcd8f634", "dirty": false, "env": {"APS5_DRAW_CACHE_ENTRIES": "4096", "APS5_HOST_IMPORT_MIB": "16384", "APS5_PAD_INPUT_FILE": "<path>", "APS5_PIPELINED_DRAWS": "1", "APS5_PIPELINE_DMA": "1", "APS5_SPIRV_OPT": "full", "APS5_TRACE_SECONDS": "200:30"}, "gpu": "AMD Radeon RX 6650 XT (RADV NAVI23)", "driver": "radv Mesa 26.2.4-arch1.1", "os": "Linux 7.2.9-arch1-1", "resolution": "3840x2160", "window": {"spec": "seconds 200:30", "first_present": 10027, "ms": 30029.949}, "presents": 892, "frame_ms": {"p50": 32.69, "p90": 38.852, "p99": 46.796, "max": 69.068}, "gpu_busy_ms_per_present": 2.212, "worker_busy_pct": {"queue worker 0x0": 22.942}, "top_phases_ms_per_frame": {"Driver.Packet": 7.712, "Graphics.Draw": 3.335, "Graphics.Draw.validate": 1.854, "VideoOut.Flip": 1.691, "Recorder.Sync": 1.683, "VideoOut.Flip.present": 1.647, "Driver.Present": 1.646, "Graphics.Draw.draw_and_resource_release": 1.466}, "trace_dropped": false, "trace": "aps5-trace-0b74bcd8f634-1384082.json.gz"} {"commit":"ad7eb35dbc4d","dirty":false,"env":{"APS5_DRAW_CACHE_ENTRIES":"4096","APS5_HOST_IMPORT_MIB":"16384","APS5_PAD_INPUT_FILE":"<path>","APS5_PIPELINED_DRAWS":"1","APS5_PIPELINE_DMA":"1","APS5_SPIRV_OPT":"full","APS5_TRACE_SECONDS":"200:30"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","resolution":"3840x2160","window":{"spec":"seconds 200:30","first_present":10323,"ms":30006.941},"presents":997,"frame_ms":{"p50":29.117,"p90":35.302,"p99":43.296,"max":49.968},"gpu_busy_ms_per_present":2.211,"worker_busy_pct":{"queue worker 0x0":25.241},"top_phases_ms_per_frame":{"Driver.Packet":7.587,"Graphics.Draw":3.371,"Graphics.Draw.validate":1.913,"Recorder.Sync":1.713,"VideoOut.Flip":1.671,"VideoOut.Flip.present":1.626,"Driver.Present":1.625,"Graphics.Draw.draw_and_resource_release":1.444},"trace_dropped":false,"trace":"aps5-trace-ad7eb35dbc4d-1557566.json.gz"} ``` [Evidence bundle](https://github.com/JJenkx/AnyPS5/releases/download/game-library-checks-20261016/sync174-arena-composition-evidence.tar.gz) includes both full traces, summaries, protocols, screenshots, focused logs, source patches and diagnostic CPU reports. Downloaded back and SHA-256 verified: `70d7d42b7f056675958af17970a64cc9ba4d765c32a19fe472b5bbefdd580e9e`. The separate15s CPU samples start at232s, after the official measurement interval. Tree-iteration self samples fell from24.45% to16.44% of sampled user CPU; these are relative shares, not absolute timing. Remaining registry snapshot work is visible through real map/unmap callbacks, which is the next profiling lead.
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!7938
No description provided.