D3D12.X: reclaim cooling and idle tiles on pool heap OOM #1653
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1663"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by n-romanovich on 2026-11-24T18:56:12Z.
Addresses #1585.
When
Pages::bindhitsE_OUTOFMEMORY(0x8007000E) inalloc_pool_heap, it previously failed immediately even when freed tiles were still waiting incooling(up toCOOL = 2s) or unreferenced pages were sitting inidle(up toIDLE = 2s). Now, ontake_batchfailure, ifpool.coolingoridleis non-empty,Pages::bindwaits up to 1,000 ms forPages::fenceand, onOk(()), callsTilePool::reclaim_for_oom(draining cooling tiles and evicting the oldest still-idle pages up tomissingtiles) before retryingtake_batch. Iffence::waitfails or times out, it logs a warning and returnsNonewithout reclaiming potentially in-flight tiles.What is in it
pop_idle_pagefromsweep_idleincrates/xcl/src/hle/d3d12x/vram.rs. - AddedTilePool::reclaim_for_oomand wiredPages::bindto wait onself.fence, reclaim cooling/idle tiles, and retrytake_batchon OOM. - Added unit testreclaim_for_oom_drains_cooling_and_idle_pagescovering cooling drain, staleidleentry skipping, andOwn/Extraidle eviction.Tested
Hardware: Windows 11 x64, NVIDIA GeForce RTX 5060 Ti.
cargo test -p xcl --lib vram::tests -- --test-threads=4:11 passed; 0 failed; 1 ignoredcargo test --workspace -- --test-threads=4:960 passed; 0 failed; 43 ignoredSKIPPED: 21 wave64 / unsupported#1426per-lane GPU tests (no wave64/unsupported V_MUL_F16/V_PK_MUL_F16/V_CVT_F16_F32),shaders::tests::pso_measurement_compiles_an_exact_synthetic_record(Windows Developer Mode is required),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows)Regression run
Main (
5478c4a7c1ae5adba127c8d27018d7fdbf3a8725):PR (
bdcc0ebe47316ad219212d28435c26a7833f239f):Not tested
AI use
smoke.ps1runs.Imported from ivall/xcl. Originally posted by eizispark on 2026-11-24T19:15:22Z.
Hardware test report — commit
40fd9b6Verified
40fd9b647ca69f344a17408305e50effa39c86cf(clean merge withmainc160d86ef2efe3a07e4dfb473e4fa72eafb413c0): pass.Tested
32.0.32015.16001), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11 x64,rustc 1.100.0 (0ef1bc386 2026-11-09), debug tests + release smokecargo test --workspace --no-fail-fast -- --test-threads=4:778 passed, 0 failed, 41 ignored(1 skipped:heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows)11/11hle::d3d12x::vram::testspassed on AMD RDNA4, includingreclaim_tile_drains_cooling_and_idle_pages_on_oomandtake_tile_reclaims_only_after_fence_on_oomgpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware, plusconsole_wave64_compute_through_the_pso_hook_dispatch_and_read_back) passed cleanlyRegression run (
scripts/smoke.ps1, 60 s, warm shader/driver cache)main(c160d86ef2efe3a07e4dfb473e4fa72eafb413c0):PR (
40fd9b647ca69f344a17408305e50effa39c86cf):Not tested
CreateHeappool-heap OOM in a live retail session (16 GB VRAM RX 9070 XT did not hit OOM during the 60 s smoke), NVIDIA/Intel GPUs, Wine/vkd3d-proton, gameplay past the menusAI use
Imported from ivall/xcl. Originally posted by n-romanovich on 2026-11-24T19:19:28Z.
Thanks for the review!
Imported from ivall/xcl. Originally posted by MiharaxD on 2026-11-24T19:27:14Z.
Test report on an 8 GB NVIDIA card, head
40fd9b6(onmain9e3831e).Tested
cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4(debug) on40fd9b6: 778 passed, 0 failed, 41 ignored (lib tests 729 / 0 / 21).reclaim_tile_drains_cooling_and_idle_pages_on_oomandtake_tile_reclaims_only_after_fence_on_oompass (the second printscould not wait for tile fence before OOM reclaim: Timeout(1000), its timeout case).gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).OOM reclaim,no video memoryor8007000Eline, so 60 s on the start screen did not run the GPU out of memory and the new path did not run.Regression run
scripts/smoke.ps1 -Game <game folder> -Seconds 60(release builds, start screen, no input).mainisc160d86:main:
this PR's head:
Not tested
0x8007000E) in the retail title: it did not happen in this run, so the reclaim was only exercised by the unit tests.AI use: Claude Code (Claude Opus 5.5) built the PR, ran the tests and both smoke runs, read the logs and wrote this report; I checked it before posting.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T21:26:29Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored.Thanks!
upstream-sync referenced this pull request2026-11-24 22:06:32 +00:00
Imported from ivall/xcl. Originally posted by Adika713 on 2026-11-25T02:30:39Z.
Live
0x8007000Ereproduction on AMD: the reclaim change removes the VRAM wall, but host memory becomes the next limitI saw that this PR's description and two reviewers mark live retail VRAM exhaustion as untested. I have a local repro that reaches it, so here is a paired run on the same copied retail folder.
Setup:
xcl.XCL_NETWORK=0,XCL_ACTIVITY=1,XCL_PRESS_A_AT='15,22,25,30,35,40,50,60,80,100',XCL_RUN_SECONDS=240.mainaaa093657bd96a146c05c0c1a9b61149fe761453.c2ae579e9aa5ee3feda1131f48754aa023a41e1emerged with that samemainas36b93e91475e3f2187db3b27d30c476efa89c88d.cargo build --release -p xcl --lockedpassed.Results:
mainaaa0936CreateHeap(0x4000000 bytes, type 1)refusal at 100.572 s; 8 such refusals and 1,647no video memory for more pages of title textures (0x8007000E)lines0x80000003atgame_scarlett_master.exe+0x193e00f, withrax,rcxandrsiall0x8007000ec2ae579+ samemainCreateHeap ... refused (0x8007000e)lines and 0no video memory ...lines0xc0000409frommemory allocation of 2097152 bytes failedLast memory samples:
mainat 129.068 s: 17,908 MB process commit; 7,982 MB local video memory; target pages 4,555 MB (pools 4,608 MB).What this does and does not show:
0x8007000Ewall from streamed texture pools, and with the change that wall did not appear in a 240 s run.reclaim_for_oomspecifically ran. The verified observation is the absence of the pool-heap refusals andno video memorylines under the same setup.scripts/smoke.ps160 s pair, and it is not a substitute for the PR-description check.AI use: OpenCode with Big Pickle ran the builds and retail-title runs, read the logs, and drafted this report. Please verify before posting.
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T04:44:38Z.
XCL PR #1663 verification
Clean detached HEAD
c2ae579e9aa5ee3feda1131f48754aa023a41e1eon STOR-WINLAB. The diff changes onlycrates/xcl/src/hle/d3d12x/vram.rs.Windows 11 Enterprise Evaluation x64, build 26200. AMD Ryzen 7 3800X, Intel Arc A770 (16,258 MiB reported by XCL), driver 32.0.101.9175. DXC 1.9.2609.5 (01b62ad47), rustc 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). Unoptimized Cargo profiles with debug info and incremental compilation disabled.
Tested
cargo build --workspaceandcargo test --workspace --no-runsucceeded outside the A770 lock. The latter built 19 test executables.XCL_ADAPTER=NONE_CPU_ONLYoutside the lock, each command returned 1 passed, 0 failed, 0 ignored and 0 skip messages.cargo test -p xcl --lib hle::d3d12x::vram::tests::reclaim_for_oom_drains_cooling_and_idle_pages -- --exactverified reuse of two cooling tiles and two still-idle pages before timeout, preservation of a reused active page, and a false result when reclaimable tiles ran out.cargo test -p xcl --lib hle::d3d12x::vram::tests::idle_pages_are_swept_from_their_queue -- --exactverified the ordinary idle deadline and stale-entry handling.cargo test --workspace --no-fail-fast -- --test-threads=4ran once underInvoke-ArcTest.ps1withXCL_ADAPTER=A770andRUST_TEST_NOCAPTURE=1. Exit 101. The 20 result lines (19 executable results and one doctest result) sum to 941 passed, 19 failed and 43 ignored. Both focused tests passed again.Workspace failures and skips
18 GPU DXIL/recompiler unit tests failed, including compute PSO creation errors (0x80070057) and shader output mismatches. The synthetic title e2e also failed on dynamic depth bias via
RSSetDepthBiasX(#94), producing blue where it expected green. The log contains 25 explicit skip messages, including 17 for missing wave64 and one for tiled-resource tier below 2. Skip messages include partial test skips and provide no coverage for the skipped paths.Not tested
Actual D3D12 pool-heap OOM, the fence-wait and retry under driver OOM, a matched
mainrun, retail-title smoke, and other GPUs.AI use
T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against
pr1663-suite.logand published.Imported from ivall/xcl. Originally posted by Adika713 on 2026-11-25T14:02:40Z.
The current no-GPU CI failure on head
24e5eb3is a test-only stale API rename, not a failure in the reclaim change. I reproduced it locally at the exact PR head with cargo test --workspace --locked --no-run: two E0599 errors at crates/xcl/src/hle/d3d12x/vram.rs:1872-1873, because TilePool::add_heap was replaced upstream by add_heap_at(slot, pool_pages).A two-line replacement fixes the build and preserves the test setup:
pool.add_heap_at(0, 2);
pool.add_heap_at(1, 3);
Verified locally on the exact head
24e5eb3fd7:Before: cargo test --workspace --locked --no-run failed with E0599 at vram.rs:1872:25 and 1873:25; the compiler suggested add_heap_at.
After the two-line change: cargo test --workspace --locked --no-run exited 0.
After the two-line change: cargo test -p xcl --lib hle::d3d12x::vram::tests::reclaim_for_oom_drains_cooling_and_idle_pages -- --exact --nocapture reported 1 passed, 0 failed.
Only the two pre-existing Atomic::fetch_update deprecation warnings were emitted.
No retail-title smoke, GPU run, or full test suite was performed for this comment; this only verifies that the stale test calls compile and the focused reclaim test passes. I did not push a competing branch or change the PR.
AI use: OpenCode with Big Pickle reproduced the compiler failure, applied the two-line local verification patch, and drafted this comment. Please verify before applying.
upstream-sync referenced this pull request2026-11-25 15:05:51 +00:00
Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-25T14:10:41Z.
Independent Windows check of bdcc0eb. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, Rust 1.99.1 MSVC and DXC 1.8.2502.11.
Commands:
cargo build --offline --locked --workspace -j 6,cargo test --offline --locked --workspace -j 6 --no-fail-fast -- --test-threads=4 --nocapture, andcargo test --offline --locked -p xcl --lib -j 6 -- --test-threads=1 --nocapture oom_reclaim reclaim_for_oom. Synthetic inputs only. No real VRAM exhaustion or retail run.AI-assisted. Codex (GPT-6, exact variant unavailable) wrote the local follow-up and fixture, ran the tests and drafted this report.
Imported from ivall/xcl. Originally posted by Lum7nt on 2026-11-25T18:43:30Z.
Tested on \dcc0ebe47316ad219212d28435c26a7833f239f\ (\dcc0eb, clean PR head) and merged onto \origin/main\ \
3ceb550:ustc 1.100.0\ (\x86_64-pc-windows-msvc), debug profile, \XCL_ADAPTER=nvidia.
eclaim_for_oom_drains_cooling_and_idle_pages).
3ceb550\ (\git merge origin/main): merges cleanly without conflicts; \cargo test -p xcl --lib hle::d3d12x::vram::tests -- --nocapture\ passes 20 passed, 0 failed, 1 ignored (\churn_update_tile_mappings_timing\ ignored).Review note on \origin/main\ \
3ceb550\ compatibility (#2275):eclaim_for_oom\ and immediately returning \cooling\ and \idle\ tiles to \self.pool.free\ for remapping.
11aa227), \ram.rs\ tracks all live title/upload/sparse queues on the device via \collect_device_queues\ / \RetireQueue\ because title command queues may still have in-flight GPU reads/writes referencing \cooling\ or recently \idle\ tiles. Waiting only on \self.fence\ can allow \ ake_batch\ + \self.queue.UpdateTileMappings\ to remap a tile while a title queue is still using it (the same cross-queue hazard #2275 and #2345 addressed).Not tested
AI use
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-26T05:52:29Z.
NVIDIA and AMD full-suite run of head
bdcc0ebe, on its own base5478c4aand merged with currentmainb49be183, to go with the reports above by Lum7nt, thehollowedone, since none of them covers AMD. On its base, the 3 failures come from changes made onmainafter that base (#2245 andea088a5); merged withmain, both cards pass. The bare-head runs come first.Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 1152 passed, 2 failed, 24 ignored. SKIPPED (no wave64):a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu,a_per_lane_2d_or_3d_group_runs_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,gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware,the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.gpu::recomp::pso::shader_cache_tests::rerouted_disk_entries_follow_the_direct_translator,hle::d3d12x::device_x::tests::pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa. (stale on this base, fixed onmainby #2245; see the merged run below)reclaim_for_oom_drains_cooling_and_idle_pages.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 1161 passed, 3 failed, 26 ignored. SKIPPED:f16_programs_on_the_gpu(f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))).--skipleaves out tests that fail on mainb49be183too, not because of this PR. On NVIDIA:heap_window_out_of_memory_falls_back_to_the_switch_form(#1651), the fourgpu::recomp::lower_dxil::tests::*_programs_on_the_gputests,const_and_null_mask_operands_agree_with_hlsl_on_the_gpuandmask_ff0_and_flbit_agree_with_hlsl_on_the_gpu(follow-up on #1651) fail becauserunner::skip_testturns their skips into failures underXCL_REQUIRE_GPU=mesh, andgpu::dxil::fuzz_testsseeds 70, 545, 1019 and 1507 failCreateComputePipelineStatewithE_OUTOFMEMORYon this card (drivers 616.64 and 621.40). On AMD:fuzz_validate_and_gpu_1fails on seed 540 (res[833]0x7 vs CPU 0x6). The AMD run does not setXCL_REQUIRE_GPU.rerouted_disk_entries_follow_the_direct_translator(#2245),gpu_image_get_resinfo_past_last_level(ea088a5),pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa(#2245).mainb49be183(git merge --no-ff, clean, local only): NVIDIAXCL_REQUIRE_GPU=mesh cargo test --workspacewith the same skips: 1424 passed, 0 failed, 45 ignored; AMD Radeon iGPU (XCL_ADAPTER=radeon, same skips): 1435 passed, 0 failed, 47 ignored.Not tested
AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T06:07:43Z.
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
Imported from ivall/xcl. Originally posted by ClosetPie107 on 2026-11-26T10:07:09Z.
Linux / AMD RX 9070 (RDNA4, RADV) test report on
bdcc0ebe(and merged ontomainb49be183with #2385 + #751)Setup
experimental-11.0-20261112), DXVKv3.1.1-209, patched vkd3d-protonmaster(ec207194,dxil-spirvb540c8a2), DXC1.9.2609.5x86_64-pc-windows-gnubuildTested
bdcc0ebe—vram::tests:xcl-<hash>.exe hle::d3d12x::vram::tests --test-threads=1(via Proton/Wine,XCL_ADAPTER=9070)1,309 MiB), includingreclaim_for_oom_drains_cooling_and_idle_pages.bdcc0ebe— retail title 1.0.2.1 (XCL_DIRECT_DXIL=1 XCL_PSO_PRELOAD=0 XCL_PSO_WAIT_MS=50 XCL_SPLIT_MIDLIST_WAIT=0 XCL_COHERENT_MB=1024 XCL_ACTIVITY=1):1,844presents, 0 device removals), peak VRAM16,297 MiB(17,091 MBlocal reported,target pages 10,210 MB,pools 10,432 MB,xcl_rss13.2–14.8 GiB,xcl_swap7,734 MiB) before0xc0000005ingame_scarlett_master.exe+0x7b619c(read at 0x0).E_OUTOFMEMORY(0x8007000E) fromCreateHeap, so#1663's live OOM-reclaim path was not triggered in this game run.mainb49be183(+ #2385 + #751, only adjacent#[test]conflict invram.rs):vram::tests: 26 passed, 0 failed, 1 ignored, 0 skipped (peak VRAM1,309 MiB).XCL_TEXTURE_LEVEL_PAGES=1): cleanexit=0after 316 s wall (2,241presents, 0 crashes, 0 device removals).XCL_TEXTURE_LEVEL_PAGES=1): cleanexit=0after 920 s wall (2,258presents, 0 crashes, 0 device removals,10,279 MiBMemAvailable).Not tested
bdcc0ebe, Windows, NVIDIA, or a host/GPU wherealloc_pool_heapreturnsE_OUTOFMEMORYin-game.AI use
Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-27T19:44:02Z.
merge-check
base:
6089122a1c96dff16e93b6fdf04c8ed20cfb6102head:
bdcc0ebe47316ad219212d28435c26a7833f239fmerge: Clean local merge, no commit.
build:
cargo build --workspace-> ok.tests:
XCL_ADAPTER=nvidia cargo test --workspace --no-fail-fast -- --test-threads=4-> 1,465 passed, 1 failed, 47 ignored; 25 GPU skip notices. All 20 non-ignoredhle::d3d12x::vram::testspassed, including the new reclaim test. The sole failure isgpu::recomp::pso::shader_cache_tests::console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk(DXIL not compiled); it also failed on this untouched base in the earlier current-base check.review: Two OOM-path blockers remain. First,
bind_rangecounts an idle owned/extra page as already present, butreclaim_for_oomcan remove that same page. For a partial overlap[A, B]with idleA, no free tiles and heap growth refused, it can reclaimA, allocate one tile for the originally missingB, then exhaustfresh_iterwhile inserting both. Our earlier RTX check tested a local preservation fix and native two-tile failure fixture; that fix is absent from this head. Protect every key in the incoming bind range during eviction and test owned and extra overlaps with insufficient and sufficient unrelated idle tiles.Second, the OOM wait covers only the tile-mapping queue.
unmap_supersededcan place tiles in cooling while earlier title-queue work is still pending; forced reclaim drains cooling immediately and can map those tiles elsewhere. Another tester raised this queue-ordering gap, and the merged multi-queue heap retirement code confirms that the mapping fence alone does not retire title work. Before tile reuse, require completed marks behind prior work on every relevant consumer queue; failed or unknown marks must keep tiles quarantined. Test with a pending title queue after the mapping fence completes. Until that protocol is in place, fail the current allocation cleanly rather than force-reuse cooling tiles. Recount missing pages if retrying after a lock drop.performance: The new path can wait up to 1,000 ms while holding the process-wide
PAGESmutex, serializing other-device page operations; this is a source-level latency concern, not a measured frame-time claim. Retire asynchronously outside that lock and use the completed batch on a later bind.verdict: not yet: protect incoming pages and certify consumer-queue retirement before forced reuse. This check does not claim a live title OOM or a new smoke run.
hardware / tool and model: Windows 11 build 26300; Ryzen 7 9800X3D; RTX 3080 Ti 12 GiB / NVIDIA 621.35; rustc 1.99.1 MSVC; DXC 1.8.2502.11. AI use: Codex (GPT-6.2 Sol) ran the build and GPU suite and checked the merged code; Codex (GPT-6.2 Astra) independently traced tile and queue lifetimes.
Imported from ivall/xcl. Originally posted by throny on 2026-11-27T19:44:07Z.
merge-check claim
head:
bdcc0ebe47Imported from ivall/xcl. Originally posted by throny on 2026-11-27T20:00:55Z.
merge-check
base:
6089122ahead:
bdcc0ebe47merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1466 passed, 0 failed, 47 ignored (26 SKIPPED lines); base alone: 1465 passed, 0 failed, 47 ignored
review: two blocking findings in the OOM path. (1) Pages::bind_range counts
missingbefore the pool is asked: a page that is idle but still in the maps counts as existing. When take_batch fails, reclaim_for_oom evicts the oldest idle pages, which can be those very pages; the fill loop then finds them gone and calls fresh_iter.next().unwrap() with onlymissingfresh tiles: a panic while PAGES is held, which poisons the lock. Trigger: a texture placed again shortly after release while pool-heap allocation fails, i.e. the situation this PR is for. (2) The reclaim waits only on the tile-mapping queue's fence and then returns every cooling tile and idle tiles without the 2 s cooling time, which exists because the GPU may still be working on what the title released: a title queue can still read or write a tile handed to a new texture. Also: up to 1 s wait while PAGES is held. The unit test does not go through bind_range.performance: default path unchanged (the sweep refactor is equivalent); OOM path only (reasoned).
verdict: not yet: keep the pages the placement already counts (or recount after the reclaim), and wait on the title queues or keep the cooling time; a test through bind_range. I will rerun the suite on the new head.
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:26:23Z.
Triage (#1607) – head
bdcc0ebNo open or merged PR reclaims cooling and idle tiles when allocating a pool heap fails. #2357 handles pool-heap OOM differently (VRAM budgets and an OOM back-off) and does not make this change. Main's TilePool::take_batch still returns None when make_heap fails.
Problem: on OOM,
Pages(vram.rs) waits only onself.fence. That fence is signalled after each tile mapping on XCL's mapping queue, not after the title's queues. reclaim_for_oom then frees every cooling tile and pops idle pages straight to the free lists, which skips bothCOOL("the GPU may still be at work on what the title released") andIDLE. A page released a few milliseconds earlier can be handed to a new texture while command lists already submitted may still read or write it. That is a silent corruption risk instead of a failed allocation.The PR conflicts with main: take_batch now takes
evictable, and vram.rs has been restructured.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.