Stop refreshing covered by-address copies #220

Manually merged
github merged 1 commit from github-bot/gh-220 into main 2026-12-03 17:20:10 +00:00 AGit
Owner

@⁠tommiehansen on GitHub · 2026-12-02 19:12 UTC · original
tommiehansen:perf/by-address-prefix-refresh → main · +38 −17 · 2 files · 1 commits · merged 2026-12-03 17:15 UTC

Builders repeatedly visit all known copies and the directory when scheduling deferred updates. The per-range set discards duplicate requests, and each visit still takes the list lock and checks the set under the by-address memory lock.

This branch keeps the visited prefix of the append-only copy table for each command list between title-memory writes. It visits only new copies on subsequent requests, alongside the existing per-range deduplication. The write and reset paths clear the prefix when they clear the range state. Deferred ordering, in-place reveal and heat notifications, and retained resources are preserved.

At a fixed table size N, K requests before another write go from K × (N + 1) range visits to N + 1 total and from one lock per visit to one per request. Expected benefit is less CPU time and contention in builder-heavy frames. Both Windows-target Rust configurations passed. An extracted old/new comparison covered append, repeated and partial refreshes, writes and list resets.

Illustrative work reduction

For a fixed table of 100 copies plus its directory, with no intervening title-memory write:

Refresh requests on one list Previous range visits Prefix-based visits
2 202 101
10 1,010 101
100 10,100 101

These are illustrative counts derived from the algorithm, not measured workload frequencies or frame-time savings. New copies and invalidation still require visits. Related but independent: #308 reduces repeated wide-submission planning.

Hardware testing

Hardware benchmarking was unavailable. Please check CPU recording times, frame-time tails and BVH streaming at native 1080p on RX 9060 XT 16 GB and native 1440p on RX 9070 XT under Linux, with RT enabled and frame generation disabled.

**@⁠tommiehansen** on GitHub · 2026-12-02 19:12 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/220) `tommiehansen:perf/by-address-prefix-refresh` → `main` · +38 −17 · 2 files · 1 commits · merged 2026-12-03 17:15 UTC Builders repeatedly visit all known copies and the directory when scheduling deferred updates. The per-range set discards duplicate requests, and each visit still takes the list lock and checks the set under the by-address memory lock. This branch keeps the visited prefix of the append-only copy table for each command list between title-memory writes. It visits only new copies on subsequent requests, alongside the existing per-range deduplication. The write and reset paths clear the prefix when they clear the range state. Deferred ordering, in-place reveal and heat notifications, and retained resources are preserved. At a fixed table size N, K requests before another write go from K × (N + 1) range visits to N + 1 total and from one lock per visit to one per request. Expected benefit is less CPU time and contention in builder-heavy frames. Both Windows-target Rust configurations passed. An extracted old/new comparison covered append, repeated and partial refreshes, writes and list resets. ## Illustrative work reduction For a fixed table of 100 copies plus its directory, with no intervening title-memory write: | Refresh requests on one list | Previous range visits | Prefix-based visits | |---:|---:|---:| | 2 | 202 | 101 | | 10 | 1,010 | 101 | | 100 | 10,100 | 101 | These are illustrative counts derived from the algorithm, not measured workload frequencies or frame-time savings. New copies and invalidation still require visits. Related but independent: [#308](https://git.gtahub.st/github/lobomfz--VIctory-xmem/pulls/308) reduces repeated wide-submission planning. ## Hardware testing Hardware benchmarking was unavailable. Please check CPU recording times, frame-time tails and BVH streaming at native 1080p on RX 9060 XT 16 GB and native 1440p on RX 9070 XT under Linux, with RT enabled and frame generation disabled.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 19:28:02 +00:00
github-bot force-pushed github-bot/gh-220 from 682f46f9d6 to 085634f710 2026-12-02 19:33:56 +00:00 Compare
github manually merged commit 7fef441b4f into main 2026-12-03 17:20:10 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.