CPU: auto-free hybrid CPUs, BTreeMap RETIRED drain, 64k descriptor rings, and recording hot-path opts #394
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/gamingwithhomie--larp!394
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-394"
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?
@Lakanya on GitHub · 2026-12-06 00:04 UTC · original
Lakanya:pr/cpu-hybrid-and-hotpaths→main· +101 −36 · 8 files · 2 commits · openReduces CPU recording/submission overhead and 1%/0.1% low frame-time spikes with zero visual or rendering shortcuts.
What is in it
crates/larp-hle/src/modules/placement.rs: skip affinity pinning when the host has fewer than 14 better logical CPUs (wanted.count_ones() < 14), preventing 8 recording threads + render/submit/layer threads from oversubscribing 4 P-cores on hybrid mobile/desktop CPUs.crates/larp-gpu/src/host.rs:Mutex<Vec<...>>O(N) partition scans inRETIREDandRETIRED_RELEASEwithBTreeMap<u64, Vec<...>>split_offdrains (ported from Darner PR #274).HostList::note_program()SetMarker+ UTF-16String/Vecallocations behindLARP_D3D12_DRED=markers(keeping DRED breadcrumbs/page-faults intact underLARP_D3D12_DRED=1).HostList::used_pipeline()Stringallocation behinddred_on() || cfg!(feature = "diagnostics"), and add single-lockHostList::keep_pair()for PSO + root signature indraw.rs.crates/larp-gpu/src/frame.rs: skipstd::thread::sleep(Duration::ZERO)on zero-timeoutWaitFrameEventXpolls (ported from Darner PR #538).crates/larp-gpu/src/descriptor/stage.rs&descriptor.rs: raisestage::LOG(4096 -> 65536) andENDED_LOG(16384 -> 65536) to avoid 83k-slot view-heap rescans during streaming.apps/larp/src/subrender.rs: 64-way shardTRACKandSHADOW_VIEWSRwLock<HashMap>s to remove cross-core contention on added recording threads 5-7.crates/larp-gpu/src/descriptor/host.rs: trackdynamic_kept: AtomicBoolsoHostHeap::release()skips the per-slotMutexloop when no dynamic slot ever stored intokept.Tested
cargo test --lib -p larp-gpu -p larp-hle -- --test-threads=4+cargo check --workspace:larp-gpu24 passed / 0 failed / 6 ignored;larp-hle76 passed / 0 failed / 4 ignored.14.2 -> 27.8-28.1 fps(at 30 fps scene cap), p95444.9 -> 45.3 ms, p99730.6 -> 79.9 ms.AI-assisted by Antigravity (Gemini 4 Neon Medium).
@vanya890 on GitHub · 2026-12-06 01:36 UTC · original · reviewed
The benchmark is encouraging, especially the p95/p99 reduction, and the change is sensibly aimed at contention rather than reducing rendering quality. One point worth documenting is the
wanted.count_ones() < 14placement cutoff: the PR explains the eight recording threads and four P-cores on the tested machine, but the threshold is now a general policy for every CPU topology. Could you add a short rationale for why 14 is the safe boundary, or a small unit test covering representative hybrid layouts (for example 6P+8E and 8P+8E)? That would make the heuristic easier to maintain when newer hybrid CPUs have different P/E ratios.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.