fix(agc-driver): size the host import budget from the device's host heap #5482
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5482"
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 ee6aba54 on 2026-10-13T20:58:08Z.
What
Host imports stop at a fixed budget of 6 GiB (
APS5_HOST_IMPORT_MIB). A title whose address-based shaders cover more registered memory fills it within seconds; every later import is refused, its range is copied on each use and stays read-only in the BDA table, so a compute shader's stores into it are dropped and a later shader of the same pass that waits for them never finishes. On NVIDIA that ends in a context switch timeout (Xid 109) after minutes.The default budget is now half of the largest host (non device-local) memory heap, at least 6 GiB and at most 24 GiB, read from the device's memory properties.
APS5_HOST_IMPORT_MIBstill overrides it.Tested
0aa4cb1c2.agc_driver_graphicsgainshostImportBudgetTests: no host heap or a small one keeps the 6 GiB floor, a 32 GiB heap gives 16 GiB, a 64 GiB heap is capped at 24 GiB, a device-local heap does not count.deferred write-back failed: ... BDA access failed ... read-only in the BDA tablereports and ending in Xid 109; with it, eight runs of 10 to 15 minutes reached the main menu and the first cutscene without a hang.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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T05:10:29Z.
#290 changed this on main: the budget is now the larger of 6 GiB and half the physical memory (capped by the largest host heap less 2 GiB), and an import past it can evict the least recently used ones instead of being refused. Does PPSA15304 still hang on current main? If it does, please rebase onto it and add the
[gpu] host import budgetline from that run; if not, this can be closed.Imported from boykopovar/AnyPS5. Originally posted by ee6aba54 on 2026-10-14T11:07:04Z.
Tested on current
main(c654b199b, with #5483 cherry-picked so the storage cache does not run the device out of memory first): PPSA15304 through NEW GAME, the intro cutscenes and the parachute jump, 25 minutes, RTX 5080, driver 595.99.02, Ubuntu 24.04, with a cold shader cache for this source version (1039 programs compiled during the run). No hang, no Xid, no[gpu] host import budgetline at all, so #290's eviction never had to refuse an import where the old budget did. The hang this PR was written against came from refused imports, whichmainno longer does.Closing; thanks for the pointer.
AI-assisted: yes
Pull request closed