Repository navigation
Conversation
|
Could you measure main against main plus this PR alone, ideally frame time in a title? Perf PRs need before/after numbers for the change itself (#218); the 2,354 → 0.764 ms figure is a component run on the combined fork. The same goes for #1309, #1310, #1315, #1316, #1330 (against main plus #157), #1331, #1334 and #1335: their figures are component or combined-branch runs, or there are none. |
Use a locked ordered lookup for one containing readable allocation when the import registry is current. Recheck the registry generation after acquiring the lease, and retain the full reconciliation path when mappings change. Tests cover bounds, gaps, read-only and inaccessible ranges, address reuse, changed protection, pinning the requested allocation, and releasing an unrelated allocation. agc_driver_graphics passes on Fedora 44. The preceding Skyrim profile attributed 76% of sampled CPU cycles to full allocation leases. Written with AI assistance.
Bound allocation coverage and availability lookups, stage only changed mapping fragments before host operations, and retain atomic registry updates on host failure. Descriptor uploads acquire a targeted lease when an unchanged registry has no cached import. Validation: agc_driver_graphics and guest_memory passed, including host-failure rollback, gaps, split mappings and unrelated leases. A 20000-entry mapping microbenchmark dropped from 2354 ms to 0.764 ms for 1000 localized operations; this is not a game benchmark. AI-assisted implementation.
a19d598 to
1daa7f6
Compare
|
Rebased on Measured upstream The same fixture calls
The one-range case has overlapping timing ranges; no gain is established there. The larger cases show that unrelated registry entries no longer dominate these operations. This does not measure Vulkan import creation or title frame time. Graphics and guest-memory tests pass, including range boundaries, split mappings, permissions, unrelated leases, address reuse, and failed-host-operation rollback. Contribution checks pass. Windows was not tested. AI-assisted. |
|
I measured this alone in two titles: frame time didn't change beyond run-to-run noise (-2.3 % to +1.0 % across three scenes in one, none in the other). Which title does it speed up? |
|
Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), RTX 3060 Laptop (NVIDIA 616.92), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head
No title was run. 🤖 Addressed by Claude Code |
adriadam10
left a comment
There was a problem hiding this comment.
Checked on current main: build + ctest green locally (308/308 in the touched components); the new tests need the new API, and I found no logic problems in the registry changes (iterator ranges, Commit(), last computation in Unmap, boundary cases).
- The open question from @oneandonlydean is still unanswered: his measurements in two titles show frame time unchanged (-2.3 % to +1.0 %, run-to-run noise). The numbers in the description are registry microbenchmarks with empty host callbacks, not before/after numbers for a title (CONTRIBUTING, perf PRs). Please name a title/scene where
mainvsmain+ this PR alone shows a measurable difference (frame time or the time spent in these functions in a profile). - If there is no measurable gain in a real title, this adds complexity to the registry without a benefit and should be dropped, or reopened when a case shows up.
adriadam10
left a comment
There was a problem hiding this comment.
Still open after the last review:
- Perf PRs need before/after numbers for the change alone in a real title (CONTRIBUTING). @oneandonlydean measured this PR alone in two titles and frame time did not change beyond noise (-2.3 % to +1.0 %). The figures in the description are registry microbenchmarks with empty host callbacks. Please name a title/scene where
mainvsmain+ this PR shows a measurable difference (frame time, or time spent in these functions in a profile). - The branch now conflicts with
main; it needs a rebase (and a rerun ofguest_allocations/agc_driver_graphics) once the benefit is shown.
Without a measurable gain in a real title this adds complexity to the registry for no benefit; it can be reopened when a case shows up.
Status after review
Awaiting a title profile showing registry cost.
Rechecked the motivation against current main. Host imports now have eager GPU-map observation and later span/lifetime fixes. The microbenchmark with empty host callbacks does not model those costs. The existing two-title review measured only −2.3% to +1.0%, within noise; no new isolated title gain has been established.
This pass removed the artificial downstream dependency: #1345, #1357, #1359 and #1366 now have standalone changes on main and do not require these targeted leases. A rebase of this optimization should follow a title/scene profile showing remaining full-registry work, with real callbacks included. No code push or renewed performance claim here.
What
Limit allocation lookup and mapping updates to the requested range. Host-import lookups lease one containing allocation when the registry is current. Protection and unmap changes prepare only affected fragments, then commit after the host operation succeeds.
Tested
Earlier branch-specific tests and measurements remain in the discussion. They have not been rerun on a redesigned current-main version of this PR. The review audit and shared NGS-assisted title exploration do not establish that this head is merge-ready. No full Linux/Windows platform CI was dispatched in this pass.
Checklist