pressure: with JAXE_PRESSURE_PHYSICAL=1, physical memory decides the pressure level #171

Open
mahhnameisjeff wants to merge 1 commit from upstream-pr/171 into amd
mahhnameisjeff commented 2026-12-03 14:28:27 +00:00 (Migrated from github.com)

Imported from eikkapine/jaxe. Originally posted by mahhnameisjeff on 2026-12-03T14:28:27Z.


Base: origin/amd (0902398). Independent of the other PRs from this batch.

JAXE_PRESSURE_PHYSICAL=1 already exists (residency.rs), but
host::current_pressure_level still classified by commit headroom. On AMD
the driver keeps every command allocator's memory for the process,
committed and write-combined but mostly never touched (a release returns
it to the driver's pool, never to Windows: alloc_cap::tests::probe_reuse,
an ignored test that measures this), and a page file that grows on demand
is counted at its present size. So commit headroom sat at 0.6-1.5 GB from
the world's load on, with RAM free, and the layer stayed in emergency or
elevated pressure: recording on one or two threads, emergency reclaims,
pool trims.

With the switch on, free physical memory decides (emergency below 512 MiB,
elevated below 1 GiB), commit only near its real end (256 / 768 MiB), and
the shared-memory percentage as before. Measured on RX 6700 XT 12 GB /
32 GB RAM: emergency reclaims 97 -> 2 per run, frame rate after the load
10 -> 11.3-12.6 fps.

Default behaviour is unchanged (the switch is off unless set).
Related: #133 (2211 emergency reclaims), #61, #64. Only tested with 32 GB
of RAM; 16 GB machines may want other thresholds.

🤖 Generated with Claude Code

<!-- greyfinch-sync:eikkapine/jaxe:issue:5628459688 --> Imported from [eikkapine/jaxe](https://github.com/eikkapine/jaxe/pull/171). Originally posted by [mahhnameisjeff](https://github.com/mahhnameisjeff) on 2026-12-03T14:28:27Z. --- Base: origin/amd (0902398). Independent of the other PRs from this batch. `JAXE_PRESSURE_PHYSICAL=1` already exists (residency.rs), but `host::current_pressure_level` still classified by commit headroom. On AMD the driver keeps every command allocator's memory for the process, committed and write-combined but mostly never touched (a release returns it to the driver's pool, never to Windows: `alloc_cap::tests::probe_reuse`, an ignored test that measures this), and a page file that grows on demand is counted at its present size. So commit headroom sat at 0.6-1.5 GB from the world's load on, with RAM free, and the layer stayed in emergency or elevated pressure: recording on one or two threads, emergency reclaims, pool trims. With the switch on, free physical memory decides (emergency below 512 MiB, elevated below 1 GiB), commit only near its real end (256 / 768 MiB), and the shared-memory percentage as before. Measured on RX 6700 XT 12 GB / 32 GB RAM: emergency reclaims 97 -> 2 per run, frame rate after the load 10 -> 11.3-12.6 fps. Default behaviour is unchanged (the switch is off unless set). Related: #133 (2211 emergency reclaims), #61, #64. Only tested with 32 GB of RAM; 16 GB machines may want other thresholds. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/171:upstream-pr/171'
git switch 'upstream-pr/171'

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.

git switch 'amd'
git merge --no-ff 'upstream-pr/171'
git switch 'upstream-pr/171'
git rebase 'amd'
git switch 'amd'
git merge --ff-only 'upstream-pr/171'
git switch 'upstream-pr/171'
git rebase 'amd'
git switch 'amd'
git merge --no-ff 'upstream-pr/171'
git switch 'amd'
git merge --squash 'upstream-pr/171'
git switch 'amd'
git merge --ff-only 'upstream-pr/171'
git switch 'amd'
git merge 'upstream-pr/171'
git push origin 'amd'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
eikkapine/jaxe!171
No description provided.