[pr-performance][memory] Remaps under flights: the flights land in the pages the addresses showed before (DARNER_LAND_OLD_PAGES; off by default) #58

Open
Sobo wants to merge 1 commit from Sobo/Darner:land-old-pages into main
Contributor

When the title remaps title memory that flights still in the air may
write, the remap waits for those flights (15-20 ms a frame while an area
streams in). With DARNER_LAND_OLD_PAGES=1 the remap goes ahead: the pages
the addresses show then are noted (redirect_remap), and the landings of
those flights write through our view of the whole section into them
(redirected). The notes go once the flights have landed
(redirects_landed); a section gone meanwhile keeps our view of it until
then. Off, nothing changes.

Co-Authored-By: Claude Opus 5.5 [email protected]
Fluxer-ID: 1577742832095989771

Contributor role (optional)

  • Fluxer ID: 1577742832095989771

What it changes

Switch: DARNER_LAND_OLD_PAGES=1 (off by default).

The console runs a queue's remap behind the work given to the queue before it, whose writes go to the pages shown then. The layer waits for those flights before letting the title remap: 15-20 ms a frame while an area streams in (1.2-1.5 such waits a frame). Leaving the waits out (DARNER_LAND_BEFORE_REMAP=0) made the flights write the new pages, and the game ended within a minute.

With the switch the remap goes ahead: the pages the addresses showed before are noted with the count of the line's items after which every flight of then has landed, and a landing that began after that writes those addresses through the layer's view of the whole section, into the old pages. Notes go when their flights have landed; a section the runtime lets go keeps its view while notes remain. A per-frame log line counts the remaps redirected.

How it was tested

  • Tested revision: Darner main 4a92569fb (git.gtahub.st) with this patch applied. Build check: cargo clippy -p darner-gpu --all-targets --target x86_64-pc-windows-msvc --locked -- -D warnings: clean. cargo test was 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).
  • Hardware and setup: i7-10700K (8 cores, 16 threads), RTX 3090 24 GB, 32 GB RAM, Windows 11; page file 128 GB; NVIDIA shader cache 100 GB; shaders prepared with the preload, then darner warm --used --again with DARNER_WARM_SHARED=1.
  • Gameplay: Series X profile (and Series S where said), DLSS quality, FSR 3 frame generation 2x, ray tracing off.
  • Used in every session on this PC since 2026-11-30 (many hours, city and highway), with no device losses or corruption tied to it. The 15-20 ms a frame of remap waits while streaming come from the layer's own log of the same scenes without the switch.
  • Coverage gaps: one PC only; no A/B run of fps with and without the switch alone.

Checklist

  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md.
  • I recorded this PR's dependencies below.
    • Depends on: none

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs: none for the same problem. Open PRs that share files only: #37 (land.rs) and many that touch host.rs.
When the title remaps title memory that flights still in the air may write, the remap waits for those flights (15-20 ms a frame while an area streams in). With DARNER_LAND_OLD_PAGES=1 the remap goes ahead: the pages the addresses show then are noted (`redirect_remap`), and the landings of those flights write through our view of the whole section into them (`redirected`). The notes go once the flights have landed (`redirects_landed`); a section gone meanwhile keeps our view of it until then. Off, nothing changes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Fluxer-ID: 1577742832095989771 <!-- Thanks for the pull request. Please label it (pr-fix, pr-feature, pr-performance, pr-diagnostics, pr-refactor, pr-docs or pr-tests, plus the area labels), or put the label in the title, like [pr-fix]. --> <!-- Use Fixes #N for a complete fix or Refs #N for a partial change. --> ## Contributor role (optional) - Fluxer ID: 1577742832095989771 ## What it changes Switch: `DARNER_LAND_OLD_PAGES=1` (off by default). The console runs a queue's remap behind the work given to the queue before it, whose writes go to the pages shown then. The layer waits for those flights before letting the title remap: 15-20 ms a frame while an area streams in (1.2-1.5 such waits a frame). Leaving the waits out (`DARNER_LAND_BEFORE_REMAP=0`) made the flights write the new pages, and the game ended within a minute. With the switch the remap goes ahead: the pages the addresses showed before are noted with the count of the line's items after which every flight of then has landed, and a landing that began after that writes those addresses through the layer's view of the whole section, into the old pages. Notes go when their flights have landed; a section the runtime lets go keeps its view while notes remain. A per-frame log line counts the remaps redirected. ## How it was tested - Tested revision: Darner `main` 4a92569fb (git.gtahub.st) with this patch applied. Build check: `cargo clippy -p darner-gpu --all-targets --target x86_64-pc-windows-msvc --locked -- -D warnings`: clean. `cargo test` was 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). - Hardware and setup: i7-10700K (8 cores, 16 threads), RTX 3090 24 GB, 32 GB RAM, Windows 11; page file 128 GB; NVIDIA shader cache 100 GB; shaders prepared with the preload, then `darner warm --used --again` with `DARNER_WARM_SHARED=1`. - Gameplay: Series X profile (and Series S where said), DLSS quality, FSR 3 frame generation 2x, ray tracing off. - Used in every session on this PC since 2026-11-30 (many hours, city and highway), with no device losses or corruption tied to it. The 15-20 ms a frame of remap waits while streaming come from the layer's own log of the same scenes without the switch. - Coverage gaps: one PC only; no A/B run of fps with and without the switch alone. ## Checklist - [x] This PR contains one change based on `main`. - [x] The diff follows `docs/asset-policy.md`. - [x] I recorded this PR's dependencies below. - Depends on: none ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: none for the same problem. Open PRs that share files only: #37 (land.rs) and many that touch host.rs.
When the title remaps title memory that flights still in the air may
write, the remap waits for those flights (15-20 ms a frame while an area
streams in). With DARNER_LAND_OLD_PAGES=1 the remap goes ahead: the pages
the addresses show then are noted (`redirect_remap`), and the landings of
those flights write through our view of the whole section into them
(`redirected`). The notes go once the flights have landed
(`redirects_landed`); a section gone meanwhile keeps our view of it until
then. Off, nothing changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Fluxer-ID: 1577742832095989771
Sobo changed title from Remaps under flights: the flights land in the pages the addresses showed before (DARNER_LAND_OLD_PAGES; off by default) to WIP: Remaps under flights: the flights land in the pages the addresses showed before (DARNER_LAND_OLD_PAGES; off by default) 2026-12-03 18:03:20 +00:00
Sobo changed title from WIP: Remaps under flights: the flights land in the pages the addresses showed before (DARNER_LAND_OLD_PAGES; off by default) to [pr-performance][memory] Remaps under flights: the flights land in the pages the addresses showed before (DARNER_LAND_OLD_PAGES; off by default) 2026-12-03 18:34:04 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'land-old-pages:Sobo-land-old-pages'
git switch 'Sobo-land-old-pages'

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 'main'
git merge --no-ff 'Sobo-land-old-pages'
git switch 'Sobo-land-old-pages'
git rebase 'main'
git switch 'main'
git merge --ff-only 'Sobo-land-old-pages'
git switch 'Sobo-land-old-pages'
git rebase 'main'
git switch 'main'
git merge --no-ff 'Sobo-land-old-pages'
git switch 'main'
git merge --squash 'Sobo-land-old-pages'
git switch 'main'
git merge --ff-only 'Sobo-land-old-pages'
git switch 'main'
git merge 'Sobo-land-old-pages'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
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.

Dependencies

No dependencies set

Reference
TrustNo1/Darner!58
No description provided.