diff options
| author | enlight3d <19186686+enlight3d@users.noreply.github.com> | 2026-12-01 00:24:48 +0100 |
|---|---|---|
| committer | enlight3d <19186686+enlight3d@users.noreply.github.com> | 2026-12-01 04:33:11 +0100 |
| commit | 200a55e29f11b3313155dfe3d27ce31e651d749c (patch) | |
| tree | 35550bf1562b58da9610307b93bf0c7b8246d948 /runtime/test/cpp_unwind_test.cpp | |
| parent | 023043bfe1acbcbb34ef721adae08874edb6858f (diff) | |
leonida-gpu: bound the reaper's line (LEONIDA_REAPER_LIMIT)
The reaper thread's channel had no bound and nothing slowed its senders.
On an RTX 3090 its line grew to hundreds of thousands of things in most
runs; the landed host lists waiting there kept their scratch chunks, and
the runs that were not stopped ended in a device loss as private memory
neared Windows' commit limit, while LEONIDA_REAPER=0 kept memory flat. The lists' scratch was in card
memory; it is in PC memory by default since #2819, where the line should
stay short. This bound is the safety net for LEONIDA_SCRATCH_CARD=1 and
any other cause of a backlog.
Once the line (REAPING) holds LEONIDA_REAPER_LIMIT things (4096 by
default; 0: no bound, as before; LEONIDA_AB can turn it on and off), what
the host is done with is let go of by the thread done with it, as
LEONIDA_REAPER=0 does. land(), bury() and fronts_let_go() go through one
helper (reap), which counts each batch as the reaper thread takes it off;
the check and the count are one atomic step (hand_over),
so the line holds fewer than the bound and one batch however many threads
send. A batch comes off the line also if letting it go panics. The first
time the bound takes hold is logged once; the census memory line counts
what was let go in place (REAPED_IN_PLACE) and says the bound.
Diagnostics only: host lists and preludes made per frame by the title's
threads, the submitting thread and the others, with their time; a SPLIT
slot for preludes made and recorded; HostList::reset split into what the
list held let go and the allocator and list resets.
Claim: D3D12-REAPER-BOUNDED-QUEUE
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/cpp_unwind_test.cpp')
0 files changed, 0 insertions, 0 deletions