[pr-performance][memory] Pool: the card copies the title's pages from its physical-page sections itself (DARNER_POOL_COMMIT, DARNER_POOL_GPU, DARNER_POOL_OPEN_MB; off by default) #56
Loading…
Reference in a new issue
No description provided.
Delete branch "Sobo/Darner:pool"
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?
DARNER_POOL_COMMIT=1 makes the sections of physical pages SEC_COMMIT on
Windows too, in pieces of at most 1 GiB, so the host can open them as
heaps, and checks once that it can. DARNER_POOL_GPU=1 opens the sections
whose pages a refresh reads (up to DARNER_POOL_OPEN_MB, 3072 unless
given) and, for card copies shaders never write, has the card copy the
pages from them through a snapshot taken by a copy queue, in place of
the CPU's copy. The heaps are let go before the process ends.
Co-Authored-By: Claude Opus 5.5 [email protected]
Fluxer-ID: 1577742832095989771
Contributor role (optional)
What it changes
Three switches, all off by default:
DARNER_POOL_COMMIT=1: the title's physical-page sections are madeSEC_COMMITon Windows too, in pieces of at most 1 GiB (the host opened no heap over a 6 GiB section on an RTX 3090: invalid parameter). Only such a section can be opened as a host heap; a one-time "pool check" in the log says whether this PC can.DARNER_POOL_GPU=1(with POOL_COMMIT): for copies shaders never write, a refresh's bytes go up as copies the card makes itself from a buffer placed over the opened section, instead of the CPU copying them into the staging side first. If shaders are later declared to write such a copy, its CPU side takes all of title memory once (unpool).DARNER_POOL_OPEN_MB=<MB>(default 3072): the most bytes of sections opened; each opened heap counts whole against the memory the PC shares with the card.How it was tested
main4a92569fb(git.gtahub.st) with this patch applied. Build check:cargo clippy -p darner-gpu --all-targets --target x86_64-pc-windows-msvc --locked -- -D warningsand the same for-p darner-hle: clean.cargo testwas not run (no Windows machine for the checks). The gameplay numbers below come from my own builds, which carried this change together with other local changes (same scene, settings and hardware before and after).darner warm --used --againwithDARNER_WARM_SHARED=1.DARNER_POOL_OPEN_MB5120 -> 8192 (all 7.1 GB of sections open): refreshes on the submitting thread 28.3 -> 15.3 ms a frame; submitting thread 61.1 -> 46.2 ms a frame; frame time per 1,000 list calls 1.26 -> 1.12 ms; bytes the CPU copied as "no opened section holds it" 124-135 -> 64 MB a frame; bytes the card copied itself 106-138 -> 153 MB a frame; shared GPU memory 7.8 -> 9.4-9.7 GB.Checklist
main.docs/asset-policy.md.Checked for overlap
Pool: the card copies the title's pages from its physical-page sections itself (DARNER_POOL_COMMIT, DARNER_POOL_GPU, DARNER_POOL_OPEN_MB; off by default)to WIP: Pool: the card copies the title's pages from its physical-page sections itself (DARNER_POOL_COMMIT, DARNER_POOL_GPU, DARNER_POOL_OPEN_MB; off by default)ce8713cb72to05414b43b6WIP: Pool: the card copies the title's pages from its physical-page sections itself (DARNER_POOL_COMMIT, DARNER_POOL_GPU, DARNER_POOL_OPEN_MB; off by default)to [pr-performance][memory] Pool: the card copies the title's pages from its physical-page sections itself (DARNER_POOL_COMMIT, DARNER_POOL_GPU, DARNER_POOL_OPEN_MB; off by default)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.