perf(gpu): lock-free no-op refreshes, chunked refresh claiming, and AVX2 copy diff #614

Open
github-bot wants to merge 2 commits from github-bot/gh-614 into main AGit
Owner

@⁠wike1701 on GitHub · 2026-11-28 01:53 UTC · original
wike1701:perf/cpu-refresh-and-copy-pipeline → main · +314 −80 · 3 files · 2 commits · open

Summary

Pure CPU hot-path optimization targeting the preparing /
efreshes bottleneck (~48–68 ms/frame on open-world captures, where ~8,100 of ~8,600 refreshes/frame copy nothing). Leaves GPU output and ordering byte-for-byte identical.

1. Lock-free no-op refresh fast path (watch.rs, shadow.rs, host.rs)

  • Shadow::copied: Box<[AtomicU64]> + copy_lock: Mutex<()>: readers (
    othing_new_with, stale_under_writes, window_use) read page generations lock-free; writers (copy_stale, merge_under_writes, landed) serialize on copy_lock and publish
    ow with Ordering::Release only after ake_all finishes writing bytes.
  • watch::JournalRead::nothing_new_atomic + Shadow::pending_any /
    anged_any
    : eliminates Shadow.pending, Shadow.copied, and Shadow.ranged mutex locks on the common whole-page read-only no-op path, while holding one JournalRead guard per 32-item chunk in wide_chunks (always dropped before Self::update).
  • watch::is_kept() fast path: avoids building/sorting up to 8,600 sk_ahead ranges and taking an exclusive journal_mut() write lock in sk_ahead_done on every flush while VICTORY_ASK_ONCE=1 stands.

2. Offload refresh coalescing to VICTORY_THIN workers (host.rs)

  • Deferred::refreshed_span: merges contained, overlapping, and contiguous Step::Refresh entries for the same Shadow in-place during HostList::defer_refresh on the parallel VICTORY_THIN worker threads (cleared on itle_written, ake_coming, and per-shadow on defer_gpu_write), shrinking copies before the single submitting thread walks it.

3. Faster real copy hot path (shadow.rs)

  • Shadow::take: switches dword_runs(at, held, title, 0) to the existing AVX2-accelerated word_runs(at, held, title) and batches SEND[0..4] atomic updates once per ake() call instead of 4 atomics per 64 KiB page.

Verification

  • VICTORY_D3D12_WARP=1 cargo test -p victory-gpu --lib -- shadow:: watch:: host:: list:: — 204 passed, 0 failed, 18 ignored
  • cargo check -p victory-gpu --features diagnostics — ok (0 new warnings)
  • cargo xtask policy — 292 files ok
**@⁠wike1701** on GitHub · 2026-11-28 01:53 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/614) `wike1701:perf/cpu-refresh-and-copy-pipeline` → `main` · +314 −80 · 3 files · 2 commits · open ## Summary Pure CPU hot-path optimization targeting the preparing / efreshes bottleneck (~48–68 ms/frame on open-world captures, where ~8,100 of ~8,600 refreshes/frame copy nothing). Leaves GPU output and ordering byte-for-byte identical. ### 1. Lock-free no-op refresh fast path (watch.rs, shadow.rs, host.rs) - **Shadow::copied: Box<[AtomicU64]> + copy_lock: Mutex<()>**: readers ( othing_new_with, stale_under_writes, window_use) read page generations lock-free; writers (copy_stale, merge_under_writes, landed) serialize on copy_lock and publish ow with Ordering::Release **only after** ake_all finishes writing bytes. - **watch::JournalRead::nothing_new_atomic + Shadow::pending_any / anged_any**: eliminates Shadow.pending, Shadow.copied, and Shadow.ranged mutex locks on the common whole-page read-only no-op path, while holding one JournalRead guard per 32-item chunk in wide_chunks (always dropped before Self::update). - **watch::is_kept() fast path**: avoids building/sorting up to 8,600 sk_ahead ranges and taking an exclusive journal_mut() write lock in sk_ahead_done on every flush while VICTORY_ASK_ONCE=1 stands. ### 2. Offload refresh coalescing to VICTORY_THIN workers (host.rs) - **Deferred::refreshed_span**: merges contained, overlapping, and contiguous Step::Refresh entries for the same Shadow in-place during HostList::defer_refresh on the parallel VICTORY_THIN worker threads (cleared on itle_written, ake_coming, and per-shadow on defer_gpu_write), shrinking copies before the single submitting thread walks it. ### 3. Faster real copy hot path (shadow.rs) - **Shadow::take**: switches dword_runs(at, held, title, 0) to the existing AVX2-accelerated word_runs(at, held, title) and batches SEND[0..4] atomic updates once per ake() call instead of 4 atomics per 64 KiB page. ## Verification - VICTORY_D3D12_WARP=1 cargo test -p victory-gpu --lib -- shadow:: watch:: host:: list:: — **204 passed, 0 failed, 18 ignored** - cargo check -p victory-gpu --features diagnostics — **ok** (0 new warnings) - cargo xtask policy — **292 files ok**
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 01:57:29 +00:00
Author
Owner

@⁠CuteBooty on GitHub · 2026-11-28 04:42 UTC · original

A first in-game data point from an NVIDIA 8 GB card. The two runs are short, so please read it as "it runs", not as a verdict.

  • PC: RTX 3070 8 GB (driver 621.24), Ryzen 7 5800X3D, 32 GB, Windows 11. Series S, 1920x1080, no DLSS or frame generation in these two runs, started with victory.exe run, diag profile with diagnostics; VICTORY_THIN=1, VICTORY_RELAY=2, VICTORY_JOIN_PARTS=8, VICTORY_SOFT_VIEWS=copies.
  • Build A: main 8fc22547c + two unrelated local commits. Build B: the same + this PR's commit caf1a4ce5 cherry-picked. One session each (3.2 and 4.7 minutes), same save, not the same spot.
the submitting thread, per frame (frames of 3,000+ flushes) main main + #614
log lines 86 217
refreshes, median (mean) 17.9 (18.9) ms 19.4 (17.3) ms
flushes a frame / of them known to copy nothing 8,302 / 7,177 8,397 / 7,438
whole "preparing per frame, the submitting thread", median 54.7 ms 57.3 ms
  • No error lines, and the player reported no visual faults in the 4.7 minutes with the PR.
  • I cannot see a change in the refresh time outside the spread between two short runs on this PC. A longer pair on the same route is on my list. If one log line would show this PR's effect best, tell me which and I will report that one.

Measurements and this report were prepared with an AI assistant (Claude Code); the runs were played on my machine.

**@⁠CuteBooty** on GitHub · 2026-11-28 04:42 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/614#issuecomment-7234205115) A first in-game data point from an NVIDIA 8 GB card. The two runs are short, so please read it as "it runs", not as a verdict. - PC: RTX 3070 8 GB (driver 621.24), Ryzen 7 5800X3D, 32 GB, Windows 11. Series S, 1920x1080, no DLSS or frame generation in these two runs, started with `victory.exe run`, diag profile with diagnostics; `VICTORY_THIN=1`, `VICTORY_RELAY=2`, `VICTORY_JOIN_PARTS=8`, `VICTORY_SOFT_VIEWS=copies`. - Build A: main `8fc22547c` + two unrelated local commits. Build B: the same + this PR's commit `caf1a4ce5` cherry-picked. One session each (3.2 and 4.7 minutes), same save, not the same spot. | the submitting thread, per frame (frames of 3,000+ flushes) | main | main + #614 | |---|---|---| | log lines | 86 | 217 | | refreshes, median (mean) | 17.9 (18.9) ms | 19.4 (17.3) ms | | flushes a frame / of them known to copy nothing | 8,302 / 7,177 | 8,397 / 7,438 | | whole "preparing per frame, the submitting thread", median | 54.7 ms | 57.3 ms | - No error lines, and the player reported no visual faults in the 4.7 minutes with the PR. - I cannot see a change in the refresh time outside the spread between two short runs on this PC. A longer pair on the same route is on my list. If one log line would show this PR's effect best, tell me which and I will report that one. Measurements and this report were prepared with an AI assistant (Claude Code); the runs were played on my machine.
Author
Owner

@⁠POMXARK on GitHub · 2026-11-28 04:44 UTC · original

Testing feedback on Windows 11, AMD Ryzen 7 5700X (8C/16T), NVIDIA RTX 5080 16 GB, 32 GB RAM, Series X 1440p + DLSS Quality + DLSS MFG 4× (4 MiB default windows, VICTORY_GPU_BCPACK=0, VICTORY_WAIT_RESIDENT=0, VICTORY_TEXTURE_ROOM_PERCENT=70, VICTORY_LAND_SKIP=1).

Full disclosure: tested on a fork branch based on v2026.11.27.7 (with local GPU patches, x86-64-v3/ThinLTO, PR #469 ahead_holds, PR #516, PR #340, and PR #81; resolved the single nothing_new conflict in watch.rs keeping ahead_holds binary search inside nothing_new_atomic).

Result

  • Unit tests: VICTORY_D3D12_WARP=1 cargo test -p victory-gpu --lib -- shadow:: watch:: host:: list:: — 205 passed, 0 failed, 17 ignored (2.70 s).
  • 3D performance prior to failure (0..858 s, n=110 3D samples):
    • Frame pacing was notably smooth: 0 frames >=250 ms, 0 GPU stalls >=50 ms, max = 203.2 ms, tex refreshes p50 = 11.5 ms (down from 16.0 ms), write watch p50 = 1.7 ms (down from 2.6 ms).
    • High-draw 3D (7k–10k draws, p50=8,265): 11.30 FPS p50 / 12.60 mean (88.6 ms, Prep 70.5 ms, copies 41.8 ms).
    • Very-high-draw 3D (>=10k draws, p50=10,444): 13.50 FPS p50 (74.0 ms, Prep 57.1 ms, copies 31.1 ms).
  • Failure at 14m18s (frame=41453, heavy streaming transition 6.4k -> 9.7k refreshes/frame):
    • Hit DXGI_ERROR_DEVICE_HUNG (0x887A0006), which has not occurred on prior 12-minute runs of the same branch without PR #614:
      • ERROR victory_gpu::host: host GPU device removed after 16 submissions sent ahead (VICTORY_RELAY=1) of 213 lists; ... device removed: ... (0x887A0006)
    • Last mem_audit before the hang was healthy (dxgi_ded_mb=11346, dxgi_shared_mb=8688, phys_free_mb=2165, MinFreeC=7.75 GB, 0 guest exceptions).
    • Reverted PR #614 for now to restore clean stability; worth auditing Deferred::refreshed_span in-place Step::Refresh mutation across aliased shadows / interleaved copy steps and nothing_new_atomic synchronization under heavy VICTORY_RELAY=1 workloads.
**@⁠POMXARK** on GitHub · 2026-11-28 04:44 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/614#issuecomment-7234226670) Testing feedback on **Windows 11, AMD Ryzen 7 5700X (8C/16T), NVIDIA RTX 5080 16 GB, 32 GB RAM**, Series X 1440p + DLSS Quality + DLSS MFG 4× (`4 MiB` default windows, `VICTORY_GPU_BCPACK=0`, `VICTORY_WAIT_RESIDENT=0`, `VICTORY_TEXTURE_ROOM_PERCENT=70`, `VICTORY_LAND_SKIP=1`). Full disclosure: tested on a fork branch based on `v2026.11.27.7` (with local GPU patches, `x86-64-v3`/ThinLTO, PR #469 `ahead_holds`, PR #516, PR #340, and PR #81; resolved the single `nothing_new` conflict in `watch.rs` keeping `ahead_holds` binary search inside `nothing_new_atomic`). ### Result - **Unit tests:** `VICTORY_D3D12_WARP=1 cargo test -p victory-gpu --lib -- shadow:: watch:: host:: list::` — **205 passed, 0 failed, 17 ignored** (`2.70 s`). - **3D performance prior to failure (`0..858 s`, `n=110` 3D samples):** - Frame pacing was notably smooth: **`0` frames `>=250 ms`**, **`0` GPU stalls `>=50 ms`**, `max = 203.2 ms`, `tex refreshes p50 = 11.5 ms` (down from `16.0 ms`), `write watch p50 = 1.7 ms` (down from `2.6 ms`). - High-draw 3D (`7k–10k draws`, `p50=8,265`): `11.30 FPS` p50 / `12.60` mean (`88.6 ms`, `Prep 70.5 ms`, `copies 41.8 ms`). - Very-high-draw 3D (`>=10k draws`, `p50=10,444`): `13.50 FPS` p50 (`74.0 ms`, `Prep 57.1 ms`, `copies 31.1 ms`). - **Failure at `14m18s` (`frame=41453`, heavy streaming transition `6.4k -> 9.7k` refreshes/frame):** - Hit **`DXGI_ERROR_DEVICE_HUNG` (`0x887A0006`)**, which has not occurred on prior 12-minute runs of the same branch without PR #614: - `ERROR victory_gpu::host: host GPU device removed after 16 submissions sent ahead (VICTORY_RELAY=1) of 213 lists; ... device removed: ... (0x887A0006)` - Last `mem_audit` before the hang was healthy (`dxgi_ded_mb=11346`, `dxgi_shared_mb=8688`, `phys_free_mb=2165`, `MinFreeC=7.75 GB`, `0` guest exceptions). - Reverted PR #614 for now to restore clean stability; worth auditing `Deferred::refreshed_span` in-place `Step::Refresh` mutation across aliased shadows / interleaved copy steps and `nothing_new_atomic` synchronization under heavy `VICTORY_RELAY=1` workloads.
Author
Owner

@⁠Machad3x on GitHub · 2026-11-28 07:09 UTC · original

Test results for this PR on our fork. It is ported as 7a84d45a, in batch 9 together with refresh and asking cuts on the same path (only the pages a submission reads).

Setup: RTX 3080 Ti, driver 621.40, Windows 11 Pro build 26300, Ryzen 7 5700X. RT on. Each run is 240 s on the opening interior scene, with a valid (non-compile) rerun. Values are averages over the last 120 s.

Run Frame Preparing GPU
base 66.6 ms (max 81) 46.8 8.3
batch 9 67.0 ms (max 75) 41.7 14.0
  • Preparing: about 5 ms less per frame.
  • Frame time: steady state unchanged, because the GPU rose by about 6 ms (VRAM changes in the same batch).
  • Early loading: the first 80 s after the world starts average 148.5 ms per frame, down from 261.3.
  • Shaders and draws: 0 dropped draws, 0 refused shaders.

Unit tests (victory-gpu): 483 passed. Thanks!

**@⁠Machad3x** on GitHub · 2026-11-28 07:09 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/614#issuecomment-7235749663) Test results for this PR on our fork. It is ported as 7a84d45a, in batch 9 together with refresh and asking cuts on the same path (only the pages a submission reads). **Setup:** RTX 3080 Ti, driver 621.40, Windows 11 Pro build 26300, Ryzen 7 5700X. RT on. Each run is 240 s on the opening interior scene, with a valid (non-compile) rerun. Values are averages over the last 120 s. | Run | Frame | Preparing | GPU | |---|---|---|---| | base | 66.6 ms (max 81) | 46.8 | 8.3 | | batch 9 | 67.0 ms (max 75) | 41.7 | 14.0 | - **Preparing:** about 5 ms less per frame. - **Frame time:** steady state unchanged, because the GPU rose by about 6 ms (VRAM changes in the same batch). - **Early loading:** the first 80 s after the world starts average 148.5 ms per frame, down from 261.3. - **Shaders and draws:** 0 dropped draws, 0 refused shaders. Unit tests (victory-gpu): 483 passed. Thanks!
github-bot changed title from perf(gpu): lock-free no-op refreshes, thin-worker refresh coalescing, and AVX2 copy diff to perf(gpu): lock-free no-op refreshes, chunked refresh claiming, and AVX2 copy diff 2026-11-28 14:35:43 +00:00
Author
Owner

@⁠POMXARK on GitHub · 2026-11-28 13:06 UTC · original

Follow-up isolation test on the 0x887A0006 (DXGI_ERROR_DEVICE_HUNG) reported earlier:

We isolated only the read-only lock-free refresh path and AVX2 copy diff from this PR — omitting Deferred::refreshed_span (host.rs) — and ran a full 20-minute 3D A/B on the exact same RTX 5080 + Ryzen 7 5700X Windows 11 setup:

  • Included: Shadow::take word_runs + batched SEND atomics, watch::JOURNAL_KEPT fast path, JournalRead::nothing_new_atomic (using ahead_holds), Shadow::copied: Box<[AtomicU64]> with copy_lock + pending_any/ranged_any, and shadow::wide_chunks(32) in Batch::refresh_front/refresh_ahead/flush_all.
  • Excluded: Deferred::refreshed_span in-place Step::Refresh coalescing/shrinking.

Isolation Result (20-Minute Run, 1200 s, 50,243 frames)

  • Stability: 0 errors, 0 DeviceRemoved/DEVICE_HUNG, 0 exceptions, 0 GPU>=50ms, 0 F>=250ms, 0 F>=500ms, worst 3D frame 191.1 ms, 327/327 (100%) Responding.
  • Performance (vs clean baseline before this subset):
    • ALL 3D (n=176 -> 167): 13.3 -> 13.9 FPS p50 (+4.5%), mean 13.35 -> 13.91 FPS (+4.2%), Prep 60.5 -> 58.1 ms.
    • 7k–10k draws/frame (n=37 -> 34): 10.90 -> 11.05 FPS p50 (mean 10.39 -> 11.06 FPS, +6.4%, copies 45.1 -> 40.2 ms).
    • submitting prep: ww 7.1 -> 6.0 ms, refreshes p90 47.5 -> 42.5 ms, 1s frame_times >100ms -19.7% (1,687 -> 1,354).

This strongly isolates the 0x887A0006 GPU hang to Deferred::refreshed_span (in-place Step::Refresh mutation/skipping across steps inside a submission), while the lock-free nothing_new_with + wide_chunks + word_runs portions are clean and stable across a full 20-minute workload.

**@⁠POMXARK** on GitHub · 2026-11-28 13:06 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/614#issuecomment-7239689720) Follow-up isolation test on the `0x887A0006` (`DXGI_ERROR_DEVICE_HUNG`) reported earlier: We isolated **only** the read-only lock-free refresh path and AVX2 copy diff from this PR — **omitting `Deferred::refreshed_span` (`host.rs`)** — and ran a full 20-minute 3D A/B on the exact same RTX 5080 + Ryzen 7 5700X Windows 11 setup: - Included: `Shadow::take` `word_runs` + batched `SEND` atomics, `watch::JOURNAL_KEPT` fast path, `JournalRead::nothing_new_atomic` (using `ahead_holds`), `Shadow::copied: Box<[AtomicU64]>` with `copy_lock` + `pending_any`/`ranged_any`, and `shadow::wide_chunks(32)` in `Batch::refresh_front`/`refresh_ahead`/`flush_all`. - Excluded: `Deferred::refreshed_span` in-place `Step::Refresh` coalescing/shrinking. ### Isolation Result (20-Minute Run, `1200 s`, `50,243` frames) - **Stability:** **`0` errors, `0` `DeviceRemoved`/`DEVICE_HUNG`, `0` exceptions, `0` `GPU>=50ms`, `0` `F>=250ms`, `0` `F>=500ms`**, worst 3D frame `191.1 ms`, `327/327` (`100%`) Responding. - **Performance (vs clean baseline before this subset):** - `ALL 3D` (`n=176 -> 167`): `13.3 -> 13.9 FPS` p50 (`+4.5%`), mean `13.35 -> 13.91 FPS` (`+4.2%`), `Prep 60.5 -> 58.1 ms`. - `7k–10k draws/frame` (`n=37 -> 34`): `10.90 -> 11.05 FPS` p50 (mean `10.39 -> 11.06 FPS`, **`+6.4%`**, `copies 45.1 -> 40.2 ms`). - `submitting prep`: `ww 7.1 -> 6.0 ms`, `refreshes p90 47.5 -> 42.5 ms`, `1s frame_times >100ms` `-19.7%` (`1,687 -> 1,354`). This strongly isolates the `0x887A0006` GPU hang to **`Deferred::refreshed_span`** (in-place `Step::Refresh` mutation/skipping across steps inside a submission), while the lock-free `nothing_new_with` + `wide_chunks` + `word_runs` portions are clean and stable across a full 20-minute workload.
Author
Owner

@⁠wike1701 on GitHub · 2026-11-28 13:30 UTC · original

Thank you @⁠POMXARK for the thorough 20-minute A/B isolation run — that was super helpful! I have removed \Deferred::refreshed_span\ from this PR so it now contains only the clean, 20-minute-verified subset: lock-free \Shadow::copied\ + \copy_lock, \watch::JOURNAL_KEPT\ /
othing_new_atomic, \wide_chunks(32)\ claiming, and AVX2 \word_runs\ + batched \SEND\ atomics. Re-verified \cargo test -p victory-gpu --lib -- shadow:: watch:: host::\ (197 passed, 0 failed).

**@⁠wike1701** on GitHub · 2026-11-28 13:30 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/614#issuecomment-7239981937) Thank you @⁠POMXARK for the thorough 20-minute A/B isolation run — that was super helpful! I have removed \Deferred::refreshed_span\ from this PR so it now contains only the clean, 20-minute-verified subset: lock-free \Shadow::copied\ + \copy_lock\, \watch::JOURNAL_KEPT\ / \ othing_new_atomic\, \wide_chunks(32)\ claiming, and AVX2 \word_runs\ + batched \SEND\ atomics. Re-verified \cargo test -p victory-gpu --lib -- shadow:: watch:: host::\ (197 passed, 0 failed).
Author
Owner

@⁠RobertAndreiGit on GitHub · 2026-11-28 14:34 UTC · original

Tested the revised ee008d0 diff on stock 63b902f, on a Ryzen 5 5600 / RTX 3060 Ti 8 GB under CachyOS Proton. It built and reached Chapter 1 gameplay. This was one partial run, not a matched stock-vs-patch A/B.

  • Series S, DLSS Performance, FSR 3 2× configured; the stock and patched runs used copies of the same save/cache and the same VICTORY_CARD_AWAKE=turns setting. No other source patches in the candidate.
  • 8.33 rendered FPS from counter progress (208 → 996 in 94.6 s). Across 16 host reports with at least 2,000 draws/frame, the median was 9.9 FPS, with 4,502 draws and 264 draws skipped for lack of a host pipeline per frame (rounded). These are rendered rates, not measured display FPS.
  • For the CPU path this PR changes: in 60 complete one-second refresh reports inside high-draw host intervals, median refresh time was 62.0 ms/frame and the median share of spans already known to copy nothing was 73.3%. The timing includes refreshes that did copy; it does not measure the cost of no-op checks alone.

The opening tank view matched, but at three later capture marks (610, 720, 940) the candidate faced the balcony while stock faced the radio. The window closed and the title suspended at count 996, before the planned 2,220. So this confirms the revised subset runs on this Proton/8 GB setup and the refresh workload is present; it does not establish a speedup, regression, or long-run stability.

**@⁠RobertAndreiGit** on GitHub · 2026-11-28 14:34 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/614#issuecomment-7240775780) Tested the revised `ee008d0` diff on stock `63b902f`, on a Ryzen 5 5600 / RTX 3060 Ti 8 GB under CachyOS Proton. It built and reached Chapter 1 gameplay. This was one partial run, **not a matched stock-vs-patch A/B**. - Series S, DLSS Performance, FSR 3 2× configured; the stock and patched runs used copies of the same save/cache and the same `VICTORY_CARD_AWAKE=turns` setting. No other source patches in the candidate. - **8.33 rendered FPS** from counter progress (208 → 996 in 94.6 s). Across 16 host reports with at least 2,000 draws/frame, the median was **9.9 FPS**, with **4,502 draws** and **264 draws skipped for lack of a host pipeline** per frame (rounded). These are rendered rates, not measured display FPS. - For the CPU path this PR changes: in 60 complete one-second refresh reports inside high-draw host intervals, median refresh time was **62.0 ms/frame** and the median share of spans already known to copy nothing was **73.3%**. The timing includes refreshes that did copy; it does not measure the cost of no-op checks alone. The opening tank view matched, but at three later capture marks (610, 720, 940) the candidate faced the balcony while stock faced the radio. The window closed and the title suspended at count 996, before the planned 2,220. So this confirms the revised subset runs on this Proton/8 GB setup and the refresh workload is present; it does **not** establish a speedup, regression, or long-run stability.
github-bot force-pushed github-bot/gh-614 from ee008d0b14 to f27bb04a92 2026-11-28 19:43:39 +00:00 Compare
github-bot force-pushed github-bot/gh-614 from f27bb04a92 to 7382c3684d 2026-11-28 19:49:23 +00:00 Compare
Author
Owner

@⁠unueberlegt on GitHub · 2026-11-29 01:23 UTC · original

Data point from an independent pass over #1521's first point (measured standalone before I saw this): instead of lock-free generations we kept copied as a mutex (its fold with ranged is upstream as 0174844) and batched the journal side — one JOURNAL read guard per claim of VICTORY_WIDE_CHUNK spans (16 worked best as the default) with a guard-reusing nothing_new_in(&Journal, …), and one FLUSHES[2].fetch_add(noop) per claim. The read guards are shareable, so workers do not exclude each other; only the writers wait, at most one claim. RTX 5070 12 GB, Ryzen 9 9950X3D (16C/32T), Series X 2560x1440, prologue, steady windows, medians: refreshes 7.2 → 6.8 ms/frame, spans ~6,700/frame at ~83% no-op — the flush wall time there is bounded by the real copies, so the RMW savings show properly only where the submitting thread is the frame's wall (the issue's 8-core reporter). Your 32-item chunk is the same trade at a different point; we did not measure 32 against 16.

GPU and profile: NVIDIA RTX 5070 12 GB, AMD Ryzen 9 9950X3D, 31 GB RAM, Windows 11 26300; release builds, steady-window medians.

**@⁠unueberlegt** on GitHub · 2026-11-29 01:23 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/614#issuecomment-7248755124) Data point from an independent pass over #1521's first point (measured standalone before I saw this): instead of lock-free generations we kept `copied` as a mutex (its fold with `ranged` is upstream as 0174844) and batched the *journal* side — one `JOURNAL` read guard per claim of `VICTORY_WIDE_CHUNK` spans (16 worked best as the default) with a guard-reusing `nothing_new_in(&Journal, …)`, and one `FLUSHES[2].fetch_add(noop)` per claim. The read guards are shareable, so workers do not exclude each other; only the writers wait, at most one claim. RTX 5070 12 GB, Ryzen 9 9950X3D (16C/32T), Series X 2560x1440, prologue, steady windows, medians: refreshes 7.2 → 6.8 ms/frame, spans ~6,700/frame at ~83% no-op — the flush wall time there is bounded by the real copies, so the RMW savings show properly only where the submitting thread is the frame's wall (the issue's 8-core reporter). Your 32-item chunk is the same trade at a different point; we did not measure 32 against 16. GPU and profile: NVIDIA RTX 5070 12 GB, AMD Ryzen 9 9950X3D, 31 GB RAM, Windows 11 26300; release builds, steady-window medians.
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/host.rs
  • crates/victory-gpu/src/shadow.rs
  • crates/victory-gpu/src/watch.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/614/head:github-bot/gh-614'
git switch 'github-bot/gh-614'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-614'
git switch 'github-bot/gh-614'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-614'
git switch 'github-bot/gh-614'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-614'
git switch 'main'
git merge --squash 'github-bot/gh-614'
git switch 'main'
git merge --ff-only 'github-bot/gh-614'
git switch 'main'
git merge 'github-bot/gh-614'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!614
No description provided.