Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Closing as a duplicate of #6921, which already makes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
PageSpan::runEndfinds where a run of equal page-state bytes ends. It calledentry()for every 8 pages and compared one 64-bit word per iteration. It now takes the entry pointer once per span (the whole table on Linux, one chunk of 65536 entries on Windows), compares 32 pages per iteration while the run holds, then 8, then single pages. The run it returns is unchanged: the word compares still start at a multiple of 8 pages, the byte scan still finds the first page that differs, and an absent chunk is still skipped (state 0) or ends the run.Why
GuestMemory::DescribeCommittedwalks page runs with it, and it is called for every descriptor region a build binds (GuestBufferMemory::addDescriptorRegion) and byShaderResources::revalidateFull. In Echoes of the End (PPSA25636), a private counter on those two callers measured 9.3 million and 115,400 calls costing 49.6 s and 10.5 s over an 1800 s run, with ranges of hundreds of MiB to 4 GiB per call; a CPU profile of the same scene put 7.1% of all samples inrunEnd. With this change the same counter read 13.2 s and 2.5 s over 10.9 million and 127,459 calls.Tested
runEndcopied verbatim compares them on 200 random page-state layouts (runs broken by random pages of other states) and 400,000 random queries (unaligned starts, limits inside and past the span): 0 differences. A 4 GiB uniform run: 97.2 us per scan before, 16.2 us after (output).runEndonly runs over the guest arena's page table, which none of the Linux test binaries set up, so no focused test reaches it there; on Windowsagc_page_statescoversDescribeCommittedacross chunk boundaries (not run here).mainagainst this change. Echoes needs feat(libSceAgcDriver): import scattered direct memory as a dma-buf run list and probe its coherence #4449, fix(shader): preserve read lane dominance across branches #8089, fix(agc): wait for a shader's registered preparation before taking the transaction lock #11873 and perf(agc): wait at submit only for the preparations of the programs a submission binds #6867 to boot onmain, so both arms aremain439d03db387with those merged: baseevidence/12066-base9bcf009b515, changeevidence/runend-change81680502cfa(base + this commit). Same machine and session, the same save, scripted input and starting caches; each arm ran the scene once for 400 s and its caches after that run seeded its capture (8.6 GiB title / 69-70 MiB Mesa for both). Capture 1830 s at the display's 3840x2160,APS5_TRACE_SECONDS=1500:300, no otherAPS5_*switch.{"commit":"9bcf009b5157","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1500:300"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA25636","title":"Echoes of the End","content_version":"01.012.000","resolution":"3840x2160","window":{"spec":"seconds 1500:300","first_present":851,"ms":301194.705},"presents":190,"frame_ms":{"p50":1500.104,"p90":1970.022,"p99":4203.369,"max":4732.120},"gpu_busy_ms_per_present":747.896,"worker_busy_pct":{"queue worker 0x0":99.867,"queue worker 0x20":98.495},"top_phases_ms_per_frame":{"Driver.Packet":3113.965,"Driver.Packet.dispatch":1678.636,"Driver.Dispatch":1504.432,"Driver.Packet.memory_wait":1028.663,"Resources.Complete":941.241,"Vulkan.Dispatch":903.235,"Vulkan.Dispatch.shader_resources":890.374,"Graphics.Draw":235.731},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":56.598,"events_lost":1050953,"totals_full":false},"queue worker 0x20":{"events_full_after_s":185.137,"events_lost":152275,"totals_full":false}},"trace":"aps5-trace-9bcf009b5157-3983020.json.gz"} {"commit":"81680502cfa0","dirty":false,"env":{"APS5_PAD_INPUT_FILE":"<path>","APS5_TRACE_DIR":"<path>","APS5_TRACE_SECONDS":"1500:300"},"gpu":"AMD Radeon RX 6650 XT (RADV NAVI23)","driver":"radv Mesa 26.2.4-arch1.1","os":"Linux 7.2.9-arch1-1","cpu":"AMD Ryzen 9 7950X 16-Core Processor","cpu_threads":32,"memory_mib":127901,"title_id":"PPSA25636","title":"Echoes of the End","content_version":"01.012.000","resolution":"3840x2160","window":{"spec":"seconds 1500:300","first_present":1204,"ms":300217.358},"presents":232,"frame_ms":{"p50":1266.387,"p90":1618.744,"p99":1763.661,"max":1778.084},"gpu_busy_ms_per_present":584.033,"worker_busy_pct":{"queue worker 0x0":99.836,"queue worker 0x20":98.241},"top_phases_ms_per_frame":{"Driver.Packet":2539.315,"Driver.Packet.dispatch":1318.402,"Driver.Dispatch":1172.602,"Driver.Packet.memory_wait":906.397,"Resources.Complete":723.116,"Vulkan.Dispatch":716.290,"Vulkan.Dispatch.shader_resources":704.502,"Graphics.Draw":218.574},"trace_dropped":true,"trace_dropped_threads":{"queue worker 0x0":{"events_full_after_s":50.912,"events_lost":1347520,"totals_full":false},"queue worker 0x20":{"events_full_after_s":154.181,"events_lost":246352,"totals_full":false}},"trace":"aps5-trace-81680502cfa0-681174.json.gz"}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