Repository navigation
fix(agc): throw instead of aborting when a heap mirror cannot be made - #1085
Conversation
|
|
c14e28b to
6ab850e
Compare
|
Thanks for pointing me at #182, I hadn't counted a retry after the device refuses as an error-driven fallback, but it is one. I've dropped it in 6ab850e: when a new heap mirror would go past |
An address-based build whose heap mirror the device refused, or one past APS5_HEAP_MIRROR_MIB, stopped the process inside acquireMirror. PPSA26344 hit it at 478 s with 6.8 GiB of heap mirrors beside the host imports. - a mirror that would go past the budget first sweeps the mirrors whose registered range is gone, before its allocation; if it still does not fit, the build throws "past the budget" - the mirror is allocated once: a refusal throws with the range, the Vulkan result and the mirror totals, so the draw or dispatch fails like any other allocation; nothing is registered for the refused range - the BDA resource tests run with a 4 MiB mirror budget and a mock memory limit: a mirror past the budget is made in the swept mirror's memory, and a refused one fails after a single allocation attempt
6ab850e to
4709920
Compare
What
When the device refused a heap mirror's buffer, or a new mirror would go past
APS5_HEAP_MIRROR_MIB,acquireMirrorprinted a FATAL line and calledabort(), so one address-based build short of host memory ended the process. PPSA26344 v1.008 hit it at 478 s, with 6.8 GiB of heap mirrors next to the host imports in the 16 GiB host-visible heap.APS5_HEAP_MIRROR_MIBfirst sweeps the mirrors whose range the guest freed since the last build's sweep, before its allocation. If it still does not fit, the build throwsheap mirror of 0x...+0x...: past the budget; heap mirrors hold ....heap mirror of 0x...+0x...: vkAllocateMemory buffer: Vulkan result -2; heap mirrors hold ..., so the draw or dispatch fails like any other allocation; there is no second try. Nothing is registered for the range.sweepMirrorsandacquireMirrorelsewhere; both merge cleanly, and the tests pass merged with them.Tested
main9619edf: configure-DBUILD_TESTING=ON, full build,--target libs,ctest:ctest --output-on-failure)VK_DRIVER_FILES): 405/405 pass;agc_driver_flat_storeis left out there because it takes several minutes on Windows llvmpipeagc_driver_graphics(APS5_HEAP_MIRROR_MIB=4, mock memory limit): a mirror past the budget is made in the memory of the expired mirror swept first; a refused one fails its build withVulkan result -2after one allocation attempt, and is made once the limit is lifted. Fails on main:FATAL: heap mirror of ...: past the budget, thenabort().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)