perf(agc): lease mapped readable runs for import events #9011
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9011"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-21T09:41:43Z.
What
Lease the complete compatible readable runs around newly mapped allocations instead of copying every readable allocation in the process for each map event. Reject stale allocation identities, preserve neighboring run ranges and lease lifetimes, and retain the full-registry snapshot when adopting a device or replacing an existing import. Recheck allocation ownership after taking that full snapshot.
This preserves eager-import policy. #7465 changes that policy by deferring mappings up to 64 KiB; it touches the same function but is a separate change, and either merge order requires resolving that small overlap. No dependency on #7465 or other open PRs. The overlap report and manual review of stale shared-file patches are saved with the evidence.
Tested
Refreshed branch:
623501f36560884b66e16c93a0617d00e266e196onmainb5d763770a8e932b35db9bea1c415e7e0ac50a22. Full runtime/library and focused-test build passed. The same six focused tests listed below passed on both refreshed main and candidate with Vulkan required, shader cache disabled, and the real Khronos validation layer loaded (six layer-load records per arm). No VUIDs, missing-layer warnings or skipped tests in either log. Candidate restored and rebuilt after the pair. Conventions checks pass.The native performance measurements below are explicitly pinned to earlier main
53a0a27bb61e613638e3764dcdce43a5f85c8bafand topic993f9f9b5c55b375e217588437d4b75cbaa3a96d. The topic range-diff is identical after refresh; these are not measurements of the refreshed hashes.Record of Lodoss War PPSA05347 v01.000.001, same forest tutorial, input script, machine, 3840x2160, environment and 200:30-second trace window. Two pairs in opposite orders: main 50.089 / 51.220 FPS; topic 59.840 / 59.940 FPS. All four logs had no GPU fault/reset, dropped trace events or observed compiler overlap. The compiler monitor samples every two seconds, so does not exclude brief unseen activity. Screenshots show the same scene; this does not establish broad gameplay or other-title gains.
Official
tools/trace_digest.pysummary lines for the first pair:On the pinned measurement revisions, the same six focused tests passed on main and topic: guest_memory, guest_mmap_fixed_anonymous, MemoryPoolTest, agc_host_import_retirement, agc_host_import_unmap, and agc_sparse_run_import. Both logs confirm Khronos validation loaded and contain no VUID errors, skips, or missing-layer warning. Tests use ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. Guest-memory coverage includes neighboring readable runs, permission/GPU boundaries, reversed/duplicate targets, stale owners, removed ranges and retained lease lifetime.
Evidence archive: four raw traces, official digests, screenshots, reports, focused logs and refresh validation. SHA256
70cdb1ea41aa5ff5c1a42c4030c257a9af1c30fce036b169bbd8aec1c1496d4e. Separate directories distinguish native measurements (measured-53a0-993f) from refreshed focused validation (refreshed-b5d763-623501).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by clairtonmichel on 2026-10-21T09:47:40Z.
Tested on AMD Ryzen 7 9800X3D and AMD Radeon RX 7900 XTX (Fedora Linux, Mesa 26.2.5):
Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-21T09:49:07Z.
Thanks for testing on the 9800X3D / RX 7900 XTX. Could you share the names and failure summaries of the three tests that did not pass, plus the tested commit? If possible, running those same tests on the corresponding main base would distinguish existing failures from regressions in this change.
The paired focused checks recorded in the PR passed on both arms on my RX 6650 XT; I have not reproduced or classified the three failures from your broader run.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by clairtonmichel on 2026-10-21T09:53:31Z.
Tested on AMD Ryzen 7 9800X3D and AMD Radeon RX 7900 XTX (Fedora Linux, Mesa 26.2.5):
main:agc_driver_guest_memory_lifetime,agc_driver_image_array_window_past_layer_limit, andagc_driver_tessellation) are identically present on cleanmainas well.Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-21T09:57:23Z.
Thanks for the paired main check and the test names. I have recorded your report that
agc_driver_guest_memory_lifetime,agc_driver_image_array_window_past_layer_limit, andagc_driver_tessellationfail identically on clean main on your Fedora / RX 7900 XTX setup. This distinguishes the reported 848/851 result from three newly introduced failures; it is reviewer-provided evidence, separate from my six focused paired checks.AI-assisted: yes