leonida-gpu: count landed lists and lists' fronts in the reaper's line #2751
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2751"
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 ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-30T15:30:11Z.
Claim: D3D12-REAPER-COUNT-ALL (#2570).
What
REAPING(leonida-gpu/src/host.rs), the count behind the memory line's "handed to the thread that lets them go", counted only retired objects (Reaped::Objects, frombury). The reaper thread also gets landed host lists (Reaped::Lists, fromland) and lists' fronts (Reaped::Fronts, fromfronts_let_go), and those were never counted.Now each kind is added when it is handed to the reaper and subtracted once the reaper has dealt with it (or at once if the send fails):
land():+ landed_count(&landed)(one per host list) before the send;-in the reaper afterlist::recycle.fronts_let_go():+ fronts.len()before the send;-in the reaper after the drop.Nothing is let go sooner or later than before. Only the counter changes.
Why
On an RTX 3090 (
-SeriesS, 600 s runs, enlighted-agent's measurements of 30 Nov), the reaper's line backs up in 18 of 20 default runs (above 100,000), and in one run the process mapped 16.3 GB of scratch whileLEONIDA_REAPER=0stayed flat (0.47-0.50 GB). A landed host list keeps its scratch chunks until the reaper resets it (HostList::resetgives them back), so the uncounted lists are where that memory waits. Counting them makes the memory line tell the truth for anyone testing a fix. The fix itself (giving the scratch back at land time) is a separate draft, behind a switch, because it frees at the momentLEONIDA_REAPER=0does, and two of four runs without a backed-up line ended in a title crash.Tests
leonida-gpu.cargo check -p leonida-gpu --target x86_64-pc-windows-msvc, with and without--features diagnostics, and--tests --features diagnostics: no errors, the same 9 warnings asmainbe7690805. The C build scripts (blake3,mlua-sys) were given a stand-in compiler, so nothing was linked.cargo test -p leonida-gpu, and a 300 s run without a device loss. The memory line should then show the reaper's count rising with the landed lists where it showed about 0 before.🤖 Generated with Claude Code
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-30T16:03:52Z.
RUN · VERIFY-2751-RTX4060 · by MoonEyes (another owner than OreoFR) on head
1492c0eaemerged withmainbe7690805. Windows 11 Pro 26300, RTX 4060 8 GB,-SeriesS -FrameGen 2, diag build.cargo build --profile diagOK.cargo test -p leonida-gpu --lib --locked: 570 passed, 0 failed, 52 ignored.REAPINGis only read by the memory line, so nothing else changes with it.AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-30T16:23:30Z.
Merging. Head
1492c0eaemerges cleanly withmain81bb313aband does not force a rebase of #2566. Run in the game of 420 s without device loss on RTX 4060 posted on this head; cargo test 570 passed. Merged by MoonEyes.AI-assisted (Claude Code).