fix(agc): count a pipeline cache save put off after the mapping failed #28413
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/28413"
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 oneandonlydean on 2026-11-30T15:00:43Z.
What
Follow-up to #28375, for the case CodeRabbit named there.
#28375 writes a pipeline cache save after 6 saves in a row were put off under the memory reserve (
APS5_PIPELINE_CACHE_SAVE_FREE_MB). The count of saves put off in a row was set back to zero inside the memory check itself, each time a check passed. A save can pass that check twice: once for the mapped file (it holds four windows) and, when the file cannot be mapped, again for the buffer (it holds the whole cache). With the mapped save on (APS5_PIPELINE_CACHE_MAPPED_SAVE_MB), a mapping that fails every time and free memory between the two amounts, the first check passed and zeroed the count, then the buffer save was put off. The count never went past 1, so the forced save never came and the cache was only written at a clean exit, which is the starvation #28375 was meant to bound.Now the count goes back to zero in one place, once the save has its memory (mapped file or buffer) and goes on to fetch the cache. A save that is put off at either check adds one, so the buffer fallback is forced after 6 in a row like any other save.
The default configuration (mapped save off) makes one check per save and behaves as before.
Refs #28375
Tested
Linux, NVIDIA.
agc_pipeline_cache*tests pass, among themagc_pipeline_cache_put_offfrom #28375. They cover the rule and the unmapped save; the case fixed here needs a mapping, so no Linux test reaches it.agc_pipeline_cache_mapped_no_slotandagc_pipeline_cache_mapped_no_protection(extended, Windows only, not run here): with the mapping refused and the reserve 8 MiB under the free memory, the 70 MiB save is put off, and within 6 more saves under the same rule the file holds the cache, written from a buffer. Before this change, by reading the code, every one of those saves is put off. They need the Windows run of this head.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)Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-30T15:02:16Z.
Review: APPROVED
Reviewed — looks good
The change moves the consecutive-postponement reset until the save has passed its memory checks and proceeds to fetch cache data; no blocking defect was found in the inspected code.
What I ran
Reviewed head
a4cf3ab2df991f331cc9ae02397d310f401562ee. I read the prepared description, commit list, manifest and diff, plus both changed source files and the relevant header and test registration context throughrepo_read.py. No tests were run. The description reports Linux tests, but they were not run as part of this review.Results
files.jsonwas not available in the review bundleFindings
Blocking
None.
Non-blocking
None.
Not verified
The Windows-only mapped-save fallback case was not run in this review; the PR description also says it was not run by the author. I read the changed logic and test, but did not verify runtime behavior. I could not inspect
files.json; the manifest lists both changed files as included, and both were read. No other files were read.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-30T15:08:38Z.
Review: COMMENTED
Actionable comments posted: 1
bf6a803f-5002-4cff-9228-b5619bf4ee09Reviewing files that changed from the base of the PR and between
cf369d05daanda4cf3ab2df.core/libs/prx/libSceAgcDriver/Graphics/src/PipelineCache.cppcore/libs/prx/libSceAgcDriver/tests/PipelineCacheFailures.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.