Title memory by address: stop reaching the 3 GiB cap #198
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/198"
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 eikkapine/jaxe. Originally posted by mahhnameisjeff on 2026-12-04T10:57:19Z.
Title memory by address: stop reaching the 3 GiB cap (port of ReVIctory #33)
This is a port of ReVIctory PR 33 by saltdam36 (merged there) to the
amdbranch. Itsreplaced()comes from Darner (darner-gpu/src/memory.rs, GPL-3.0), as in the original. Onlycrates/jaxe-gpu/src/memory.rschanges. The original diff does not apply as it is (this branch has no fault sink, and its pages are kept as(copy, at)), so it was carried over by hand.What was wrong
With ray tracing on, the pages held for "title memory by address" grow until they reach
MOST(3 GiB). After that no pages are taken, the ray-tracing programs read zeros, and frame times get much worse.Seen on an RX 6700 XT (Series X, ray tracing on,
amdas of0902398) in an hour of play:title memory by address: no more pages are taken; others read zeros MOST=49152What is changed
Three parts, as in the original:
gone.land, header changed), its pages stay where they are (replaced). Given back and placed again, they would go to other places in the arenas after the submission had already asked the write watch.JAXE_MEMORY_EVICT_FRAMES=<n>(off by default) gives back pages that are only read once no list has named them fornframes, while more thanJAXE_MEMORY_EVICT_ABOVE_MB(default 2048) is held. A page given back that a shader still reaches comes back through the fault path the frame after, whateverFAULTS_ALLsays.The memory report line now also says how many structures were replaced, pages given back, free pages, pages taken over by a structure, and pages let go and asked for again.
Results
Same machine, same save point, 36 minutes, with
JAXE_MEMORY_EVICT_FRAMES=600:Not measured: how long the reclaim alone (without the release switch) stays under the cap on this branch. The original PR has the same note.
Testing
cargo test -p jaxe-gpu -- memory::passes🤖 Generated with Claude Code
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.