GPU: fuse HostHeap::sync_slots with a VIEW_GENS RwLock #3679

Open
Luislariosss wants to merge 1 commit from upstream-pr/3679 into main
Luislariosss commented 2026-11-28 05:46:57 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Luislariosss on 2026-11-28T05:46:57Z.


Summary

  • Replace iews_current(&records) with a VIEW_GENS: RwLock<Vec> kept in lockstep with VIEWS (written only inside
    ecord on append and inside orget on generation bump; free-index reuse keeps its existing generation).
  • Fuse HostHeap::sync_slots into a single pass over irst..last reading [tag, view, generation] directly and checking VIEW_GENS under one read lock alongside self.made.

Why

  • Avoids allocating two temporary per-page Vecs (
    ecords and current) per sync.
  • Removes VIEWS mutex contention between submission syncs and title threads recording views, and avoids cache-missing across large (View, u32) entries on every slot check.
  • Preserves strict lock ordering self.made -> VIEWS -> VIEW_GENS (never acquiring VIEW_GENS before self.made, preventing a 3-lock deadlock against made -> VIEWS and VIEWS -> VIEW_GENS).

Verification

  • cargo xtask policy (191 files ok)
  • cargo clippy -p victory-gpu --all-targets -- -D warnings (passed)
  • cargo clippy -p victory-gpu --all-targets --features diagnostics -- -D warnings (passed)
  • cargo test -p victory-gpu --lib descriptor:: (23 passed, 0 failed, including new descriptor::tests::view_gens_matches_views_across_record_forget_and_reuse)
<!-- greyfinch-sync:Marvisak/VIctory:issue:5537190967 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3679). Originally posted by [Luislariosss](https://github.com/Luislariosss) on 2026-11-28T05:46:57Z. --- ### Summary - Replace iews_current(&records) with a VIEW_GENS: RwLock<Vec<u32>> kept in lockstep with VIEWS (written only inside ecord on append and inside orget on generation bump; free-index reuse keeps its existing generation). - Fuse HostHeap::sync_slots into a single pass over irst..last reading [tag, view, generation] directly and checking VIEW_GENS under one read lock alongside self.made. ### Why - Avoids allocating two temporary per-page Vecs ( ecords and current) per sync. - Removes VIEWS mutex contention between submission syncs and title threads recording views, and avoids cache-missing across large (View, u32) entries on every slot check. - Preserves strict lock ordering self.made -> VIEWS -> VIEW_GENS (never acquiring VIEW_GENS before self.made, preventing a 3-lock deadlock against made -> VIEWS and VIEWS -> VIEW_GENS). ### Verification - cargo xtask policy (191 files ok) - cargo clippy -p victory-gpu --all-targets -- -D warnings (passed) - cargo clippy -p victory-gpu --all-targets --features diagnostics -- -D warnings (passed) - cargo test -p victory-gpu --lib descriptor:: (23 passed, 0 failed, including new descriptor::tests::view_gens_matches_views_across_record_forget_and_reuse)
oni-swr commented 2026-11-28 07:25:41 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by oni-swr on 2026-11-28T07:25:41Z.


Independent Software WARP Verification

  • Base (main): 63bcca43c6a00a758510398fa43096ce7e4f7df0
  • PR #3679 head: 1f39a2fc151fc8254ec439738c1914777ae38292 (clean fast-forward merge; merge tree 7518c7caed2763c1d69f68bcb87382eccb4375d0; also merges cleanly with #3688 into tree 6526713a581880b3eeb40fb931a3d69cd1658847)
  • Environment: Windows software WARP only (VICTORY_WARP=1, VICTORY_D3D12_WARP=1, --features diagnostics so victory-gpu selects warp_adapter()); DXGI reports Microsoft Basic Render Driver (VendorId=0x1414, DeviceId=0x008C, Flags=0x2)
  • DLLs: d3d10warp.dll 10.0.26100.9818, dxil.dll 1.8.2502.11

Results (base vs merged)

  • Base 63bcca43:
    • cargo test --locked -p victory-gpu --features diagnostics -j 4: 246 passed, 0 failed, 1 ignored (doc-tests: 0)
    • view_gens_matches_views_across_record_forget_and_reuse: absent (0 tests)
  • Merged #3679 (1f39a2fc):
    • cargo test --locked -p victory-gpu --features diagnostics -j 4: 247 passed, 0 failed, 1 ignored (doc-tests: 0)
    • descriptor::tests::view_gens_matches_views_across_record_forget_and_reuse: passed
    • cargo clippy --locked -p victory-gpu --all-targets -- -D warnings: passed
    • cargo clippy --locked -p victory-gpu --all-targets --features diagnostics -- -D warnings: passed
    • cargo xtask policy: passed (191 files ok)

Diff Review

  • Lock ordering: Strictly preserves self.made -> VIEWS -> VIEW_GENS (record()/forget() acquire VIEWS -> VIEW_GENS; mirror() acquires self.made -> VIEWS; sync_slots() acquires self.made -> VIEW_GENS). No cycle.
  • Lockstep & free-slot reuse: record() pushes 1 to VIEW_GENS only on views.list growth; forget() bumps generation.wrapping_add(1).max(1) in both views.list and VIEW_GENS under VIEWS before pushing to views.free; free-slot reuse keeps the bumped generation so VIEW_GENS remains in sync without a write. Minor non-blocking note: forget() takes VIEW_GENS.write() inside the for i in entries loop (could hoist one write guard per forget(), though safe as-is).
  • Poison/panic safety: All VIEWS, VIEW_GENS, and self.made locks recover via .unwrap_or_else(|e| e.into_inner()); views.list and VIEW_GENS grow in lockstep and never shrink.
  • Open PR overlap: Overlaps with open descriptor/host.rs PRs #2971, #3139, #3512, and #3522 (rebase coordination needed depending on merge order).

Verified by Gemini 4 Neon (Antigravity) on software WARP.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7235932613 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3679#issuecomment-7235932613). Originally posted by [oni-swr](https://github.com/oni-swr) on 2026-11-28T07:25:41Z. --- ### Independent Software WARP Verification - **Base (`main`)**: `63bcca43c6a00a758510398fa43096ce7e4f7df0` - **PR `#3679` head**: `1f39a2fc151fc8254ec439738c1914777ae38292` (clean fast-forward merge; merge tree `7518c7caed2763c1d69f68bcb87382eccb4375d0`; also merges cleanly with `#3688` into tree `6526713a581880b3eeb40fb931a3d69cd1658847`) - **Environment**: Windows software WARP only (`VICTORY_WARP=1`, `VICTORY_D3D12_WARP=1`, `--features diagnostics` so `victory-gpu` selects `warp_adapter()`); DXGI reports `Microsoft Basic Render Driver (VendorId=0x1414, DeviceId=0x008C, Flags=0x2)` - **DLLs**: `d3d10warp.dll` `10.0.26100.9818`, `dxil.dll` `1.8.2502.11` #### Results (base vs merged) - **Base `63bcca43`**: - `cargo test --locked -p victory-gpu --features diagnostics -j 4`: **246 passed, 0 failed, 1 ignored** (doc-tests: 0) - `view_gens_matches_views_across_record_forget_and_reuse`: **absent** (`0 tests`) - **Merged `#3679` (`1f39a2fc`)**: - `cargo test --locked -p victory-gpu --features diagnostics -j 4`: **247 passed, 0 failed, 1 ignored** (doc-tests: 0) - `descriptor::tests::view_gens_matches_views_across_record_forget_and_reuse`: **passed** - `cargo clippy --locked -p victory-gpu --all-targets -- -D warnings`: **passed** - `cargo clippy --locked -p victory-gpu --all-targets --features diagnostics -- -D warnings`: **passed** - `cargo xtask policy`: **passed** (`191 files ok`) #### Diff Review - **Lock ordering**: Strictly preserves `self.made -> VIEWS -> VIEW_GENS` (`record()`/`forget()` acquire `VIEWS -> VIEW_GENS`; `mirror()` acquires `self.made -> VIEWS`; `sync_slots()` acquires `self.made -> VIEW_GENS`). No cycle. - **Lockstep & free-slot reuse**: `record()` pushes `1` to `VIEW_GENS` only on `views.list` growth; `forget()` bumps `generation.wrapping_add(1).max(1)` in both `views.list` and `VIEW_GENS` under `VIEWS` before pushing to `views.free`; free-slot reuse keeps the bumped generation so `VIEW_GENS` remains in sync without a write. Minor non-blocking note: `forget()` takes `VIEW_GENS.write()` inside the `for i in entries` loop (could hoist one write guard per `forget()`, though safe as-is). - **Poison/panic safety**: All `VIEWS`, `VIEW_GENS`, and `self.made` locks recover via `.unwrap_or_else(|e| e.into_inner())`; `views.list` and `VIEW_GENS` grow in lockstep and never shrink. - **Open PR overlap**: Overlaps with open `descriptor/host.rs` PRs `#2971`, `#3139`, `#3512`, and `#3522` (rebase coordination needed depending on merge order). *Verified by Gemini 4 Neon (Antigravity) on software WARP.*
reallyvibe commented 2026-11-29 00:22:18 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by reallyvibe on 2026-11-29T00:22:18Z.


Benchmark: this PR's sync is about twice as fast as main on unchanged pages; #3139 and #3055 measured on the same machine

The PR has no timings yet, so I ran KainanP's sync_slots_bench (f233390e, cherry-picked unchanged) against main 63bcca43, this head 1f39a2fc, and the two open PRs that rewrite the same function: #3139 63d630a0 and #3055 566a27aa. All four ran interleaved. Each frame writes 393,216 slots in 192 pages, then one sync_heaps. Release builds; each cell is the median over 8 processes, in ms:

changed records title threads main this PR #3139 #3055
0 0 3.27 1.71 (×0.52) 6.05 (×1.85) 2.48 (×0.76)
0 5 3.51, wait 17.1 1.89 (×0.54), wait 9.7 6.76 (×1.93), wait 33.5 2.83 (×0.80), wait 14.2
~9,500 0 18.99 17.01 (×0.90) 21.24 (×1.12) 16.02 (×0.84)
~9,500 5 23.74, wait 111 20.27 (×0.85), wait 95 26.12 (×1.10), wait 129 17.46 (×0.74), wait 86

"Wait" is the title threads' time in view writes, in ms per frame. Every run had 0 lost and 0 stale slots. The #3139 and #3055 ratios match KainanP's on those PRs, which serves as a check on the setup. With SYNC_SLOTS_DIRECT=1 (sync_slots per page, without the write-watch walk), main → this PR is 2.91 → 1.25 ms, and with 5 title threads 6.29 → 1.37 ms (wait 25.2 → 6.4). These results are consistent with less contention on VIEWS, fewer allocations and the fused scan, but they don't isolate what each contributes. With ~9,500 changed records the gain over main is smaller and #3055 is fastest, consistent with view creation taking more of the time there (not isolated either).

Merge checks, to add to oni-swr's report. This head merges cleanly with #3068, #3522, #3512, #2971, #3233 and #3456. Each of those merged trees builds the non-test lib and the test binary, and WARP descriptor:: passes on all of them. It conflicts textually with #3139, #3055, #3234, #3409, #3275 and #3745. In #3409's case the resolution needs care: #3409 adds its own generation writer in forget (((generation + 1) & GENERATIONS).max(1)), and that writer has to update VIEW_GENS too.

Not tested: the title unmapping a heap page during a sync. This head reads the records while holding self.made and the VIEW_GENS read lock. I'm not claiming a defect.

Windows 11, Ryzen 7 7445HS, RTX 4050 Laptop and Radeon 740M (default D3D12 adapter, not logged), a loaded 16 GB machine, synthetic data only.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7248065738 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3679#issuecomment-7248065738). Originally posted by [reallyvibe](https://github.com/reallyvibe) on 2026-11-29T00:22:18Z. --- **Benchmark: this PR's sync is about twice as fast as main on unchanged pages; #3139 and #3055 measured on the same machine** The PR has no timings yet, so I ran KainanP's `sync_slots_bench` (`f233390e`, cherry-picked unchanged) against main `63bcca43`, this head `1f39a2fc`, and the two open PRs that rewrite the same function: #3139 `63d630a0` and #3055 `566a27aa`. All four ran interleaved. Each frame writes 393,216 slots in 192 pages, then one `sync_heaps`. Release builds; each cell is the median over 8 processes, in ms: | changed records | title threads | main | this PR | #3139 | #3055 | |---|---|---|---|---|---| | 0 | 0 | 3.27 | **1.71** (×0.52) | 6.05 (×1.85) | 2.48 (×0.76) | | 0 | 5 | 3.51, wait 17.1 | **1.89** (×0.54), wait 9.7 | 6.76 (×1.93), wait 33.5 | 2.83 (×0.80), wait 14.2 | | ~9,500 | 0 | 18.99 | 17.01 (×0.90) | 21.24 (×1.12) | **16.02** (×0.84) | | ~9,500 | 5 | 23.74, wait 111 | 20.27 (×0.85), wait 95 | 26.12 (×1.10), wait 129 | **17.46** (×0.74), wait 86 | "Wait" is the title threads' time in view writes, in ms per frame. Every run had 0 lost and 0 stale slots. The #3139 and #3055 ratios match KainanP's on those PRs, which serves as a check on the setup. With `SYNC_SLOTS_DIRECT=1` (`sync_slots` per page, without the write-watch walk), main → this PR is 2.91 → 1.25 ms, and with 5 title threads 6.29 → 1.37 ms (wait 25.2 → 6.4). These results are consistent with less contention on `VIEWS`, fewer allocations and the fused scan, but they don't isolate what each contributes. With ~9,500 changed records the gain over main is smaller and #3055 is fastest, consistent with view creation taking more of the time there (not isolated either). Merge checks, to add to oni-swr's report. This head merges cleanly with #3068, #3522, #3512, #2971, #3233 and #3456. Each of those merged trees builds the non-test lib and the test binary, and WARP `descriptor::` passes on all of them. It conflicts textually with #3139, #3055, #3234, #3409, #3275 and #3745. In #3409's case the resolution needs care: #3409 adds its own generation writer in `forget` (`((generation + 1) & GENERATIONS).max(1)`), and that writer has to update `VIEW_GENS` too. Not tested: the title unmapping a heap page during a sync. This head reads the records while holding `self.made` and the `VIEW_GENS` read lock. I'm not claiming a defect. Windows 11, Ryzen 7 7445HS, RTX 4050 Laptop and Radeon 740M (default D3D12 adapter, not logged), a loaded 16 GB machine, synthetic data only. AI-assisted (Claude Code).
reallyvibe commented 2026-11-29 01:10:44 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by reallyvibe on 2026-11-29T01:10:44Z.


Follow-up on merging this with #3409: host.rs merges cleanly into a check that never passes #3409's whole-held records

@pes7, this is for #3409's tested set, in case this PR goes into it.

My earlier comment flagged only #3409's generation writer in forget. I built the merge (#3409 965d9382 + this head 1f39a2fc, base 63bcca43) and tested it on WARP.

Confirmed defect: host slots not made. descriptor/host.rs merges without a conflict and takes this PR's current = tag == VIEW_TAG && gens.get(view) == Some(&generation). #3409 holds constant buffer views and placed views whole in the record, with kind bits 30/31 set in generation. VIEW_GENS values stay below 2^30, so those records never count as current.

  • A constant or placed record copied as bytes into a slot whose host state is 0 (never made, or cleared) is not made by heap syncs. Two of #3409's own tests fail on the merged tree: heap_syncs_make_the_slots_whose_records_changed and heap_syncs_make_the_slots_whose_records_hold_their_views_whole.
  • Each made constant or placed slot goes through mirror again at every sync. mirror returns early, so no view is re-made, but the calls cost time. One release sync of 65,536 unchanged, made slots took 0.084 → 2.06 ms for constant views and 0.125 → 2.85 ms for placed views. That is one thread, uncontended, WARP, the median of 5 interleaved processes.
  • I observed no stale previously initialized views in the tested cases: a slot made from another view still gets mirrored.

Not tested: rendering consequences. Draw-time mirrors (draw.rs table entries, make_read) may later make a slot the sync skipped, and I haven't checked whether a shader ever reads one before that. I can't say whether this shows up as wrong data in the title.

Two other things the resolution needs:

  1. The VIEW_GENS push has to move into #3409's Views::entry(). If it goes with record()'s old body, VIEW_GENS stays empty and forget panics with "index out of bounds: the len is 0".
  2. The bump in forget must keep #3409's & GENERATIONS mask. With wrapping_add the generation reaches 2^30, which is the kind bits.

Smallest resolution I found (production code +56/-30 on #3409, this PR's own change included):

// Views::entry(), beside the new entry
self.list.push((view.clone(), 1));
VIEW_GENS.write().unwrap_or_else(|e| e.into_inner()).push(1);

// Views::shape(), after pushing a shape
SHAPE_COUNT.store(self.shapes.len(), std::sync::atomic::Ordering::Release);

// forget()
let next = ((generation + 1) & GENERATIONS).max(1);
views.list[i as usize].1 = next;
VIEW_GENS.write().unwrap_or_else(|e| e.into_inner())[i as usize] = next;

/// `Views::shapes.len()` (written under the `VIEWS` lock; shapes only grow).
static SHAPE_COUNT: std::sync::atomic::AtomicUsize = std::sync::atomic::AtomicUsize::new(0);

#[cfg(any(windows, test))]
fn record_current(gens: &[u32], [tag, i, generation]: [u32; 3]) -> bool {
    tag == VIEW_TAG
        && match generation >> KIND_SHIFT {
            0 => gens.get(i as usize) == Some(&generation),
            CONSTANT => true,
            PLACED => {
                ((payload(i, generation) >> PLACED_ADDRESS_BITS) as usize)
                    < SHAPE_COUNT.load(std::sync::atomic::Ordering::Acquire)
            }
            _ => false,
        }
}

#[cfg(test)]
fn views_current(records: &[[u32; 3]]) -> Vec<bool> {
    let gens = view_gens();
    records.iter().map(|&record| record_current(&gens, record)).collect()
}

// host.rs sync_slots, in place of the generation-only line
let current = record_current(&gens, [tag, view, generation]);

record keeps #3409's words_for. With views_current as a test wrapper, #3409's views_held_whole_are_current_for_heap_syncs tests the check the sync uses.

On that tree, cargo build -p victory-gpu --lib and cargo clippy -p victory-gpu --all-targets -- -D warnings (default and --all-features) are clean. WARP descriptor:: passes 36/36, also with each test in its own process. That count includes both PRs' tests and two synthetic study tests. The study tests cover table entries, whole constant and placed records, unknown placed shapes, kind 3, foreign tags, unchanged records, byte copies into never-made and made slots, release, entry reuse and generation wrap. The same timing run gives 0 mirrors for all three kinds. For table entries it takes 0.125 ms against 0.090 ms with the merged line; I haven't isolated that difference.

Mutation evidence. I changed the resolved tree one thing at a time and ran each test in its own process. Every change fails at least one test:

change fails
host.rs as auto-merged #3409's heap_syncs_make_the_slots_whose_records_changed and ..._hold_their_views_whole, study test (3 of 3 whole-held made slots re-mirrored per unchanged sync)
no VIEW_GENS push in entry() 7 tests (panic in forget)
no VIEW_GENS write in forget this PR's view_gens_matches_views_across_record_forget_and_reuse, #3409's views_held_whole_are_current_for_heap_syncs, study test (released slots not re-mirrored: 0, want 2)
unmasked bump #3409's released_entries_keep_their_generations_below_the_kind_bits, study test
constant records not current views_held_whole_are_current_for_heap_syncs, both #3409 heap-sync tests, study test
placed records current without a known shape views_held_whole_are_current_for_heap_syncs, study test
kind 3 current views_held_whole_are_current_for_heap_syncs, study test

The full patch, the two study tests and the logs are available on request.

Windows 11, Ryzen 7 7445HS, WARP, synthetic data only.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7248612792 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3679#issuecomment-7248612792). Originally posted by [reallyvibe](https://github.com/reallyvibe) on 2026-11-29T01:10:44Z. --- **Follow-up on merging this with #3409: `host.rs` merges cleanly into a check that never passes #3409's whole-held records** @pes7, this is for #3409's tested set, in case this PR goes into it. My earlier comment flagged only #3409's generation writer in `forget`. I built the merge (#3409 `965d9382` + this head `1f39a2fc`, base `63bcca43`) and tested it on WARP. **Confirmed defect: host slots not made.** `descriptor/host.rs` merges without a conflict and takes this PR's `current = tag == VIEW_TAG && gens.get(view) == Some(&generation)`. #3409 holds constant buffer views and placed views whole in the record, with kind bits 30/31 set in `generation`. `VIEW_GENS` values stay below 2^30, so those records never count as current. - A constant or placed record copied as bytes into a slot whose host state is 0 (never made, or cleared) is not made by heap syncs. Two of #3409's own tests fail on the merged tree: `heap_syncs_make_the_slots_whose_records_changed` and `heap_syncs_make_the_slots_whose_records_hold_their_views_whole`. - Each made constant or placed slot goes through `mirror` again at every sync. `mirror` returns early, so no view is re-made, but the calls cost time. One release sync of 65,536 unchanged, made slots took 0.084 → 2.06 ms for constant views and 0.125 → 2.85 ms for placed views. That is one thread, uncontended, WARP, the median of 5 interleaved processes. - I observed no stale previously initialized views in the tested cases: a slot made from another view still gets mirrored. **Not tested: rendering consequences.** Draw-time mirrors (`draw.rs` table entries, `make_read`) may later make a slot the sync skipped, and I haven't checked whether a shader ever reads one before that. I can't say whether this shows up as wrong data in the title. **Two other things the resolution needs:** 1. The `VIEW_GENS` push has to move into #3409's `Views::entry()`. If it goes with `record()`'s old body, `VIEW_GENS` stays empty and `forget` panics with "index out of bounds: the len is 0". 2. The bump in `forget` must keep #3409's `& GENERATIONS` mask. With `wrapping_add` the generation reaches 2^30, which is the kind bits. **Smallest resolution I found** (production code +56/-30 on #3409, this PR's own change included): ```rust // Views::entry(), beside the new entry self.list.push((view.clone(), 1)); VIEW_GENS.write().unwrap_or_else(|e| e.into_inner()).push(1); // Views::shape(), after pushing a shape SHAPE_COUNT.store(self.shapes.len(), std::sync::atomic::Ordering::Release); // forget() let next = ((generation + 1) & GENERATIONS).max(1); views.list[i as usize].1 = next; VIEW_GENS.write().unwrap_or_else(|e| e.into_inner())[i as usize] = next; /// `Views::shapes.len()` (written under the `VIEWS` lock; shapes only grow). static SHAPE_COUNT: std::sync::atomic::AtomicUsize = std::sync::atomic::AtomicUsize::new(0); #[cfg(any(windows, test))] fn record_current(gens: &[u32], [tag, i, generation]: [u32; 3]) -> bool { tag == VIEW_TAG && match generation >> KIND_SHIFT { 0 => gens.get(i as usize) == Some(&generation), CONSTANT => true, PLACED => { ((payload(i, generation) >> PLACED_ADDRESS_BITS) as usize) < SHAPE_COUNT.load(std::sync::atomic::Ordering::Acquire) } _ => false, } } #[cfg(test)] fn views_current(records: &[[u32; 3]]) -> Vec<bool> { let gens = view_gens(); records.iter().map(|&record| record_current(&gens, record)).collect() } // host.rs sync_slots, in place of the generation-only line let current = record_current(&gens, [tag, view, generation]); ``` `record` keeps #3409's `words_for`. With `views_current` as a test wrapper, #3409's `views_held_whole_are_current_for_heap_syncs` tests the check the sync uses. On that tree, `cargo build -p victory-gpu --lib` and `cargo clippy -p victory-gpu --all-targets -- -D warnings` (default and `--all-features`) are clean. WARP `descriptor::` passes 36/36, also with each test in its own process. That count includes both PRs' tests and two synthetic study tests. The study tests cover table entries, whole constant and placed records, unknown placed shapes, kind 3, foreign tags, unchanged records, byte copies into never-made and made slots, release, entry reuse and generation wrap. The same timing run gives 0 mirrors for all three kinds. For table entries it takes 0.125 ms against 0.090 ms with the merged line; I haven't isolated that difference. **Mutation evidence.** I changed the resolved tree one thing at a time and ran each test in its own process. Every change fails at least one test: | change | fails | |---|---| | `host.rs` as auto-merged | #3409's `heap_syncs_make_the_slots_whose_records_changed` and `..._hold_their_views_whole`, study test (3 of 3 whole-held made slots re-mirrored per unchanged sync) | | no `VIEW_GENS` push in `entry()` | 7 tests (panic in `forget`) | | no `VIEW_GENS` write in `forget` | this PR's `view_gens_matches_views_across_record_forget_and_reuse`, #3409's `views_held_whole_are_current_for_heap_syncs`, study test (released slots not re-mirrored: 0, want 2) | | unmasked bump | #3409's `released_entries_keep_their_generations_below_the_kind_bits`, study test | | constant records not current | `views_held_whole_are_current_for_heap_syncs`, both #3409 heap-sync tests, study test | | placed records current without a known shape | `views_held_whole_are_current_for_heap_syncs`, study test | | kind 3 current | `views_held_whole_are_current_for_heap_syncs`, study test | The full patch, the two study tests and the logs are available on request. Windows 11, Ryzen 7 7445HS, WARP, synthetic data only. AI-assisted (Claude Code).
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3679:upstream-pr/3679'
git switch 'upstream-pr/3679'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3679'
git switch 'upstream-pr/3679'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3679'
git switch 'upstream-pr/3679'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3679'
git switch 'main'
git merge --squash 'upstream-pr/3679'
git switch 'main'
git merge --ff-only 'upstream-pr/3679'
git switch 'main'
git merge 'upstream-pr/3679'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!3679
No description provided.