perf(agc): skip unchanged heap mirror runs and idle mirror sweeps in address-based builds #1411
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1411"
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 Celegans12 on 2026-10-08T03:01:11Z.
What
An address-based build served by the cached address space still walked all of its regions for mirrors, sorted the heap mirrors, compared each one's blocks with the write tracker and swept the whole mirror registry. PPSA26344's world keeps about 37,000 heap mirrors (10.6 GiB) in about 2,000 runs; mirror preparation took 37 ms per cache-hit build.
GuestMemory::UnchangedSincefinds no block of the run stamped since the generation of its last complete check, its mirrors skipChangedBlocks; that generation is stored only after the build's blocks were copied.sweepMirrorsskips the registry walk while every live mirror's range is held by the cached space's lease and no mirror changed since the last walk: such a range cannot expire.MirrorCountersaddssweepsandheapChecks.sweepMirrorsbefore a heap mirror that would go past the budget; its tests pass merged with this.AddressSpacefields and #290 already conflicts withmainhere; this adds no conflict hunk to either. #1357, #1359 and #1361 change the importentryinAcquireRegistered; they merge cleanly.Tested
maindf16c4c2: configure-DBUILD_TESTING=ON, full build,--target libs,ctest:ctest --output-on-failure)VK_DRIVER_FILES): 403/403 pass;agc_driver_flat_storeis left out there because it takes several minutes on Windows llvmpipeagc_driver_graphics: a build after an unchanged one compares no heap mirror and walks no registry; later CPU writes and write-backs are seen. Does not build on main.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by EdouardSence on 2026-10-08T13:18:10Z.
Tested on AMD under Linux, since this PR wasn't: RX 9070 XT (RDNA4, GFX1201), RADV / Mesa 26.2.4, Linux 7.2.9 (CachyOS), GCC Release build.
ctest: this PR merged ontomain07c2405c, all 452 tests pass withctest -j8(main alone: 452/452 on the same machine).main+ #759 (needed to boot this title onmain) + this PR, then one scripted run headless from boot through the title screen. No error and no amdgpu fault came from this change.main+ #759 alone: 226, 229, 226.storage image access to depth/stencil surface ... is not implemented(the gap #425 fills). So nothing past the title screen is covered.AI-assisted: the runs and this write-up were done by Claude (Claude Code) on my machine.