perf(libc): skip write-watch queries for proven clean resident ranges #7473

Merged
Dripl1x merged 4 commits from upstream-pr/7473 into main 2026-10-21 01:55:10 +00:00
Dripl1x commented 2026-10-18 08:47:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Dripl1x on 2026-10-18T08:47:43Z.


What

Item 10 of the graphics/memory performance series. Depends on #7471.

Eligible settled resident runs of at least 256 KiB retain the clean-range proof that skips GetWriteWatch. A first CPU write now restores the logical protection of the entire resident run and leaves that run on native write watching until it is remapped. Repeatedly rewritten buffers therefore do not fault on every 4-KiB page or rearm on every collection.

Windows GPU imports use a separate scoped HostImportAccess guard: it opens protected resident pages and suppresses resident rearming during driver validation/allocation, without marking an aliased shared mapping dirty when nothing was stored. Actual shared writes still invalidate all aliases.

Tested

Rebased onto main 2185dbf92e on 2026-10-21, on top of the rebased #7471 (9d5f8326bf); head 7898b5bd3a (the correction d8b18e7ac is now 7898b5bd3a; the two metadata-only commits are dropped). Conflicts: test insertion points in core/libs/tests/GuestMemory.cpp (main's two #7448 release tests and this PR's tests both stay) and struct View in WindowsMappings.hpp (main's viewBytes stays before hostImports, as Map initialises View positionally). After the rebase guest_memory, guest_mmap_fixed_anonymous and agc_driver_host_import_windows passed 3/3 each and 31 related write-watch, write-tracking, host-import and socket host-write tests 1/1; @screamm's two source controls (arming off; the HostImportAccess bracket removed) fail as expected and pass once restored. Windows 11 build 26300, Ryzen 7 5800H, RTX 3070 Laptop, NVIDIA 617.42, WinLibs GCC 15.2.0 Release. Enabled by default.

The standalone topic passed guest_memory, guest_mmap_fixed_anonymous and the real agc_driver_host_import_windows executable. The new cases cover guest read/pread into a settled protected 2-MiB mapping, import access while collecting, 16 complete write/collect rounds with exactly one access violation in total, and repeated no-store import brackets over a 1-MiB pair of shared aliases. Real writes through the aliases are still found. The inherited 64-KiB no-fault test and 128 collector/writer race iterations remain in place. Vulkan repeated imports, GPU fills and neighboring bytes passed on the standalone topic and combined stack.

Write-heavy 2-MiB probe, one store per 4-KiB page followed by a clearing collect and a clean collect, median of five 256-cycle trials:

Source us per cycle Access violations over 1280 cycles
Pinned main 342.955 0
Previous PR 1771.984 655360
Review correction 339.724 1

This is a memory probe, not an FPS measurement. It removes the repeated per-page exception cost; one initial fault remains for an armed run.

Where it helps

Write collection in the SuperTuxKart scene, main against the series (which includes #7471; the counters show the two together):

Measured main 2185dbf92e main + series
WindowsMappings::Collect calls per frame 365.4 356.6
WindowsMappings::Collect µs per call 21.74 6.89
WindowsMappings::Collect ms per frame 7.94 2.46
GetWriteWatch calls per frame 1,138 270.7
bytes scanned by collectResident per frame 1,670 MiB 79.1 MiB

Counters come from a local probe build that is not part of this PR (review-probe.patch in the evidence archive): the same counters and timers were inserted into main 2185dbf92e and into main with all eleven series PRs merged (#7464 in its rebased form), anchored on function definitions present in both trees. Runs were in the mirrored order main, series with #7464 reduced to its wake only, series, series, reduced series, main, in the scene above with APS5_PROFILE_DRAW=1; values are medians of two runs over the same 8-second window as the trace, starting 20 s after the first flip, per flip. These runs carry profiling overhead and are not used for FPS. Each optimised function below is changed by this PR only; counters show where the work goes, not an isolated FPS gain.

Host I/O contract

The reviewer's unbracketed ReadFile result is reproducible: a native kernel write can fail with ERROR_NOACCESS while a resident clean proof is armed. This raw WinAPI behavior is not claimed to be fixed. Native writes into guest buffers must hold GuestArena::HostWrite, as shared mappings already require. Existing guest read, pread, fread and socket receive destinations already use it; actual guest read/pread into the large protected mapping are now covered explicitly. The requirement is recorded in docs/dev/debt/libc.md. Guest logical permissions are unchanged.

Matched game repeats

SuperTuxKart captures: Windows 11 Pro build 26300, Ryzen 7 5800H, RTX 3070 Laptop GPU, NVIDIA 617.42, WinLibs GCC 15.2.0 r7, Release; SuperTuxKart (PPSA69421) tutorial prompt over the main menu, 1920x1080 internal rendering in a maximized 2560x1369 window, warm shader caches, audio muted, no input; APS5_TRACE_SECONDS=20:8 with APS5_TRACE_EVENTS=1048576, console output not redirected, no profiling switches; 2026-10-21 on main 2185dbf92e, one valid capture per side (two further launches were closed by hand before their window and are excluded), order #7471, this PR.

Capture Build Commit FPS p50 / p90 / p99 ms
rv21-u1-7471r #7471 9d5f8326bf (this PR's dependency) 9d5f8326bfc6 8.325 114.1 / 125.6 / 362.0
rv21-u2-7473 this PR 7898b5bd3ab6 8.680 108.3 / 120.4 / 371.4

Single captures in this scene (8.68 FPS against 8.32 for #7471) are within its run-to-run spread; no FPS claim from them.

Summary lines (main first, then this PR)
{"commit":"9d5f8326bfc6","dirty":false,"env":{"APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"20:8"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 5800H with Radeon Graphics","cpu_threads":16,"memory_mib":64863,"title_id":"PPSA69421","title":"SuperTuxKart","content_version":"00.001.000","resolution":"1920x1080","window":{"spec":"seconds 20:8","first_present":25,"ms":8048.131},"presents":67,"frame_ms":{"p50":114.059,"p90":125.558,"p99":361.996,"max":361.996},"gpu_busy_ms_per_present":5.620,"worker_busy_pct":{"queue worker 0x0":2.765},"top_phases_ms_per_frame":{"Graphics.Draw":11.742,"Graphics.Draw.draw_and_resource_release":10.543,"Vulkan.DrawFromRecipe":8.014,"Graphics.DrawWithRecipe":7.985,"Graphics.DrawWithRecipe.draw_and_resource_release":7.972,"Driver.Packet":3.277,"Recorder.Submit":3.063,"Driver.Packet.draw":2.650},"trace_dropped":false,"trace":"aps5-trace-9d5f8326bfc6-51308.json.gz"}
{"commit":"7898b5bd3ab6","dirty":false,"env":{"APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"20:8"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 5800H with Radeon Graphics","cpu_threads":16,"memory_mib":64863,"title_id":"PPSA69421","title":"SuperTuxKart","content_version":"00.001.000","resolution":"1920x1080","window":{"spec":"seconds 20:8","first_present":25,"ms":8064.956},"presents":70,"frame_ms":{"p50":108.256,"p90":120.373,"p99":371.380,"max":371.380},"gpu_busy_ms_per_present":5.595,"worker_busy_pct":{"queue worker 0x0":2.751},"top_phases_ms_per_frame":{"Graphics.Draw":10.276,"Graphics.Draw.draw_and_resource_release":9.099,"Vulkan.DrawFromRecipe":7.033,"Graphics.DrawWithRecipe":7.004,"Graphics.DrawWithRecipe.draw_and_resource_release":6.989,"Driver.Packet":3.121,"Recorder.Submit":3.009,"Driver.Packet.draw":2.514},"trace_dropped":false,"trace":"aps5-trace-7898b5bd3ab6-7932.json.gz"}
tools/performance_compare.py (first capture of each side)

Performance comparison

Capture Commit Trace Presents Window (ms)
baseline 9d5f8326bf aps5-trace-9d5f8326bfc6-51308.json.gz 67 8048.131
candidate 7898b5bd3a aps5-trace-7898b5bd3ab6-7932.json.gz 70 8064.956
  • Compare captures from the same machine, title and scene; summaries do not record the CPU, title or scene.
  • Changes are candidate minus baseline. A negative frame-time change means a shorter frame interval.
  • A missing top phase is unreported, not zero; its change is unavailable.

Frame and GPU times (ms)

Metric Baseline Candidate Change Change (%)
frame_ms.p50 114.059 108.256 -5.803 -5.088
frame_ms.p90 125.558 120.373 -5.185 -4.130
frame_ms.p99 361.996 371.380 +9.384 +2.592
frame_ms.max 361.996 371.380 +9.384 +2.592
mean_frame_ms 120.121 115.214 -4.908 -4.086
gpu_busy_ms_per_present 5.620 5.595 -0.025 -0.445

Top phases (ms per frame)

Metric Baseline Candidate Change Change (%)
Driver.Packet 3.277 3.121 -0.156 -4.760
Driver.Packet.draw 2.650 2.514 -0.136 -5.132
Graphics.Draw 11.742 10.276 -1.466 -12.485
Graphics.Draw.draw_and_resource_release 10.543 9.099 -1.444 -13.696
Graphics.DrawWithRecipe 7.985 7.004 -0.981 -12.286
Graphics.DrawWithRecipe.draw_and_resource_release 7.972 6.989 -0.983 -12.331
Recorder.Submit 3.063 3.009 -0.054 -1.763
Vulkan.DrawFromRecipe 8.014 7.033 -0.981 -12.241
tools/trace_digest.py output (first capture of each side; all digests are in the evidence archive)

rv21-u1-7471r

seconds 20:8 from present 25: 67 presents, frame p50 114.1 / p90 125.6 / p99 362.0 / max 362.0 ms, GPU busy 5.6 ms per present
NVIDIA GeForce RTX 3070 Laptop GPU, NVIDIA 617.42, Windows 10.0.26300, 1920x1080, commit 9d5f8326bf, dropped: no

{"commit":"9d5f8326bfc6","dirty":false,"env":{"APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"20:8"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 5800H with Radeon Graphics","cpu_threads":16,"memory_mib":64863,"title_id":"PPSA69421","title":"SuperTuxKart","content_version":"00.001.000","resolution":"1920x1080","window":{"spec":"seconds 20:8","first_present":25,"ms":8048.131},"presents":67,"frame_ms":{"p50":114.059,"p90":125.558,"p99":361.996,"max":361.996},"gpu_busy_ms_per_present":5.62,"worker_busy_pct":{"queue worker 0x0":2.765},"top_phases_ms_per_frame":{"Graphics.Draw":11.742,"Graphics.Draw.draw_and_resource_release":10.543,"Vulkan.DrawFromRecipe":8.014,"Graphics.DrawWithRecipe":7.985,"Graphics.DrawWithRecipe.draw_and_resource_release":7.972,"Driver.Packet":3.277,"Recorder.Submit":3.063,"Driver.Packet.draw":2.65},"trace_dropped":false,"trace":"aps5-trace-9d5f8326bfc6-51308.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 25: 362.0 ms at 0 ms: Driver.WorkerWait (queue worker 0x0) 332.1, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x0) 331.9, Graphics.Draw (draw committer) 66.3, Resources.Complete (draw committer) 25.2
  • present 28: 241.8 ms at 603 ms: Driver.WorkerWait (queue worker 0x0) 238.1, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x0) 238.0, Graphics.Draw (draw committer) 11.4, Graphics.Draw.draw_and_resource_release (draw committer) 11.0
  • present 88: 137.9 ms at 7575 ms: Driver.WorkerWait (queue worker 0x0) 133.4, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x0) 133.3, Graphics.Draw (draw committer) 13.5, Graphics.Draw.draw_and_resource_release (draw committer) 13.1

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.0 (0 %) 0.0 (0 %) 120.1 0.4 Recorder.Sync 0.0
queue worker 0x0 2.6 (2 %) 116.1 (97 %) 1.4 3.9 Driver.Packet 2.6, Driver.EndSubmission 0.0
draw committer 22.6 (19 %) 0.8 (1 %) 96.7 0.2 Graphics.Draw 11.7, Vulkan.DrawFromRecipe 8.0
presenter 1.0 (1 %) 0.0 (0 %) 119.1 0.1 VideoOut.Flip 1.0, Driver.Present 0.0
gpu 5.7 (5 %) 0.0 (0 %) 114.5 0.0 batch 5.7

rv21-u2-7473

seconds 20:8 from present 25: 70 presents, frame p50 108.3 / p90 120.4 / p99 371.4 / max 371.4 ms, GPU busy 5.6 ms per present
NVIDIA GeForce RTX 3070 Laptop GPU, NVIDIA 617.42, Windows 10.0.26300, 1920x1080, commit 7898b5bd3a, dropped: no

{"commit":"7898b5bd3ab6","dirty":false,"env":{"APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"20:8"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 5800H with Radeon Graphics","cpu_threads":16,"memory_mib":64863,"title_id":"PPSA69421","title":"SuperTuxKart","content_version":"00.001.000","resolution":"1920x1080","window":{"spec":"seconds 20:8","first_present":25,"ms":8064.956},"presents":70,"frame_ms":{"p50":108.256,"p90":120.373,"p99":371.38,"max":371.38},"gpu_busy_ms_per_present":5.595,"worker_busy_pct":{"queue worker 0x0":2.751},"top_phases_ms_per_frame":{"Graphics.Draw":10.276,"Graphics.Draw.draw_and_resource_release":9.099,"Vulkan.DrawFromRecipe":7.033,"Graphics.DrawWithRecipe":7.004,"Graphics.DrawWithRecipe.draw_and_resource_release":6.989,"Driver.Packet":3.121,"Recorder.Submit":3.009,"Driver.Packet.draw":2.514},"trace_dropped":false,"trace":"aps5-trace-7898b5bd3ab6-7932.json.gz"}

Slowest frames (largest slices inside each, inclusive)

  • present 25: 371.4 ms at 0 ms: Driver.WorkerWait (queue worker 0x0) 341.6, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x0) 341.4, Graphics.Draw (draw committer) 67.0, Resources.Complete (draw committer) 26.7
  • present 28: 254.7 ms at 621 ms: Driver.WorkerWait (queue worker 0x0) 250.5, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x0) 250.4, Graphics.Draw (draw committer) 11.2, Graphics.Draw.draw_and_resource_release (draw committer) 10.8
  • present 26: 135.4 ms at 371 ms: Driver.WorkerWait (queue worker 0x0) 131.3, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x0) 131.2, Graphics.Draw (draw committer) 14.0, Graphics.Draw.draw_and_resource_release (draw committer) 10.2

Threads (ms per frame)

thread busy wait untraced in slices < 20 us largest
title 0.0 (0 %) 0.0 (0 %) 115.2 0.4 Recorder.Sync 0.0
queue worker 0x0 2.5 (2 %) 111.4 (97 %) 1.4 3.9 Driver.Packet 2.5
draw committer 20.1 (17 %) 0.8 (1 %) 94.4 0.2 Graphics.Draw 10.3, Vulkan.DrawFromRecipe 7.0
presenter 1.1 (1 %) 0.0 (0 %) 114.1 0.1 VideoOut.Flip 1.1, Driver.Present 0.0
gpu 5.6 (5 %) 0.0 (0 %) 109.6 0.0 batch 5.6

Isolated title A/B by @screamm (Windows 11, RTX 4070, driver 596.21, this PR on main 1d4164552): vkQuake PPSA99010, shareware demo loop at 3840x2160, 90-s runs, six interleaved pairs. This PR was ahead in all six; over the four quiet pairs main averaged 106.34 FPS and this PR 108.38 FPS (+1.9%), about the size of the main-to-main spread in those pairs (1.8%). A small consistent lead, not an established gain. Middle Ages Ping Pong is vsync-bound (59.94 FPS on both).

The earlier combined-stack repeats below remain for reference:

Same machine, warm caches, automatically maximized window, matching client dimensions, focus and loaded-module hashes verified. SuperTuxKart uses 1920x1080 internal rendering, a 2560x1369 client and trace seconds 20-28. Other titles use trace seconds 8-16. Game output is unredirected and the games close automatically.

Workload Previous series with #7467/#7469/#7470 corrections Plus this correction
SuperTuxKart tutorial/menu, pooled A-B-B-A 31.438 FPS 31.200 FPS
vkQuake moving demo, 3840x2160 54.873 FPS 59.420 FPS
Syobon Action 30.287 FPS 30.299 FPS
Middle Ages Ping Pong 59.941 FPS 59.939 FPS

The SuperTuxKart difference is -0.239 FPS. These results measure the correction in the combined stack and do not establish an isolated gain for this PR. The pinned benchmark base is 6447ed1ed7; the combination retains #6658 and #6678 at previously tested revision 5f822a5008. This is not a new current-main benchmark. Earlier single-capture +2.09% is superseded as evidence for this correction.

UI Lab received the 20-step default navigation sequence. The 17 fresh GPU frame dumps were visually reviewed; artwork, library grids, dialogs and game UI were present in the inspected frames. This is a visual check only: its early seconds 1-6 FPS interval was excluded because the focus guard had not yet established focus at the beginning. It is not included in the FPS table.

Known baseline rendering issue: vkQuake has intermittent flickering/black floor; no rendering repair is claimed here. The combined focused checks and conventions passed; no full-suite CI or console validation is claimed.

Dependencies and overlap

#7471 is required. #6273 widens Windows epoch collections to 64-KiB blocks; this topic avoids native queries for ranges protected by a clean proof. It does not incorporate #6273. #6918 shares the Windows host-import test file and #7448 shares guest-memory test insertion sites; retain both sets of tests when composing. Foreign branches that already conflict with main have not all been composition-tested.

Related series: #7464, #7465, #7466, #7467, #7468, #7469, #7470, #7471, #7472; #7474 is the separate exit-cache correctness fix. The earlier series traces and UI contact sheets remain available in the series evidence release; the table above is the new review-correction repeat, not the earlier release's measurement.

Re-checked on 2026-10-21: rebased on main 2185dbf92e; #7471 is still required and must land first.

Reproduction evidence

Update of 2026-10-21: 7473-evidence.zip (traces, summary lines, trace_digest.py and performance_compare.py output, loaded-module hashes), counters where.json and the probe review-probe.patch with probe_window.py.

Checklist

  • Based on current main (2185dbf92e, rebased 2026-10-21) on top of the rebased #7471
  • Depends on: #7471
  • Fixes: none
  • Unblocks: none
  • One topic; existing PR updated for review feedback.
  • Depends on #7471; no new third-party dependency or opt-in optimization flag.
  • No investigation files or images added to the repository.
  • Focused Windows tests, actual game repeats, conventions and whitespace checked.
  • AI-assisted: yes.
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4907704844 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7473). Originally posted by [Dripl1x](https://github.com/Dripl1x) on 2026-10-18T08:47:43Z. --- ### What Item 10 of the graphics/memory performance series. Depends on #7471. Eligible settled resident runs of at least 256 KiB retain the clean-range proof that skips GetWriteWatch. A first CPU write now restores the logical protection of the entire resident run and leaves that run on native write watching until it is remapped. Repeatedly rewritten buffers therefore do not fault on every 4-KiB page or rearm on every collection. Windows GPU imports use a separate scoped HostImportAccess guard: it opens protected resident pages and suppresses resident rearming during driver validation/allocation, without marking an aliased shared mapping dirty when nothing was stored. Actual shared writes still invalidate all aliases. ### Tested Rebased onto main `2185dbf92e` on 2026-10-21, on top of the rebased #7471 (`9d5f8326bf`); head `7898b5bd3a` (the correction `d8b18e7ac` is now `7898b5bd3a`; the two metadata-only commits are dropped). Conflicts: test insertion points in `core/libs/tests/GuestMemory.cpp` (main's two #7448 release tests and this PR's tests both stay) and `struct View` in `WindowsMappings.hpp` (main's `viewBytes` stays before `hostImports`, as `Map` initialises `View` positionally). After the rebase `guest_memory`, `guest_mmap_fixed_anonymous` and `agc_driver_host_import_windows` passed 3/3 each and 31 related write-watch, write-tracking, host-import and socket host-write tests 1/1; @screamm's two source controls (arming off; the `HostImportAccess` bracket removed) fail as expected and pass once restored. Windows 11 build 26300, Ryzen 7 5800H, RTX 3070 Laptop, NVIDIA 617.42, WinLibs GCC 15.2.0 Release. Enabled by default. The standalone topic passed guest_memory, guest_mmap_fixed_anonymous and the real agc_driver_host_import_windows executable. The new cases cover guest read/pread into a settled protected 2-MiB mapping, import access while collecting, 16 complete write/collect rounds with exactly one access violation in total, and repeated no-store import brackets over a 1-MiB pair of shared aliases. Real writes through the aliases are still found. The inherited 64-KiB no-fault test and 128 collector/writer race iterations remain in place. Vulkan repeated imports, GPU fills and neighboring bytes passed on the standalone topic and combined stack. Write-heavy 2-MiB probe, one store per 4-KiB page followed by a clearing collect and a clean collect, median of five 256-cycle trials: | Source | us per cycle | Access violations over 1280 cycles | |---|---:|---:| | Pinned main | 342.955 | 0 | | Previous PR | 1771.984 | 655360 | | Review correction | 339.724 | 1 | This is a memory probe, not an FPS measurement. It removes the repeated per-page exception cost; one initial fault remains for an armed run. ### Where it helps Write collection in the SuperTuxKart scene, main against the series (which includes #7471; the counters show the two together): | Measured | main `2185dbf92e` | main + series | |---|---:|---:| | `WindowsMappings::Collect` calls per frame | 365.4 | 356.6 | | `WindowsMappings::Collect` µs per call | 21.74 | 6.89 | | `WindowsMappings::Collect` ms per frame | 7.94 | 2.46 | | GetWriteWatch calls per frame | 1,138 | 270.7 | | bytes scanned by collectResident per frame | 1,670 MiB | 79.1 MiB | Counters come from a local probe build that is not part of this PR (`review-probe.patch` in the evidence archive): the same counters and timers were inserted into main `2185dbf92e` and into main with all eleven series PRs merged (#7464 in its rebased form), anchored on function definitions present in both trees. Runs were in the mirrored order main, series with #7464 reduced to its wake only, series, series, reduced series, main, in the scene above with `APS5_PROFILE_DRAW=1`; values are medians of two runs over the same 8-second window as the trace, starting 20 s after the first flip, per flip. These runs carry profiling overhead and are not used for FPS. Each optimised function below is changed by this PR only; counters show where the work goes, not an isolated FPS gain. ### Host I/O contract The reviewer's unbracketed ReadFile result is reproducible: a native kernel write can fail with ERROR_NOACCESS while a resident clean proof is armed. This raw WinAPI behavior is not claimed to be fixed. Native writes into guest buffers must hold GuestArena::HostWrite, as shared mappings already require. Existing guest read, pread, fread and socket receive destinations already use it; actual guest read/pread into the large protected mapping are now covered explicitly. The requirement is recorded in docs/dev/debt/libc.md. Guest logical permissions are unchanged. ### Matched game repeats SuperTuxKart captures: Windows 11 Pro build 26300, Ryzen 7 5800H, RTX 3070 Laptop GPU, NVIDIA 617.42, WinLibs GCC 15.2.0 r7, Release; SuperTuxKart (PPSA69421) tutorial prompt over the main menu, 1920x1080 internal rendering in a maximized 2560x1369 window, warm shader caches, audio muted, no input; `APS5_TRACE_SECONDS=20:8` with `APS5_TRACE_EVENTS=1048576`, console output not redirected, no profiling switches; 2026-10-21 on main `2185dbf92e`, one valid capture per side (two further launches were closed by hand before their window and are excluded), order #7471, this PR. | Capture | Build | Commit | FPS | p50 / p90 / p99 ms | |---|---|---|---:|---| | `rv21-u1-7471r` | #7471 `9d5f8326bf` (this PR's dependency) | `9d5f8326bfc6` | 8.325 | 114.1 / 125.6 / 362.0 | | `rv21-u2-7473` | this PR | `7898b5bd3ab6` | 8.680 | 108.3 / 120.4 / 371.4 | Single captures in this scene (8.68 FPS against 8.32 for #7471) are within its run-to-run spread; no FPS claim from them. <details> <summary>Summary lines (main first, then this PR)</summary> ```json {"commit":"9d5f8326bfc6","dirty":false,"env":{"APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"20:8"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 5800H with Radeon Graphics","cpu_threads":16,"memory_mib":64863,"title_id":"PPSA69421","title":"SuperTuxKart","content_version":"00.001.000","resolution":"1920x1080","window":{"spec":"seconds 20:8","first_present":25,"ms":8048.131},"presents":67,"frame_ms":{"p50":114.059,"p90":125.558,"p99":361.996,"max":361.996},"gpu_busy_ms_per_present":5.620,"worker_busy_pct":{"queue worker 0x0":2.765},"top_phases_ms_per_frame":{"Graphics.Draw":11.742,"Graphics.Draw.draw_and_resource_release":10.543,"Vulkan.DrawFromRecipe":8.014,"Graphics.DrawWithRecipe":7.985,"Graphics.DrawWithRecipe.draw_and_resource_release":7.972,"Driver.Packet":3.277,"Recorder.Submit":3.063,"Driver.Packet.draw":2.650},"trace_dropped":false,"trace":"aps5-trace-9d5f8326bfc6-51308.json.gz"} {"commit":"7898b5bd3ab6","dirty":false,"env":{"APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"20:8"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 5800H with Radeon Graphics","cpu_threads":16,"memory_mib":64863,"title_id":"PPSA69421","title":"SuperTuxKart","content_version":"00.001.000","resolution":"1920x1080","window":{"spec":"seconds 20:8","first_present":25,"ms":8064.956},"presents":70,"frame_ms":{"p50":108.256,"p90":120.373,"p99":371.380,"max":371.380},"gpu_busy_ms_per_present":5.595,"worker_busy_pct":{"queue worker 0x0":2.751},"top_phases_ms_per_frame":{"Graphics.Draw":10.276,"Graphics.Draw.draw_and_resource_release":9.099,"Vulkan.DrawFromRecipe":7.033,"Graphics.DrawWithRecipe":7.004,"Graphics.DrawWithRecipe.draw_and_resource_release":6.989,"Driver.Packet":3.121,"Recorder.Submit":3.009,"Driver.Packet.draw":2.514},"trace_dropped":false,"trace":"aps5-trace-7898b5bd3ab6-7932.json.gz"} ``` </details> <details> <summary><code>tools/performance_compare.py</code> (first capture of each side)</summary> **Performance comparison** | Capture | Commit | Trace | Presents | Window (ms) | | --- | --- | --- | ---: | ---: | | baseline | 9d5f8326bfc6 | aps5-trace-9d5f8326bfc6-51308.json.gz | 67 | 8048.131 | | candidate | 7898b5bd3ab6 | aps5-trace-7898b5bd3ab6-7932.json.gz | 70 | 8064.956 | - Compare captures from the same machine, title and scene; summaries do not record the CPU, title or scene. - Changes are candidate minus baseline. A negative frame-time change means a shorter frame interval. - A missing top phase is unreported, not zero; its change is unavailable. **Frame and GPU times (ms)** | Metric | Baseline | Candidate | Change | Change (%) | | --- | ---: | ---: | ---: | ---: | | frame_ms.p50 | 114.059 | 108.256 | -5.803 | -5.088 | | frame_ms.p90 | 125.558 | 120.373 | -5.185 | -4.130 | | frame_ms.p99 | 361.996 | 371.380 | +9.384 | +2.592 | | frame_ms.max | 361.996 | 371.380 | +9.384 | +2.592 | | mean_frame_ms | 120.121 | 115.214 | -4.908 | -4.086 | | gpu_busy_ms_per_present | 5.620 | 5.595 | -0.025 | -0.445 | **Top phases (ms per frame)** | Metric | Baseline | Candidate | Change | Change (%) | | --- | ---: | ---: | ---: | ---: | | Driver.Packet | 3.277 | 3.121 | -0.156 | -4.760 | | Driver.Packet.draw | 2.650 | 2.514 | -0.136 | -5.132 | | Graphics.Draw | 11.742 | 10.276 | -1.466 | -12.485 | | Graphics.Draw.draw_and_resource_release | 10.543 | 9.099 | -1.444 | -13.696 | | Graphics.DrawWithRecipe | 7.985 | 7.004 | -0.981 | -12.286 | | Graphics.DrawWithRecipe.draw_and_resource_release | 7.972 | 6.989 | -0.983 | -12.331 | | Recorder.Submit | 3.063 | 3.009 | -0.054 | -1.763 | | Vulkan.DrawFromRecipe | 8.014 | 7.033 | -0.981 | -12.241 | </details> <details> <summary><code>tools/trace_digest.py</code> output (first capture of each side; all digests are in the evidence archive)</summary> `rv21-u1-7471r` **seconds 20:8** from present 25: 67 presents, frame p50 114.1 / p90 125.6 / p99 362.0 / max 362.0 ms, GPU busy 5.6 ms per present NVIDIA GeForce RTX 3070 Laptop GPU, NVIDIA 617.42, Windows 10.0.26300, 1920x1080, commit 9d5f8326bfc6, dropped: no ```json {"commit":"9d5f8326bfc6","dirty":false,"env":{"APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"20:8"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 5800H with Radeon Graphics","cpu_threads":16,"memory_mib":64863,"title_id":"PPSA69421","title":"SuperTuxKart","content_version":"00.001.000","resolution":"1920x1080","window":{"spec":"seconds 20:8","first_present":25,"ms":8048.131},"presents":67,"frame_ms":{"p50":114.059,"p90":125.558,"p99":361.996,"max":361.996},"gpu_busy_ms_per_present":5.62,"worker_busy_pct":{"queue worker 0x0":2.765},"top_phases_ms_per_frame":{"Graphics.Draw":11.742,"Graphics.Draw.draw_and_resource_release":10.543,"Vulkan.DrawFromRecipe":8.014,"Graphics.DrawWithRecipe":7.985,"Graphics.DrawWithRecipe.draw_and_resource_release":7.972,"Driver.Packet":3.277,"Recorder.Submit":3.063,"Driver.Packet.draw":2.65},"trace_dropped":false,"trace":"aps5-trace-9d5f8326bfc6-51308.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 25: 362.0 ms at 0 ms: Driver.WorkerWait (queue worker 0x0) 332.1, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x0) 331.9, Graphics.Draw (draw committer) 66.3, Resources.Complete (draw committer) 25.2 - present 28: 241.8 ms at 603 ms: Driver.WorkerWait (queue worker 0x0) 238.1, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x0) 238.0, Graphics.Draw (draw committer) 11.4, Graphics.Draw.draw_and_resource_release (draw committer) 11.0 - present 88: 137.9 ms at 7575 ms: Driver.WorkerWait (queue worker 0x0) 133.4, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x0) 133.3, Graphics.Draw (draw committer) 13.5, Graphics.Draw.draw_and_resource_release (draw committer) 13.1 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.0 (0 %) | 0.0 (0 %) | 120.1 | 0.4 | Recorder.Sync 0.0 | | queue worker 0x0 | 2.6 (2 %) | 116.1 (97 %) | 1.4 | 3.9 | Driver.Packet 2.6, Driver.EndSubmission 0.0 | | draw committer | 22.6 (19 %) | 0.8 (1 %) | 96.7 | 0.2 | Graphics.Draw 11.7, Vulkan.DrawFromRecipe 8.0 | | presenter | 1.0 (1 %) | 0.0 (0 %) | 119.1 | 0.1 | VideoOut.Flip 1.0, Driver.Present 0.0 | | gpu | 5.7 (5 %) | 0.0 (0 %) | 114.5 | 0.0 | batch 5.7 | `rv21-u2-7473` **seconds 20:8** from present 25: 70 presents, frame p50 108.3 / p90 120.4 / p99 371.4 / max 371.4 ms, GPU busy 5.6 ms per present NVIDIA GeForce RTX 3070 Laptop GPU, NVIDIA 617.42, Windows 10.0.26300, 1920x1080, commit 7898b5bd3ab6, dropped: no ```json {"commit":"7898b5bd3ab6","dirty":false,"env":{"APS5_TRACE_EVENTS":"1048576","APS5_TRACE_SECONDS":"20:8"},"gpu":"NVIDIA GeForce RTX 3070 Laptop GPU","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 5800H with Radeon Graphics","cpu_threads":16,"memory_mib":64863,"title_id":"PPSA69421","title":"SuperTuxKart","content_version":"00.001.000","resolution":"1920x1080","window":{"spec":"seconds 20:8","first_present":25,"ms":8064.956},"presents":70,"frame_ms":{"p50":108.256,"p90":120.373,"p99":371.38,"max":371.38},"gpu_busy_ms_per_present":5.595,"worker_busy_pct":{"queue worker 0x0":2.751},"top_phases_ms_per_frame":{"Graphics.Draw":10.276,"Graphics.Draw.draw_and_resource_release":9.099,"Vulkan.DrawFromRecipe":7.033,"Graphics.DrawWithRecipe":7.004,"Graphics.DrawWithRecipe.draw_and_resource_release":6.989,"Driver.Packet":3.121,"Recorder.Submit":3.009,"Driver.Packet.draw":2.514},"trace_dropped":false,"trace":"aps5-trace-7898b5bd3ab6-7932.json.gz"} ``` **Slowest frames** (largest slices inside each, inclusive) - present 25: 371.4 ms at 0 ms: Driver.WorkerWait (queue worker 0x0) 341.6, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x0) 341.4, Graphics.Draw (draw committer) 67.0, Resources.Complete (draw committer) 26.7 - present 28: 254.7 ms at 621 ms: Driver.WorkerWait (queue worker 0x0) 250.5, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x0) 250.4, Graphics.Draw (draw committer) 11.2, Graphics.Draw.draw_and_resource_release (draw committer) 10.8 - present 26: 135.4 ms at 371 ms: Driver.WorkerWait (queue worker 0x0) 131.3, Driver.WorkerWait.idle_and_completion_poll (queue worker 0x0) 131.2, Graphics.Draw (draw committer) 14.0, Graphics.Draw.draw_and_resource_release (draw committer) 10.2 **Threads** (ms per frame) | thread | busy | wait | untraced | in slices < 20 us | largest | |---|---|---|---|---|---| | title | 0.0 (0 %) | 0.0 (0 %) | 115.2 | 0.4 | Recorder.Sync 0.0 | | queue worker 0x0 | 2.5 (2 %) | 111.4 (97 %) | 1.4 | 3.9 | Driver.Packet 2.5 | | draw committer | 20.1 (17 %) | 0.8 (1 %) | 94.4 | 0.2 | Graphics.Draw 10.3, Vulkan.DrawFromRecipe 7.0 | | presenter | 1.1 (1 %) | 0.0 (0 %) | 114.1 | 0.1 | VideoOut.Flip 1.1, Driver.Present 0.0 | | gpu | 5.6 (5 %) | 0.0 (0 %) | 109.6 | 0.0 | batch 5.6 | </details> Isolated title A/B by @screamm (Windows 11, RTX 4070, driver 596.21, this PR on main `1d4164552`): vkQuake PPSA99010, shareware demo loop at 3840x2160, 90-s runs, six interleaved pairs. This PR was ahead in all six; over the four quiet pairs main averaged 106.34 FPS and this PR 108.38 FPS (+1.9%), about the size of the main-to-main spread in those pairs (1.8%). A small consistent lead, not an established gain. Middle Ages Ping Pong is vsync-bound (59.94 FPS on both). The earlier combined-stack repeats below remain for reference: Same machine, warm caches, automatically maximized window, matching client dimensions, focus and loaded-module hashes verified. SuperTuxKart uses 1920x1080 internal rendering, a 2560x1369 client and trace seconds 20-28. Other titles use trace seconds 8-16. Game output is unredirected and the games close automatically. | Workload | Previous series with #7467/#7469/#7470 corrections | Plus this correction | |---|---:|---:| | SuperTuxKart tutorial/menu, pooled A-B-B-A | 31.438 FPS | 31.200 FPS | | vkQuake moving demo, 3840x2160 | 54.873 FPS | 59.420 FPS | | Syobon Action | 30.287 FPS | 30.299 FPS | | Middle Ages Ping Pong | 59.941 FPS | 59.939 FPS | The SuperTuxKart difference is -0.239 FPS. These results measure the correction in the combined stack and do not establish an isolated gain for this PR. The pinned benchmark base is 6447ed1ed7fd11c7eef60df336e8d66fac271188; the combination retains #6658 and #6678 at previously tested revision 5f822a50086fd880d6b4346709b70f8901431f43. This is not a new current-main benchmark. Earlier single-capture +2.09% is superseded as evidence for this correction. UI Lab received the 20-step default navigation sequence. The 17 fresh GPU frame dumps were visually reviewed; artwork, library grids, dialogs and game UI were present in the inspected frames. This is a visual check only: its early seconds 1-6 FPS interval was excluded because the focus guard had not yet established focus at the beginning. It is not included in the FPS table. Known baseline rendering issue: vkQuake has intermittent flickering/black floor; no rendering repair is claimed here. The combined focused checks and conventions passed; no full-suite CI or console validation is claimed. ### Dependencies and overlap #7471 is required. #6273 widens Windows epoch collections to 64-KiB blocks; this topic avoids native queries for ranges protected by a clean proof. It does not incorporate #6273. #6918 shares the Windows host-import test file and #7448 shares guest-memory test insertion sites; retain both sets of tests when composing. Foreign branches that already conflict with main have not all been composition-tested. Related series: #7464, #7465, #7466, #7467, #7468, #7469, #7470, #7471, #7472; #7474 is the separate exit-cache correctness fix. The earlier series traces and UI contact sheets remain available in the [series evidence release](https://github.com/Dripl1x/AnyPS5/releases/tag/performance-series-20261018); the table above is the new review-correction repeat, not the earlier release's measurement. Re-checked on 2026-10-21: rebased on main `2185dbf92e`; #7471 is still required and must land first. ### Reproduction evidence Update of 2026-10-21: [7473-evidence.zip](https://github.com/Dripl1x/AnyPS5/releases/download/review-20261021/7473-evidence.zip) (traces, summary lines, `trace_digest.py` and `performance_compare.py` output, loaded-module hashes), counters [where.json](https://github.com/Dripl1x/AnyPS5/releases/download/review-20261021/where.json) and the probe [review-probe.patch](https://github.com/Dripl1x/AnyPS5/releases/download/review-20261021/review-probe.patch) with [probe_window.py](https://github.com/Dripl1x/AnyPS5/releases/download/review-20261021/probe_window.py). ### Checklist - [x] Based on current `main` (`2185dbf92e`, rebased 2026-10-21) on top of the rebased #7471 - [x] Depends on: #7471 - [x] Fixes: none - [x] Unblocks: none - One topic; existing PR updated for review feedback. - Depends on #7471; no new third-party dependency or opt-in optimization flag. - No investigation files or images added to the repository. - Focused Windows tests, actual game repeats, conventions and whitespace checked. - AI-assisted: yes.
github-actions[bot] commented 2026-10-18 08:58:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-18T08:58:29Z.


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
PR 3965 docs/dev/debt/libc.md L65
PR 6918 core/libs/prx/libSceAgcDriver/tests/execution/HostImportWindows.cpp L126, L138

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 1191 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 1835 core/libs/prx/libc/src/GuestArena.cpp
PR 2434 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 4448 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 4449 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libc/include/GuestArena.hpp
core/libs/prx/libc/src/GuestArena.cpp
core/libs/tests/GuestMemory.cpp
PR 5021 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libc/src/GuestArena.cpp
core/libs/tests/GuestMemory.cpp
docs/dev/debt/libc.md
PR 5372 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6044 core/libs/tests/GuestMemory.cpp
PR 6146 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6185 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6186 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6226 docs/dev/debt/libc.md
PR 6292 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6321 core/libs/tests/GuestMemory.cpp
PR 6469 core/libs/prx/libc/src/GuestArena.cpp
core/libs/tests/GuestMemory.cpp
docs/dev/debt/libc.md
PR 6481 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6548 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6615 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6636 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6682 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6819 docs/dev/debt/libc.md
PR 6879 core/libs/prx/libc/src/GuestArena.cpp
core/libs/tests/GuestMemory.cpp
PR 6926 core/libs/prx/libc/include/GuestArena.hpp
core/libs/prx/libc/src/GuestArena.cpp
PR 6947 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7081 docs/dev/debt/libc.md
PR 7105 core/libs/tests/GuestMemory.cpp
PR 7201 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libc/src/GuestArena.cpp
PR 7446 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7514 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7622 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7642 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7648 docs/dev/debt/libc.md
PR 7715 docs/dev/debt/libc.md
PR 8150 docs/dev/debt/libc.md
PR 8352 docs/dev/debt/libc.md
PR 8520 docs/dev/debt/libc.md
PR 8550 docs/dev/debt/libc.md
PR 8711 docs/dev/debt/libc.md
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6247961296 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7473#issuecomment-6247961296). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-18T08:58:29Z. --- <!-- 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 | |---|---|---|---| | [PR 3965](https://www.github.com/boykopovar/AnyPS5/pull/3965) | `docs/dev/debt/libc.md` [L65](https://github.com/boykopovar/AnyPS5/blob/6c12024f7d9bceb93c9c9030126212ea37aee239/docs/dev/debt/libc.md#L65) | | | | [PR 6918](https://www.github.com/boykopovar/AnyPS5/pull/6918) | `core/libs/prx/libSceAgcDriver/tests/execution/HostImportWindows.cpp` [L126](https://github.com/boykopovar/AnyPS5/blob/6c12024f7d9bceb93c9c9030126212ea37aee239/core/libs/prx/libSceAgcDriver/tests/execution/HostImportWindows.cpp#L126), [L138](https://github.com/boykopovar/AnyPS5/blob/6c12024f7d9bceb93c9c9030126212ea37aee239/core/libs/prx/libSceAgcDriver/tests/execution/HostImportWindows.cpp#L138) | | | Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap. | Pull request | Shared files not compared | |---|---| | [PR 1191](https://www.github.com/boykopovar/AnyPS5/pull/1191) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 1835](https://www.github.com/boykopovar/AnyPS5/pull/1835) | `core/libs/prx/libc/src/GuestArena.cpp` | | [PR 2434](https://www.github.com/boykopovar/AnyPS5/pull/2434) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 4448](https://www.github.com/boykopovar/AnyPS5/pull/4448) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 4449](https://www.github.com/boykopovar/AnyPS5/pull/4449) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libc/include/GuestArena.hpp`<br>`core/libs/prx/libc/src/GuestArena.cpp`<br>`core/libs/tests/GuestMemory.cpp` | | [PR 5021](https://www.github.com/boykopovar/AnyPS5/pull/5021) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libc/src/GuestArena.cpp`<br>`core/libs/tests/GuestMemory.cpp`<br>`docs/dev/debt/libc.md` | | [PR 5372](https://www.github.com/boykopovar/AnyPS5/pull/5372) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6044](https://www.github.com/boykopovar/AnyPS5/pull/6044) | `core/libs/tests/GuestMemory.cpp` | | [PR 6146](https://www.github.com/boykopovar/AnyPS5/pull/6146) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6185](https://www.github.com/boykopovar/AnyPS5/pull/6185) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6186](https://www.github.com/boykopovar/AnyPS5/pull/6186) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6197](https://www.github.com/boykopovar/AnyPS5/pull/6197) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6226](https://www.github.com/boykopovar/AnyPS5/pull/6226) | `docs/dev/debt/libc.md` | | [PR 6292](https://www.github.com/boykopovar/AnyPS5/pull/6292) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6321](https://www.github.com/boykopovar/AnyPS5/pull/6321) | `core/libs/tests/GuestMemory.cpp` | | [PR 6469](https://www.github.com/boykopovar/AnyPS5/pull/6469) | `core/libs/prx/libc/src/GuestArena.cpp`<br>`core/libs/tests/GuestMemory.cpp`<br>`docs/dev/debt/libc.md` | | [PR 6481](https://www.github.com/boykopovar/AnyPS5/pull/6481) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6548](https://www.github.com/boykopovar/AnyPS5/pull/6548) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6615](https://www.github.com/boykopovar/AnyPS5/pull/6615) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6636](https://www.github.com/boykopovar/AnyPS5/pull/6636) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6682](https://www.github.com/boykopovar/AnyPS5/pull/6682) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 6819](https://www.github.com/boykopovar/AnyPS5/pull/6819) | `docs/dev/debt/libc.md` | | [PR 6879](https://www.github.com/boykopovar/AnyPS5/pull/6879) | `core/libs/prx/libc/src/GuestArena.cpp`<br>`core/libs/tests/GuestMemory.cpp` | | [PR 6926](https://www.github.com/boykopovar/AnyPS5/pull/6926) | `core/libs/prx/libc/include/GuestArena.hpp`<br>`core/libs/prx/libc/src/GuestArena.cpp` | | [PR 6947](https://www.github.com/boykopovar/AnyPS5/pull/6947) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 7081](https://www.github.com/boykopovar/AnyPS5/pull/7081) | `docs/dev/debt/libc.md` | | [PR 7105](https://www.github.com/boykopovar/AnyPS5/pull/7105) | `core/libs/tests/GuestMemory.cpp` | | [PR 7201](https://www.github.com/boykopovar/AnyPS5/pull/7201) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp`<br>`core/libs/prx/libc/src/GuestArena.cpp` | | [PR 7446](https://www.github.com/boykopovar/AnyPS5/pull/7446) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 7514](https://www.github.com/boykopovar/AnyPS5/pull/7514) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 7622](https://www.github.com/boykopovar/AnyPS5/pull/7622) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 7642](https://www.github.com/boykopovar/AnyPS5/pull/7642) | `core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp` | | [PR 7648](https://www.github.com/boykopovar/AnyPS5/pull/7648) | `docs/dev/debt/libc.md` | | [PR 7715](https://www.github.com/boykopovar/AnyPS5/pull/7715) | `docs/dev/debt/libc.md` | | [PR 8150](https://www.github.com/boykopovar/AnyPS5/pull/8150) | `docs/dev/debt/libc.md` | | [PR 8352](https://www.github.com/boykopovar/AnyPS5/pull/8352) | `docs/dev/debt/libc.md` | | [PR 8520](https://www.github.com/boykopovar/AnyPS5/pull/8520) | `docs/dev/debt/libc.md` | | [PR 8550](https://www.github.com/boykopovar/AnyPS5/pull/8550) | `docs/dev/debt/libc.md` | | [PR 8711](https://www.github.com/boykopovar/AnyPS5/pull/8711) | `docs/dev/debt/libc.md` |
wachi35676 commented 2026-10-18 12:32:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by wachi35676 on 2026-10-18T12:32:18Z.


Measured on Windows 11 26300, Ryzen 5 9600X, WinLibs GCC 15.2.0, Release, PR merged onto main 9f25d0bf5, RTX 5070 Ti. I used a probe against sceKernelMapDirectMemory + GuestArenaCollectWrites, with a resident mapping collected until settled, comparing main with this PR:

  • Host protection after a settled collect (≥256 KiB): 0x4 → 0x2. Writing one byte per 4 KiB page now raises 64 / 256 / 512 access violations for 256 KiB / 1 MiB / 2 MiB, where main raises none. The 64 KiB case stays at 0, and that is the only reason CheckSingleDirectMappingTracksWritesWithoutFaults still passes.
  • Clean 2 MiB collect: 1.7–1.9 µs → 0.02–0.03 µs.
  • Writes then collect: writing every 4 KiB of 2 MiB and then collecting goes from 212–227 µs to 1222–1286 µs (5.9x). Every 64 KiB: 15–16 µs → 92–115 µs (6.2x).
  • Kernel-mode write: ReadFile straight into the settled mapping, without a GuestArena::HostWrite bracket, succeeds on main with 65,536 bytes. With this PR it fails with ERROR_NOACCESS (998) and writes 0 bytes.

So the PR saves about 1.7 µs per clean 2 MiB collect and costs about 2 µs for the first write to each 4 KiB page. Buffers the guest rewrites every frame, such as rings and dynamic vertex or constant buffers, get slower. Every kernel-mode write into resident memory above 256 KiB now needs a HostWrite bracket, which used to be required only for shared views.

The new HostWrite in importRunAt also marks the imported range dirty for shared views: a bracket with no store over an aliased 1 MiB mapping makes the next collect report all 256 pages.

The single SuperTuxKart capture (+2.09%) doesn't cover write-heavy buffers. A capture from a title that streams into large resident buffers would be needed. Confirmed: reverting the GuestBufferMemory.cpp guard makes agc_driver_host_import_windows fail. The 462 related tests pass with this PR.

AI-assisted: yes (Claude Code); results above were run on this machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6249952485 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7473#issuecomment-6249952485). Originally posted by [wachi35676](https://github.com/wachi35676) on 2026-10-18T12:32:18Z. --- Measured on Windows 11 26300, Ryzen 5 9600X, WinLibs GCC 15.2.0, Release, PR merged onto `main` `9f25d0bf5`, RTX 5070 Ti. I used a probe against `sceKernelMapDirectMemory` + `GuestArenaCollectWrites`, with a resident mapping collected until settled, comparing `main` with this PR: - **Host protection after a settled collect (≥256 KiB):** 0x4 → 0x2. Writing one byte per 4 KiB page now raises 64 / 256 / 512 access violations for 256 KiB / 1 MiB / 2 MiB, where `main` raises none. The 64 KiB case stays at 0, and that is the only reason `CheckSingleDirectMappingTracksWritesWithoutFaults` still passes. - **Clean 2 MiB collect:** 1.7–1.9 µs → 0.02–0.03 µs. - **Writes then collect:** writing every 4 KiB of 2 MiB and then collecting goes from 212–227 µs to 1222–1286 µs (5.9x). Every 64 KiB: 15–16 µs → 92–115 µs (6.2x). - **Kernel-mode write:** `ReadFile` straight into the settled mapping, without a `GuestArena::HostWrite` bracket, succeeds on `main` with 65,536 bytes. With this PR it fails with `ERROR_NOACCESS` (998) and writes 0 bytes. So the PR saves about 1.7 µs per clean 2 MiB collect and costs about 2 µs for the first write to each 4 KiB page. Buffers the guest rewrites every frame, such as rings and dynamic vertex or constant buffers, get slower. Every kernel-mode write into resident memory above 256 KiB now needs a `HostWrite` bracket, which used to be required only for shared views. The new `HostWrite` in `importRunAt` also marks the imported range dirty for shared views: a bracket with no store over an aliased 1 MiB mapping makes the next collect report all 256 pages. The single SuperTuxKart capture (+2.09%) doesn't cover write-heavy buffers. A capture from a title that streams into large resident buffers would be needed. Confirmed: reverting the `GuestBufferMemory.cpp` guard makes `agc_driver_host_import_windows` fail. The 462 related tests pass with this PR. AI-assisted: yes (Claude Code); results above were run on this machine.
Dripl1x commented 2026-10-18 14:22:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Dripl1x on 2026-10-18T14:22:33Z.


@wachi35676 Thanks for the large-buffer measurements and the no-store import reproducer. Corrected in d8b18e7ac4e11695dcce3a84e043f7dcb9c6baba:

  • The first resident write fault now opens the whole resident run and keeps it on native write watching until remap. The 2-MiB write/collect probe is 342.955 us on pinned main, 1771.984 us in the previous PR and 339.724 us after the correction (median of five 256-cycle trials). Access violations over 1280 cycles go from 655360 to 1; this is not a zero-fault claim.
  • importRunAt now uses separate scoped HostImportAccess. Repeated no-store brackets over two 1-MiB shared aliases produce zero dirty pages, and real alias writes are still detected. The Vulkan resident-import regression still passes, including repeated imports, actual GPU fills and untouched neighboring bytes.
  • The direct unbracketed ReadFile regression is reproduced and explicitly documented as a host integration requirement. Native writes into guest buffers must use HostWrite while protection is armed. Existing guest read/pread/fread/recv destinations already do; added actual guest read/pread coverage before the first CPU write into a settled protected 2-MiB resident mapping. I am not claiming that an unguarded WinAPI call is transparent.

The standalone topic passed guest_memory, guest_mmap_fixed_anonymous and agc_driver_host_import_windows. The 64-KiB no-fault case, 128 collector/writer race iterations, capacity, alias and pin cases remain covered.

The correction was repeated in the same combined SuperTuxKart tutorial/menu scene in A-B-B-A order: 31.438 -> 31.200 FPS (-0.239 FPS), 1920x1080 internal rendering, maximized 2560x1369 client, warm caches, seconds 20-28, verified focus and runtime hashes. vkQuake moving demo: 54.873 -> 59.420 FPS; Syobon: 30.287 -> 30.299; Ping Pong: 59.941 -> 59.939. These are combined-stack checks, not an isolated PR speedup or a claim that every streaming workload is covered.

UI Lab received the 20-step default navigation sequence. The 17 fresh GPU frame dumps were visually reviewed; artwork, library grids, dialogs and game UI were present in the inspected frames. This is a visual check only: its early seconds 1-6 FPS interval was excluded because the focus guard had not yet established focus at the beginning. It is not included in the FPS table.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6251021555 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7473#issuecomment-6251021555). Originally posted by [Dripl1x](https://github.com/Dripl1x) on 2026-10-18T14:22:33Z. --- @wachi35676 Thanks for the large-buffer measurements and the no-store import reproducer. Corrected in `d8b18e7ac4e11695dcce3a84e043f7dcb9c6baba`: - The first resident write fault now opens the whole resident run and keeps it on native write watching until remap. The 2-MiB write/collect probe is 342.955 us on pinned main, 1771.984 us in the previous PR and 339.724 us after the correction (median of five 256-cycle trials). Access violations over 1280 cycles go from 655360 to 1; this is not a zero-fault claim. - importRunAt now uses separate scoped HostImportAccess. Repeated no-store brackets over two 1-MiB shared aliases produce zero dirty pages, and real alias writes are still detected. The Vulkan resident-import regression still passes, including repeated imports, actual GPU fills and untouched neighboring bytes. - The direct unbracketed ReadFile regression is reproduced and explicitly documented as a host integration requirement. Native writes into guest buffers must use HostWrite while protection is armed. Existing guest read/pread/fread/recv destinations already do; added actual guest read/pread coverage before the first CPU write into a settled protected 2-MiB resident mapping. I am not claiming that an unguarded WinAPI call is transparent. The standalone topic passed guest_memory, guest_mmap_fixed_anonymous and agc_driver_host_import_windows. The 64-KiB no-fault case, 128 collector/writer race iterations, capacity, alias and pin cases remain covered. The correction was repeated in the same combined SuperTuxKart tutorial/menu scene in A-B-B-A order: 31.438 -> 31.200 FPS (-0.239 FPS), 1920x1080 internal rendering, maximized 2560x1369 client, warm caches, seconds 20-28, verified focus and runtime hashes. vkQuake moving demo: 54.873 -> 59.420 FPS; Syobon: 30.287 -> 30.299; Ping Pong: 59.941 -> 59.939. These are combined-stack checks, not an isolated PR speedup or a claim that every streaming workload is covered. UI Lab received the 20-step default navigation sequence. The 17 fresh GPU frame dumps were visually reviewed; artwork, library grids, dialogs and game UI were present in the inspected frames. This is a visual check only: its early seconds 1-6 FPS interval was excluded because the focus guard had not yet established focus at the beginning. It is not included in the FPS table.
wachi35676 commented 2026-10-18 23:40:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by wachi35676 on 2026-10-18T23:40:36Z.


Re-checked 39f8a8056 (the fix is d8b18e7ac) merged onto main 07377573f with the same probe (Windows 11 26300, Ryzen 5 9600X, GCC 15.2). This time main and the PR were measured on the same base. My first comment compared a 9f25d0bf5 baseline with PR runs on 3e3e8b905; its conclusions still held, but those timings weren't from one base.

The earlier regressions are gone:

  • Faults: one access violation per run instead of one per page, so 1 each at 256 KiB, 1 MiB and 2 MiB (was 64/256/512). Over 1,280 write+collect cycles on a 2 MiB run there is 1 fault, and every write is reported.
  • Dirty write+collect (2 MiB): matches main. At a 4 KiB stride it takes 244–259 µs (main 258–287 µs); at a 64 KiB stride 18–23 µs (main 20–22 µs).
  • Clean collect: keeps the gain, 2.6–4.1 µs → 0.028 µs.
  • Partial-run arming, alias demotion and remap re-arming: behave correctly. Writes in the armed and unarmed halves, and through a new alias, are all reported.
  • Imports: the HostImportAccess bracket gives 0 dirty pages for resident and for aliased mappings, where a HostWrite bracket gave 256 on aliases. It opens resident runs during the import and re-arms them afterwards.

What remains is what the new debt entry says:

  • An unbracketed ReadFile into an armed run still fails with ERROR_NOACCESS (998). It succeeds once the run has taken its first write.
  • Shared aliases that are already armed stay read-only during an import, as on main.

The 472-test set passes. guest_sce_net, guest_select_wait, guest_pthread_start and guest_mutex_contention flaked under -j4 and pass 3/3 when run serially.

AI-assisted: yes (Claude Code); results above were run on this machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6256611247 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7473#issuecomment-6256611247). Originally posted by [wachi35676](https://github.com/wachi35676) on 2026-10-18T23:40:36Z. --- Re-checked `39f8a8056` (the fix is `d8b18e7ac`) merged onto `main` `07377573f` with the same probe (Windows 11 26300, Ryzen 5 9600X, GCC 15.2). This time `main` and the PR were measured on the same base. My first comment compared a `9f25d0bf5` baseline with PR runs on `3e3e8b905`; its conclusions still held, but those timings weren't from one base. The earlier regressions are gone: - **Faults:** one access violation per run instead of one per page, so 1 each at 256 KiB, 1 MiB and 2 MiB (was 64/256/512). Over 1,280 write+collect cycles on a 2 MiB run there is 1 fault, and every write is reported. - **Dirty write+collect (2 MiB):** matches `main`. At a 4 KiB stride it takes 244–259 µs (`main` 258–287 µs); at a 64 KiB stride 18–23 µs (`main` 20–22 µs). - **Clean collect:** keeps the gain, 2.6–4.1 µs → 0.028 µs. - **Partial-run arming, alias demotion and remap re-arming:** behave correctly. Writes in the armed and unarmed halves, and through a new alias, are all reported. - **Imports:** the `HostImportAccess` bracket gives 0 dirty pages for resident and for aliased mappings, where a `HostWrite` bracket gave 256 on aliases. It opens resident runs during the import and re-arms them afterwards. What remains is what the new debt entry says: - An unbracketed `ReadFile` into an armed run still fails with `ERROR_NOACCESS` (998). It succeeds once the run has taken its first write. - Shared aliases that are already armed stay read-only during an import, as on `main`. The 472-test set passes. `guest_sce_net`, `guest_select_wait`, `guest_pthread_start` and `guest_mutex_contention` flaked under `-j4` and pass 3/3 when run serially. AI-assisted: yes (Claude Code); results above were run on this machine.
oneandonlydean commented 2026-10-19 04:52:49 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-19T04:52:49Z.


@Dripl1x thanks. The bracketing looks complete: every Windows kernel-mode reader into guest memory that I found holds HostWrite, and the fault path is serialised. Two things before this can go in. It's a default-on Windows protection change with a documented ERROR_NOACCESS failure mode, and the micro-probe shows 342.9 vs 339.7 µs, so could you post a workload A/B (a title scene, main vs this PR, interleaved) that shows the gain? Also, it sits on #7471, so that needs to land first.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6259945369 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7473#issuecomment-6259945369). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-19T04:52:49Z. --- @Dripl1x thanks. The bracketing looks complete: every Windows kernel-mode reader into guest memory that I found holds `HostWrite`, and the fault path is serialised. Two things before this can go in. It's a default-on Windows protection change with a documented `ERROR_NOACCESS` failure mode, and the micro-probe shows 342.9 vs 339.7 µs, so could you post a workload A/B (a title scene, main vs this PR, interleaved) that shows the gain? Also, it sits on #7471, so that needs to land first.
blawesom commented 2026-10-19 09:05:27 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-19T09:05:27Z.


Rebase handoff — rebased onto current main (all six commits, authorship unchanged). One conflict in WindowsMappings.hpp: both struct fields kept (main's viewBytes and your hostImports).

Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON, AMD RX 9070 XT / RADV): builds; conventions pass; full suite green apart from the four known main regressions (#5444 Mesa, #7584 BDA, #7766, #7784), none from this PR.

To pick it up:

git fetch https://github.com/blawesom/AnyPS5 rebase/7473
git checkout <your branch>
git merge --ff-only FETCH_HEAD

Head is 4386c0596.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6263635890 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7473#issuecomment-6263635890). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-19T09:05:27Z. --- **Rebase handoff** — rebased onto current `main` (all six commits, authorship unchanged). One conflict in `WindowsMappings.hpp`: both struct fields kept (`main`'s `viewBytes` and your `hostImports`). Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, `BUILD_TESTING=ON`, AMD RX 9070 XT / RADV): builds; conventions pass; **full suite green apart from the four known `main` regressions** (#5444 Mesa, #7584 BDA, #7766, #7784), none from this PR. **To pick it up:** ``` git fetch https://github.com/blawesom/AnyPS5 rebase/7473 git checkout <your branch> git merge --ff-only FETCH_HEAD ``` Head is `4386c0596`.
screamm commented 2026-10-20 16:31:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-20T16:31:16Z.


Isolated title A/B on Windows NVIDIA for the workload ask, plus tests and controls.

Host: Windows 11 Pro 26220, NVIDIA GeForce RTX 4070 driver 596.21, Ryzen 7 5700X, WinLibs MinGW-w64 GCC 15.2 r7, Release. PR head 39f8a8056; I built blawesom's handoff rebase/7473 at 4386c0596 (the same six commits, so #7471's commit is included) merged onto main 1d4164552. One conflict, in core/libs/tests/GuestMemory.cpp: main's two new release tests and CheckLargeResidentWritesStopFaulting sit at the same spot; I kept both.

Tests, x3: guest_memory, guest_mmap_fixed_anonymous, agc_driver_host_import_windows: 3/3 each. The new resident write/collect, partial-write, collect-during-host-write, import-bracket and resident-import-after-collection cases run inside these; the host-import test is not skipped on this GPU.

Controls. The test files don't build on main, so I used two source controls:

  • clean-proof arming off (&& armResident(first, stop) -> && false in collectResident): guest_memory fails at GuestMemory.cpp:1642, which expects PAGE_READONLY after two clean collects.
  • the HostImportAccess bracket removed from importRunAt: agc_driver_host_import_windows fails with resident memory could not be filled after collecting its writes.

Both pass again once restored.

Title A/B, vkQuake PPSA99010. Without data the title exits after about 5 s, so I used the shareware id1/pak0.pak demo loop at 3840x2160. Each run is 90 s with APS5_PROFILE_DRAW=1 APS5_PROFILE_GPU=1 APS5_TRACE_SUMMARY_EVERY=10. main and main+this PR came from the same build directory, were relinked for every run, and ran interleaved in one session. FPS is presents over the seven full 10-s summary windows after the first one (the first holds the shader compiles). p50/p90 are the medians of the windows' frame_ms. No trace dropped events, and no run stopped early.

Pair Order main: frames, FPS, p50/p90 ms this PR: frames, FPS, p50/p90 ms PR vs main
1 A B 6884, 85.76, 11.73/14.65 7436, 92.16, 9.96/14.17 +7.5%
2 A B 8057, 97.43, 8.87/11.84 9297, 110.17, 8.58/9.82 +13.1%
3 B A 8847, 105.44, 8.77/11.25 9008, 107.42, 8.72/10.54 +1.9%
4 A B 8792, 105.68, 8.95/10.92 9123, 109.41, 8.68/10.45 +3.5%
5 A B 9080, 107.39, 8.68/10.72 9092, 109.66, 8.62/10.54 +2.1%
6 A B 8859, 106.84, 8.79/10.80 9009, 107.01, 8.86/10.84 +0.2%

Pairs 1-2 ran while other builds loaded the host, so I give the quiet pairs 3-6 separately: main 106.34 FPS (p50 8.79, p90 10.92 ms), this PR 108.38 FPS (p50 8.72, p90 10.59 ms), +1.9%. That is about the size of the main-to-main spread in those pairs (105.44-107.39, 1.8%), but the PR is ahead in all six pairs. The #7464 runs and one stack run were interleaved in the same session and are not shown here.

Middle Ages Ping Pong PPSA28319 (60 s, two runs per side) is vsync-bound: 59.94 FPS and p50 16.683 ms in every run, so no gain and no loss is visible there.

Stack with #7464, no-regression check: vkQuake 111.42 FPS (9249 frames in 90 s), Ping Pong 59.94, Showcase PPSA99005 12.07 FPS (main 11.25; one run each). No stop line or crash; every run hit the timeout. GPU pass on the stack (-j1 --timeout 300 -R '^agc_driver_', the image-array-window test excluded because it doesn't build on main, #8310): 599 passed, 2 skipped as on main, 2 failed. agc_driver_pass_input_hazard also fails on main. agc_driver_indirect_arguments_pending_producer times out and comes from #7464: it passes when only #7464's label hunk is reverted. I report it there.

tools/check_conventions.py --base origin/main passes on the head, the handoff and the merge, and git diff --check is clean.

Not checked: the ERROR_NOACCESS case for an unbracketed ReadFile (no title here hits it), #7471 on its own, the GPU pass on main+#7473 without #7464, the full non-GPU suite, Linux, console behaviour.

Written with Claude Code assistance (validation by a subagent, reviewed in this session).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6295865791 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7473#issuecomment-6295865791). Originally posted by [screamm](https://github.com/screamm) on 2026-10-20T16:31:16Z. --- Isolated title A/B on Windows NVIDIA for the workload ask, plus tests and controls. Host: Windows 11 Pro 26220, NVIDIA GeForce RTX 4070 driver 596.21, Ryzen 7 5700X, WinLibs MinGW-w64 GCC 15.2 r7, Release. PR head `39f8a8056`; I built blawesom's handoff `rebase/7473` at `4386c0596` (the same six commits, so #7471's commit is included) merged onto main `1d4164552`. One conflict, in `core/libs/tests/GuestMemory.cpp`: main's two new release tests and `CheckLargeResidentWritesStopFaulting` sit at the same spot; I kept both. **Tests, x3:** `guest_memory`, `guest_mmap_fixed_anonymous`, `agc_driver_host_import_windows`: 3/3 each. The new resident write/collect, partial-write, collect-during-host-write, import-bracket and resident-import-after-collection cases run inside these; the host-import test is not skipped on this GPU. **Controls.** The test files don't build on main, so I used two source controls: - clean-proof arming off (`&& armResident(first, stop)` -> `&& false` in `collectResident`): `guest_memory` fails at `GuestMemory.cpp:1642`, which expects `PAGE_READONLY` after two clean collects. - the `HostImportAccess` bracket removed from `importRunAt`: `agc_driver_host_import_windows` fails with `resident memory could not be filled after collecting its writes`. Both pass again once restored. **Title A/B, vkQuake PPSA99010.** Without data the title exits after about 5 s, so I used the shareware `id1/pak0.pak` demo loop at 3840x2160. Each run is 90 s with `APS5_PROFILE_DRAW=1 APS5_PROFILE_GPU=1 APS5_TRACE_SUMMARY_EVERY=10`. main and main+this PR came from the same build directory, were relinked for every run, and ran interleaved in one session. FPS is presents over the seven full 10-s summary windows after the first one (the first holds the shader compiles). p50/p90 are the medians of the windows' `frame_ms`. No trace dropped events, and no run stopped early. | Pair | Order | main: frames, FPS, p50/p90 ms | this PR: frames, FPS, p50/p90 ms | PR vs main | |---|---|---|---|---:| | 1 | A B | 6884, 85.76, 11.73/14.65 | 7436, 92.16, 9.96/14.17 | +7.5% | | 2 | A B | 8057, 97.43, 8.87/11.84 | 9297, 110.17, 8.58/9.82 | +13.1% | | 3 | B A | 8847, 105.44, 8.77/11.25 | 9008, 107.42, 8.72/10.54 | +1.9% | | 4 | A B | 8792, 105.68, 8.95/10.92 | 9123, 109.41, 8.68/10.45 | +3.5% | | 5 | A B | 9080, 107.39, 8.68/10.72 | 9092, 109.66, 8.62/10.54 | +2.1% | | 6 | A B | 8859, 106.84, 8.79/10.80 | 9009, 107.01, 8.86/10.84 | +0.2% | Pairs 1-2 ran while other builds loaded the host, so I give the quiet pairs 3-6 separately: main 106.34 FPS (p50 8.79, p90 10.92 ms), this PR 108.38 FPS (p50 8.72, p90 10.59 ms), **+1.9%**. That is about the size of the main-to-main spread in those pairs (105.44-107.39, 1.8%), but the PR is ahead in all six pairs. The #7464 runs and one stack run were interleaved in the same session and are not shown here. Middle Ages Ping Pong PPSA28319 (60 s, two runs per side) is vsync-bound: 59.94 FPS and p50 16.683 ms in every run, so no gain and no loss is visible there. **Stack with #7464, no-regression check:** vkQuake 111.42 FPS (9249 frames in 90 s), Ping Pong 59.94, Showcase PPSA99005 12.07 FPS (main 11.25; one run each). No stop line or crash; every run hit the timeout. GPU pass on the stack (`-j1 --timeout 300 -R '^agc_driver_'`, the image-array-window test excluded because it doesn't build on main, #8310): 599 passed, 2 skipped as on main, 2 failed. `agc_driver_pass_input_hazard` also fails on main. `agc_driver_indirect_arguments_pending_producer` times out and comes from #7464: it passes when only #7464's label hunk is reverted. I report it there. `tools/check_conventions.py --base origin/main` passes on the head, the handoff and the merge, and `git diff --check` is clean. Not checked: the `ERROR_NOACCESS` case for an unbracketed `ReadFile` (no title here hits it), #7471 on its own, the GPU pass on main+#7473 without #7464, the full non-GPU suite, Linux, console behaviour. Written with Claude Code assistance (validation by a subagent, reviewed in this session).
Dripl1x commented 2026-10-20 23:34:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Dripl1x on 2026-10-20T23:34:31Z.


@oneandonlydean, thanks. @screamm ran the workload A/B you asked for: vkQuake at 3840x2160, six interleaved pairs, this PR ahead in all six, +1.9% over the four quiet pairs, which is about the main-to-main spread there (1.8%). I read that as a small consistent lead, not an established gain, and the description says so. In SuperTuxKart on main 2185dbf92e I have one valid capture per side against #7471 (8.68 against 8.33 FPS), which is inside that scene's run-to-run spread, so no FPS claim from it; the description has the summary lines and the write-collection counters (with #7471 in the same build: GetWriteWatch calls per frame 1138 -> 271, bytes scanned by collectResident per frame about 1.6 GiB -> 79 MiB).

Rebased onto main 2185dbf92e on top of the rebased #7471 (9d5f8326bf); head 7898b5bd3a. Conflicts: test insertion points in GuestMemory.cpp (main's #7448 tests kept) and struct View, where main's viewBytes stays before hostImports because Map initialises View positionally. guest_memory, guest_mmap_fixed_anonymous and agc_driver_host_import_windows 3/3; 31 related write-watch, host-import and socket host-write tests pass; @screamm's two source controls fail as expected and pass once restored. #7471 still has to land first. The unbracketed ReadFile case stays documented debt.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6304202044 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7473#issuecomment-6304202044). Originally posted by [Dripl1x](https://github.com/Dripl1x) on 2026-10-20T23:34:31Z. --- @oneandonlydean, thanks. @screamm ran the workload A/B you asked for: vkQuake at 3840x2160, six interleaved pairs, this PR ahead in all six, +1.9% over the four quiet pairs, which is about the main-to-main spread there (1.8%). I read that as a small consistent lead, not an established gain, and the description says so. In SuperTuxKart on main `2185dbf92e` I have one valid capture per side against #7471 (8.68 against 8.33 FPS), which is inside that scene's run-to-run spread, so no FPS claim from it; the description has the summary lines and the write-collection counters (with #7471 in the same build: `GetWriteWatch` calls per frame 1138 -> 271, bytes scanned by `collectResident` per frame about 1.6 GiB -> 79 MiB). Rebased onto main `2185dbf92e` on top of the rebased #7471 (`9d5f8326bf`); head `7898b5bd3a`. Conflicts: test insertion points in `GuestMemory.cpp` (main's #7448 tests kept) and `struct View`, where main's `viewBytes` stays before `hostImports` because `Map` initialises `View` positionally. `guest_memory`, `guest_mmap_fixed_anonymous` and `agc_driver_host_import_windows` 3/3; 31 related write-watch, host-import and socket host-write tests pass; @screamm's two source controls fail as expected and pass once restored. #7471 still has to land first. The unbracketed `ReadFile` case stays documented debt. AI-assisted: yes (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!7473
No description provided.