UMA: used and sparse_used are running totals, alloc_in searches its window only #517

Open
TG0000 wants to merge 1 commit from upstream-pr/522 into main
TG0000 commented 2026-11-24 01:15:57 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by TG0000 on 2026-11-24T01:15:57Z.


Uma::used() added up every live block on each call, and Uma::sparse_used() added up every sparse reservation. used() is asked before every coherent graphics VirtualAlloc (kernelx.rs:315), every committed placed resource (real.rs:1235) and every readback heap (real.rs:1263). So N title allocations cost O(N²) under the UMA lock. Both are now running totals, kept up to date where blocks and reservations are taken and returned.

alloc_in(k) also filtered the whole free map for window k. A free range never crosses a window boundary (each window is shorter than WINDOW), so it now walks only the keys in k's 4 GiB range. First-fit order and results are unchanged.

This doesn't change take_sparse_in's search; #483 bounds that one. The two PRs merge cleanly in either order (checked with git merge-tree).

What is in it

  • crates/xcl/src/gpu/uma.rs only:
    • Inner::used_bytes is updated in reserve_pool, alloc_where and free. used() and the XCL_TRACE_MEM trace read it.
    • Uma::sparse_bytes is updated through a new take_sparse wrapper (used by sparse_reserve, sparse_alloc_in and sparse_alloc) and in sparse_release. sparse_used() reads it.
    • alloc_where searches free.range(k·WINDOW..(k+1)·WINDOW) when it is given a window.
    • New test used_totals_follow_allocations_and_frees: the totals match the blocks and reservations through allocations, frees, coalescing, failed requests and unknown addresses.

Tested

  • RX 6800 (Adrenalin driver 32.0.21045.29003), Ryzen 9 5900X, Windows 11, rustc 1.100.0 stable-x86_64-pc-windows-msvc, release build.
  • cargo test -p xcl --lib: 634 passed, 3 failed, 21 ignored. The 3 failures are in title_textures::tests / vram::tests, and the same tests fail on origin/main (4 failures there on this machine). cargo test -p xcl --lib uma: 10 passed.
  • Throwaway microbenchmark (not committed), release build on the 5900X, for_runtime(1 GiB):
    • 4000 committed reserves, each preceded by a size() - used() check, plus 100k used() + sparse_used() reads: 592 ms → 0.97 ms (~600×).
    • 4000 sparse_alloc_in(0, 64 KiB) + sparse_used(): 12.2 ms → 0.43 ms (~28×).

Regression run

main:

xcl-smoke v1
commit: 7ebf1b8044bef8f0ef296eb36e85010cceb4633a
gpu: AMD Radeon RX 6800
title: retail-title-1.0.2.1
seconds: 45
exit: 0x0
frames shown: 786 (PresentX 786)
presents per 2 s (last 3): 60 60 32
device removals: 0
crashes: 0
peak commit: 15147 MB

PR:

xcl-smoke v1
commit: 638c03951413279f24af06fbe3532f9732d67096
gpu: AMD Radeon RX 6800
title: retail-title-1.0.2.1
seconds: 45
exit: 0x0
frames shown: 824 (PresentX 824)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15146 MB

Not tested

  • cargo test --workspace (only the xcl lib tests were run), other GPUs, MinGW builds.

AI use

  • Claude Code (Claude Opus 5.5) found the hot spot, wrote the change and the test, ran the benchmarks, tests and regression runs; reviewed by the submitter.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5464211863 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/522). Originally posted by [TG0000](https://github.com/TG0000) on 2026-11-24T01:15:57Z. --- `Uma::used()` added up every live block on each call, and `Uma::sparse_used()` added up every sparse reservation. `used()` is asked before every coherent graphics `VirtualAlloc` (`kernelx.rs:315`), every committed placed resource (`real.rs:1235`) and every readback heap (`real.rs:1263`). So N title allocations cost O(N²) under the UMA lock. Both are now running totals, kept up to date where blocks and reservations are taken and returned. `alloc_in(k)` also filtered the whole free map for window k. A free range never crosses a window boundary (each window is shorter than `WINDOW`), so it now walks only the keys in k's 4 GiB range. First-fit order and results are unchanged. This doesn't change `take_sparse_in`'s search; #483 bounds that one. The two PRs merge cleanly in either order (checked with `git merge-tree`). **What is in it** - `crates/xcl/src/gpu/uma.rs` only: - `Inner::used_bytes` is updated in `reserve_pool`, `alloc_where` and `free`. `used()` and the `XCL_TRACE_MEM` trace read it. - `Uma::sparse_bytes` is updated through a new `take_sparse` wrapper (used by `sparse_reserve`, `sparse_alloc_in` and `sparse_alloc`) and in `sparse_release`. `sparse_used()` reads it. - `alloc_where` searches `free.range(k·WINDOW..(k+1)·WINDOW)` when it is given a window. - New test `used_totals_follow_allocations_and_frees`: the totals match the blocks and reservations through allocations, frees, coalescing, failed requests and unknown addresses. **Tested** - RX 6800 (Adrenalin driver 32.0.21045.29003), Ryzen 9 5900X, Windows 11, rustc 1.100.0 stable-x86_64-pc-windows-msvc, release build. - `cargo test -p xcl --lib`: 634 passed, 3 failed, 21 ignored. The 3 failures are in `title_textures::tests` / `vram::tests`, and the same tests fail on `origin/main` (4 failures there on this machine). `cargo test -p xcl --lib uma`: 10 passed. - Throwaway microbenchmark (not committed), release build on the 5900X, `for_runtime(1 GiB)`: - 4000 committed `reserve`s, each preceded by a `size() - used()` check, plus 100k `used() + sparse_used()` reads: **592 ms → 0.97 ms** (~600×). - 4000 `sparse_alloc_in(0, 64 KiB)` + `sparse_used()`: **12.2 ms → 0.43 ms** (~28×). **Regression run** main: ``` xcl-smoke v1 commit: 7ebf1b8044bef8f0ef296eb36e85010cceb4633a gpu: AMD Radeon RX 6800 title: retail-title-1.0.2.1 seconds: 45 exit: 0x0 frames shown: 786 (PresentX 786) presents per 2 s (last 3): 60 60 32 device removals: 0 crashes: 0 peak commit: 15147 MB ``` PR: ``` xcl-smoke v1 commit: 638c03951413279f24af06fbe3532f9732d67096 gpu: AMD Radeon RX 6800 title: retail-title-1.0.2.1 seconds: 45 exit: 0x0 frames shown: 824 (PresentX 824) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15146 MB ``` **Not tested** - `cargo test --workspace` (only the `xcl` lib tests were run), other GPUs, MinGW builds. **AI use** - Claude Code (Claude Opus 5.5) found the hot spot, wrote the change and the test, ran the benchmarks, tests and regression runs; reviewed by the submitter. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
thehollowedone commented 2026-11-24 07:05:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-24T01:23:35Z.


Tested

I built and tested the full synthetic workspace on the RTX 3080 Ti (driver 621.35), Ryzen 7 9800X3D, Windows 11 build 26300, Rust 1.99.1 MSVC, debug. For both revisions I ran cargo build --offline --locked --workspace followed by cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4, with all XCL_SAMPLE_* variables unset.

Revision Cargo passed Failed Ignored GPU skips included in passes
Exact parent 7ebf1b8 677 0 41 2
PR head 638c039 678 0 41 2

The PR adds one UMA accounting test, and the texture and VRAM failures reported on the RX 6800 did not occur in either run here. Both revisions reported the same wave64 skips (gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware).

Not tested

Retail titles, release performance, or the PR integrated with newer main commits.

AI use

Codex with GPT-6.2 Sol ran the tests and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7119055015 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/522#issuecomment-7119055015). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-24T01:23:35Z. --- **Tested** I built and tested the full synthetic workspace on the RTX 3080 Ti (driver 621.35), Ryzen 7 9800X3D, Windows 11 build 26300, Rust 1.99.1 MSVC, debug. For both revisions I ran `cargo build --offline --locked --workspace` followed by `cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4`, with all `XCL_SAMPLE_*` variables unset. | Revision | Cargo passed | Failed | Ignored | GPU skips included in passes | | --- | ---: | ---: | ---: | ---: | | [Exact parent 7ebf1b8](https://github.com/ivall/xcl/commit/7ebf1b8044bef8f0ef296eb36e85010cceb4633a) | 677 | 0 | 41 | 2 | | [PR head 638c039](https://github.com/ivall/xcl/commit/638c03951413279f24af06fbe3532f9732d67096) | 678 | 0 | 41 | 2 | The PR adds one UMA accounting test, and the texture and VRAM failures reported on the RX 6800 did not occur in either run here. Both revisions reported the same wave64 skips (`gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware`). **Not tested** Retail titles, release performance, or the PR integrated with newer main commits. **AI use** Codex with GPT-6.2 Sol ran the tests and drafted this report.
MesshM commented 2026-11-24 07:05:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by MesshM on 2026-11-24T03:04:10Z.


Test run of 638c03951413279f24af06fbe3532f9732d67096 on AMD RDNA4. I merged it onto current main dd2ae9a locally (clean merge) and tested that tree.

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • cargo build --workspace + cargo test --workspace -- --test-threads=4 on the merge: 691 passed, 0 failed, 41 ignored, exit code 0; xcl lib tests 651 passed, 0 failed, 21 ignored
  • 0 SKIPPED; used_totals_follow_allocations_and_frees passes.

Review: I checked that the running totals cannot drift: in uma.rs at the PR head, both used.inserts add to used_bytes and the one used.remove subtracts the removed size; every reservation goes through take_sparse, which adds the same size take_sparse_in inserts, and sparse_release subtracts the size it removes from the map. alloc_in's range(k·WINDOW..(k+1)·WINDOW) relies on free ranges not crossing a window, which holds since each window is shorter than WINDOW. I found nothing to change.

Not tested: no retail title or regression run (I have no unpacked game), no XCL_SAMPLE_* tests, release build; the PR's head on its old base was not run, only its merge onto main.

Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.

<!-- greyfinch-sync:ivall/xcl:comment:7120741715 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/522#issuecomment-7120741715). Originally posted by [MesshM](https://github.com/MesshM) on 2026-11-24T03:04:10Z. --- Test run of `638c03951413279f24af06fbe3532f9732d67096` on AMD RDNA4. I merged it onto current `main` `dd2ae9a` locally (clean merge) and tested that tree. **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug - `cargo build --workspace` + `cargo test --workspace -- --test-threads=4` on the merge: **691 passed, 0 failed, 41 ignored**, exit code 0; `xcl` lib tests 651 passed, 0 failed, 21 ignored - **0 `SKIPPED`**; `used_totals_follow_allocations_and_frees` passes. **Review:** I checked that the running totals cannot drift: in `uma.rs` at the PR head, both `used.insert`s add to `used_bytes` and the one `used.remove` subtracts the removed size; every reservation goes through `take_sparse`, which adds the same `size` `take_sparse_in` inserts, and `sparse_release` subtracts the size it removes from the map. `alloc_in`'s `range(k·WINDOW..(k+1)·WINDOW)` relies on free ranges not crossing a window, which holds since each window is shorter than `WINDOW`. I found nothing to change. **Not tested:** no retail title or regression run (I have no unpacked game), no `XCL_SAMPLE_*` tests, release build; the PR's head on its old base was not run, only its merge onto `main`. Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
thaqiart139-alt commented 2026-11-24 23:08:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thaqiart139-alt on 2026-11-24T22:48:53Z.


Test report for this PR's head 638c039, merged into main 689f2db (no conflicts), on AMD RDNA2 with native 64-lane waves and on a 32-lane NVIDIA card.

Tested

  • GPUs: AMD Radeon(TM) Graphics, the RDNA2 iGPU of a Ryzen 7 7800X3D (native wave64, driver 32.0.21045.29003), and NVIDIA GeForce RTX 5070 (driver 32.0.16.2101), chosen with XCL_ADAPTER.
  • System: 32 GB, Windows 11 Home build 26300, Rust 1.100.0, debug, DXC 1.9.2602.17.
  • cargo test --workspace --no-fail-fast -- --test-threads=4:
main 689f2db with this PR
RTX 5070 971 passed, 4 failed, 45 ignored 972 passed, 4 failed, 45 ignored
Radeon iGPU 974 passed, 1 failed, 45 ignored 975 passed, 1 failed, 45 ignored
  • This PR adds no failure. The failures are the same on main, from #1679's new fuzz tests, and both are already reported on #1679:
    • RTX 5070: fuzz_validate_and_gpu_0 to _3 (CreateComputePipelineState: 0x8007000E)
    • iGPU: fuzz_validate_and_gpu_1 (seed 540: res[833] = 0x7, CPU 0x6)
  • This PR's new tests pass on both GPUs: used_totals_follow_allocations_and_frees.
  • This is the whole workspace, which the description lists as not tested (only the xcl lib tests were run there).
SKIPPED tests (the same on main and with this PR)
  • RTX 5070:
    • no wave64:
      • gpu::recomp::lower::tests: a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu, coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu, cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu, the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu
      • gpu::recomp::lower_dxil::tests::a_per_lane_2d_or_3d_group_runs_on_the_gpu, and the wave64 cases of its f16 / f32 / f64 / integer_programs_on_the_gpu
      • gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware
    • the wave32 per-lane cases of lower_dxil's f16 arithmetic, f16 packed and f32 conversions: refused ("its #1426 semantics differ from the console's")
    • heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows)
    • pso_measurement_compiles_an_exact_synthetic_record (Windows Developer Mode is off)
  • Radeon iGPU:
    • no mesh shaders: gpu::dxil::geometry_tests::gpu_geometry_direct_records, emitted_ms_primitive_attribute_reaches_the_pixel_shader, emitted_ms_ps_draw_a_triangle, gpu_geometry_mode_es_gs_strip, gpu_geometry_mode_es_gs_strip_with_branches, gpu_mesh_mode_two_passes
    • the wave32 and wave64 per-lane cases of lower_dxil's f16 arithmetic, f16 packed and f32 conversions: refused, as above
    • heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows)
    • pso_measurement_compiles_an_exact_synthetic_record (Developer Mode is off)

Not tested

  • a title run, MinGW builds; other GPUs; Linux / Wine.

AI use

  • Claude Code (Claude Opus 5.5) ran the builds and tests and wrote this report.
<!-- greyfinch-sync:ivall/xcl:comment:7146675434 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/522#issuecomment-7146675434). Originally posted by [thaqiart139-alt](https://github.com/thaqiart139-alt) on 2026-11-24T22:48:53Z. --- Test report for this PR's head `638c039`, merged into `main` `689f2db` (no conflicts), on AMD RDNA2 with native 64-lane waves and on a 32-lane NVIDIA card. **Tested** - GPUs: AMD Radeon(TM) Graphics, the RDNA2 iGPU of a Ryzen 7 7800X3D (native wave64, driver 32.0.21045.29003), and NVIDIA GeForce RTX 5070 (driver 32.0.16.2101), chosen with `XCL_ADAPTER`. - System: 32 GB, Windows 11 Home build 26300, Rust 1.100.0, debug, DXC 1.9.2602.17. - `cargo test --workspace --no-fail-fast -- --test-threads=4`: | | `main` `689f2db` | with this PR | |---|---|---| | RTX 5070 | 971 passed, 4 failed, 45 ignored | 972 passed, 4 failed, 45 ignored | | Radeon iGPU | 974 passed, 1 failed, 45 ignored | 975 passed, 1 failed, 45 ignored | - This PR adds no failure. The failures are the same on `main`, from #1679's new fuzz tests, and both are already reported on #1679: - RTX 5070: `fuzz_validate_and_gpu_0` to `_3` (`CreateComputePipelineState`: `0x8007000E`) - iGPU: `fuzz_validate_and_gpu_1` (`seed 540: res[833] = 0x7, CPU 0x6`) - This PR's new tests pass on both GPUs: `used_totals_follow_allocations_and_frees`. - This is the whole workspace, which the description lists as not tested (only the `xcl` lib tests were run there). <details><summary>SKIPPED tests (the same on <code>main</code> and with this PR)</summary> - **RTX 5070:** - no wave64: - `gpu::recomp::lower::tests`: `a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu`, `coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu`, `cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu`, `the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu` - `gpu::recomp::lower_dxil::tests::a_per_lane_2d_or_3d_group_runs_on_the_gpu`, and the wave64 cases of its `f16` / `f32` / `f64` / `integer_programs_on_the_gpu` - `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` - the wave32 per-lane cases of `lower_dxil`'s f16 arithmetic, f16 packed and f32 conversions: refused ("its #1426 semantics differ from the console's") - `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows) - `pso_measurement_compiles_an_exact_synthetic_record` (Windows Developer Mode is off) - **Radeon iGPU:** - no mesh shaders: `gpu::dxil::geometry_tests::gpu_geometry_direct_records`, `emitted_ms_primitive_attribute_reaches_the_pixel_shader`, `emitted_ms_ps_draw_a_triangle`, `gpu_geometry_mode_es_gs_strip`, `gpu_geometry_mode_es_gs_strip_with_branches`, `gpu_mesh_mode_two_passes` - the wave32 and wave64 per-lane cases of `lower_dxil`'s f16 arithmetic, f16 packed and f32 conversions: refused, as above - `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows) - `pso_measurement_compiles_an_exact_synthetic_record` (Developer Mode is off) </details> **Not tested** - a title run, MinGW builds; other GPUs; Linux / Wine. **AI use** - Claude Code (Claude Opus 5.5) ran the builds and tests and wrote this report.
TG0000 commented 2026-11-25 13:05:07 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by TG0000 on 2026-11-25T12:28:42Z.


Rebased onto main 1a0bbe3: head af0f5b8. The conflict was in the tests only. I also checked main's new window layouts: every place that takes or returns a block or a sparse range goes through the running totals.

Run on this head (Ryzen 9 5900X, Windows 11, MSVC): cargo test -p xcl --lib uma: 16 passed, 0 failed. Clippy stops on three TAU constants in files this PR does not touch, with this toolchain.

Not run on this head: the whole suite, the microbenchmark and the xcl-smoke pair. The blocks in the description are of 638c039, so the description check is expected to ask for a fresh one until it is run.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ivall/xcl:comment:7162426635 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/522#issuecomment-7162426635). Originally posted by [TG0000](https://github.com/TG0000) on 2026-11-25T12:28:42Z. --- Rebased onto main 1a0bbe3: head `af0f5b8`. The conflict was in the tests only. I also checked main's new window layouts: every place that takes or returns a block or a sparse range goes through the running totals. Run on this head (Ryzen 9 5900X, Windows 11, MSVC): `cargo test -p xcl --lib uma`: 16 passed, 0 failed. Clippy stops on three `TAU` constants in files this PR does not touch, with this toolchain. **Not run on this head:** the whole suite, the microbenchmark and the `xcl-smoke` pair. The blocks in the description are of `638c039`, so the description check is expected to ask for a fresh one until it is run. AI-assisted (Claude Code).
DavidM1911 commented 2026-11-25 14:10:10 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T13:53:44Z.


Verification on RTX 3060 Ti (Windows 11): merge conflict with current main — needs a rebase before it can be tested.

<!-- greyfinch-sync:ivall/xcl:comment:7164446023 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/522#issuecomment-7164446023). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T13:53:44Z. --- Verification on RTX 3060 Ti (Windows 11): **merge conflict with current `main`** — needs a rebase before it can be tested.
TG0000 commented 2026-11-25 15:08:07 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by TG0000 on 2026-11-25T15:04:33Z.


@DavidM1911 Rebased onto latest main (head 1af0171) — thanks for testing!

<!-- greyfinch-sync:ivall/xcl:comment:7166263151 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/522#issuecomment-7166263151). Originally posted by [TG0000](https://github.com/TG0000) on 2026-11-25T15:04:33Z. --- @DavidM1911 Rebased onto latest `main` (head `1af0171`) — thanks for testing!
DavidM1911 commented 2026-11-26 03:06:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T02:45:59Z.


Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7181099545 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/522#issuecomment-7181099545). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T02:45:59Z. --- Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
Foniass commented 2026-12-01 03:38:58 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T03:38:58Z.


Triage (#1607) – head 1af0171

No open or merged PR makes the same change. On main, Uma::used() and sparse_used() still sum the maps, and alloc_in still filters the whole free map.
No problems found at the PR's base: every take_sparse_in and sparse_release site goes through take_sparse or updates sparse_bytes. A rebase needs care. Main now has sparse_alloc_above, which calls take_sparse_in directly. sparse_release now goes through a shared give_back helper, which the views map also uses. A missed site would make sparse_used() drift silently. The failing check is only PR description.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7299922934 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/522#issuecomment-7299922934). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T03:38:58Z. --- **Triage (#1607)** – head 1af0171 No open or merged PR makes the same change. On main, `Uma::used()` and `sparse_used()` still sum the maps, and `alloc_in` still filters the whole free map. No problems found at the PR's base: every `take_sparse_in` and `sparse_release` site goes through `take_sparse` or updates `sparse_bytes`. A rebase needs care. Main now has `sparse_alloc_above`, which calls `take_sparse_in` directly. `sparse_release` now goes through a shared `give_back` helper, which the views map also uses. A missed site would make `sparse_used()` drift silently. The failing check is only `PR description`. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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/522:upstream-pr/522'
git switch 'upstream-pr/522'

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/522'
git switch 'upstream-pr/522'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/522'
git switch 'upstream-pr/522'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/522'
git switch 'main'
git merge --squash 'upstream-pr/522'
git switch 'main'
git merge --ff-only 'upstream-pr/522'
git switch 'main'
git merge 'upstream-pr/522'
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
xcl-dev/xcl!517
No description provided.