d3d12 launcher: renderer port #7 (the write watch's journal in parts) on (D3D12-PORT-JOURNAL-ON) #3067
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3067"
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 ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-02T08:04:58Z.
Claimed in the coordination issue as
D3D12-PORT-JOURNAL-ON: https://github.com/ProjectLeonida/mandy/issues/2570What and why
Renderer port #7 (
LEONIDA_PORT_JOURNAL=1,watch.rs,port_journal) is already in main, off by default. It notes the write watch's journal in parts, each with a lock of its own. The threads that read the journal then stop waiting for those that note in it, and the submitting thread is one of them. Its doc comment measured about 2.8 ms a frame of that waiting on the submitting thread.It was left off after a 2026-11-27 A/B in
d3d12/docs/findings.md. That A/B ran on a six-core PC, standing, Series X, over 22 phases, and measured 91.4 ms against 83.7. Ports 1 to 6 and many changes have landed since.Measured again
RTX 4070 Laptop 8 GB, driver 621.40, Core Ultra 7 155H, Windows 11, main
229d352ee. Series S, no DLSS, walking after the lift, 600 s runs,LEONIDA_AB=8,LEONIDA_PORT_JOURNAL. The pairs are read after the lift, in the world.About -1.4 ms a frame (~3.7 %) in both runs. The second run's interval excludes zero; the first does not.
The change
play-nvidia.ps1) turns it on, as it did port #6 after its re-measurement.-More @{LEONIDA_PORT_JOURNAL='0'}turns it off.findings.mdrecords the new measurement.port7_tests) and its in-run A/B are already in main.Before merging
One card only, so this waits for reviews and A/Bs on other cards, especially a desktop 8 GB card, a 30-series card and an AMD card. The command is
-More @{LEONIDA_AB='8,LEONIDA_PORT_JOURNAL'}on a diagnostics build, then theA/B phaselines after the lift. Asked on the bridge.AI-assisted (oreofr-agent for OreoFR, Claude). Not to be merged by me: waiting for reviews.
🤖 Generated with Claude Code
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-12-02T09:44:10Z.
Live in-run A/B verification on Windows 10 22H2 + NVIDIA GeForce RTX 5070 12 GB (driver
621.40, 16C/32T desktop CPU),maina917c54d6(diagbuild,diagnostics,dlss,mimalloc), Series S,-NoFrameGen -NoPrecompile,LEONIDA_AB=8,LEONIDA_PORT_JOURNAL(8 s turns, standing in-world from a fixed save, ~4,430 draws/frame):python -I scripts/check_no_game_data.py d3d12/scripts/play-nvidia.ps1 d3d12/docs/findings.md-- exit0.ERRORlines across 49 A/B phases (397 s total, 260 s in-world).port_journallane wait (full-phase samples, >=15 preparings/frame):LEONIDA_PORT_JOURNAL=0: 0.300 ms median (n=116)LEONIDA_PORT_JOURNAL=1: 0.020 ms median (n=119) -- 15x reduction(Including the earlier world transition pair
ph=22/23,n=13gives-0.89 +- 2.32 msmean /-0.10 msmedian.)Result: PASS (neutral / no regression on desktop 16C/32T + RTX 5070 standing) -- cleanly eliminates the
port_journallane wait (0.300 ms -> 0.020 ms) with 0 errors and none of the old 2026-11-27 overhead, while the net frame-time gain is smaller/within noise here than on the mobile CPU walking case.AI-assisted: yes (Antigravity).
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-02T10:01:37Z.
Stability run (oreofr-agent, AI-assisted):
LEONIDA_PORT_JOURNAL=1andLEONIDA_SUBMIT_SENDER=1both on, 1200 s walking after the lift. Series S, RTX 4070 Laptop, main229d352ee. No panic and no device lost, and the game closed cleanly. 24.4 fps over the 1086 s in the world. The sender worked 1.9 ms a frame, and the submitting thread waited 0.05-0.07 ms a frame for it. A/Bs on a 3090 (enlighted-agent) are queued.Imported from ubiquitarianism/leonida. Originally posted by imShangLi on 2026-12-02T10:23:49Z.
VERIFY-3067 — Linux, Fedora 45, no GPU device, no game files, no title
Verdict: PASS with one caveat. The change turns a switch on in the NVIDIA launcher and records the measurement that justified it; the switch exists, is read the way the launcher sets it, and the numbers are the author's (not reproducible here). The caveat: the generated page
d3d12/docs/switches.mdis one line behind — itsLcolumn ("the NVIDIA launcher has an assignment for it") still says the launcher does not set this switch.head
2ce2bafe, baseorigin/main, two files:d3d12/scripts/play-nvidia.ps1(+6) andd3d12/docs/findings.md(one row).1. What it changes
d3d12/scripts/play-nvidia.ps1:188-193— the launcher's settings gainLEONIDA_PORT_JOURNAL = '1', with a comment that records the measurement (2026-12-02, main229d352ee, RTX 4070 Laptop, Series S, walking, in turns of 8 s, two runs of 38 pairs: the frame's median −1.43 ±1.96 and −1.38 ±1.29 ms; the submitting thread −1.29 ±1.65 and −0.79 ±1.03 ms).d3d12/docs/findings.md:646— the row forLEONIDA_PORT_GUARD/LEONIDA_PORT_JOURNALgains the same measurement and the note "on in the launcher since".2. The claims it makes, and which ones I checked
d3d12/crates/leonida-gpu/src/port_journal.rs:131reads it ascrate::ab::bit("LEONIDA_PORT_JOURNAL").is_some(), so the launcher's'1'turns it on, and the code's own doc (port_journal.rs:2,watch.rs:513) says "off by default" — so the launcher is what turns it on ✓. True.d3d12/scripts/play-nvidia.ps1holds the other port switches (LEONIDA_PORT_GUARDat :187,LEONIDA_PORT_DESCRIPTORSat :271) ✓. True.d3d12/docs/switches.mdis one line behind — the page is generated (python -I tools/d3d12_switches.py --out d3d12/docs/switches.md; its own header says "do not edit it by hand. No CI job keeps it up to date"), and its legend says "L: the NVIDIA launcher (d3d12/scripts/play-nvidia.ps1) has an assignment for it". The PR adds such an assignment, so the row atd3d12/docs/switches.md:442is stale: regenerating the page changes exactly that line — theLcolumn becomesyesand the code reference becomesleonida-gpu/port_journal.rs+2. Should-fix (a one-line regeneration). Note that--checkdoes not catch it: it compares the names on the page with the sources, not the columns (tools/d3d12_switches.py:300-311).3. What the tests do here
python3 -I tests/test_d3d12_switches.py— 20 tests, OK (5.4 s).python3 -I -m unittest discover -s tests -p "test_docs_*.py"— 57 tests, OK (37 s).python3 -I scripts/check_no_game_data.py d3d12/scripts/play-nvidia.ps1— clean.python3 -I scripts/red_green.py 3067 --no-cargo --work-dir …— "red not constructible": the pull request changes no test, so there is no red side. (It is a launcher setting and a documentation row.)4. Anything wrong in the change
Only the two points above: the stale sentence in the docs row, and the generated page one line behind. No code problem.
5. What I did not check
pwshhere, so the launcher script was read, not run; the syntax of the added lines is trivial, but the effect of the setting on a real run was not observed.port_journal.rs) was read, not run.AI-assisted: the report was written with MiniMax M3.1 Flash (the pull request's own author says it was written with Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-02T12:53:34Z.
Factorial A/B (oreofr-agent, AI-assisted). Two runs of 900 s,
LEONIDA_AB=8,LEONIDA_SUBMIT_SENDER,LEONIDA_PORT_JOURNAL,LEONIDA_COMPARE_ON_SENDER, so all 8 combinations alternate in the same runs. 229 phases in the world after the lift. Build: maina917c54d6+ #3097. RTX 4070 Laptop, Series S, walking. Phase medians are compared without pairing, so these are noisier than the paired A/Bs in the descriptions:PORT_JOURNAL: -1.04 +-1.91 ms over all phases; -1.47 +-2.99 with the sender on, -0.59 +-2.35 with it off. This agrees with the paired runs.SUBMIT_SENDER: +0.37 +-1.91 over all phases; alone against none -1.43 +-2.99; with the journal on +0.53 +-3.33.COMPARE_ON_SENDER, where it acts (sender on): +2.21 +-2.93. This is the opposite sign of the two paired runs (-1.01, -0.91).Read: the journal's gain holds. The sender's gain is small and not yet clear of noise. The compare-on-sender gain is not established.
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-02T14:15:03Z.
Two more paired A/Bs on current main (main
23a51c494). RTX 4070 Laptop, Series S, walking, 600 s,LEONIDA_AB=8,LEONIDA_PORT_JOURNAL.Waiting for reviews; not merged by me. (oreofr-agent, AI-assisted)
Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-12-02T14:22:05Z.
RUN (independent, RTX 3090) for
LEONIDA_PORT_JOURNAL. RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro (build 26300);main393901a5bbuilt withdiagnostics,mimalloc(targetx86_64-pc-windows-msvc), the launcher's defaults (Series S settings,-NoDlss -NoFrameGen), standing at the save. Since this pull request only turns the switch on in the launcher, the switch was measured onmainby turns inside each run (LEONIDA_AB=8,<switch>), first 60 s after reaching the world left out; differences are ON − OFF over paired phases (negative = faster), ± the standard error of the mean. No crash and no device loss in any run. Background load on this PC during these runs was not low (whole CPU 70-82 %, the game 33-41 %), which the pairing within a run is meant to absorb.AB=8,LEONIDA_PORT_JOURNAL(46 cycles)AB=8,LEONIDA_PORT_JOURNAL,LEONIDA_SUBMIT_SENDER(23 cycles), this switch aloneThe port's own line confirms what it removes: with the switch on, the submitting thread no longer waits for the journal's lock (0.00 ms against 0.26-0.44 ms a frame without it).
Reading for this card: no regression; the submitting thread gains a little (−0.37 ms) but the frame does not move, because on this card the GPU is the limit even at 540 lines (its busy time stays about 27.7 ms a frame at 540 lines as at 1080: the card's time here comes from the commands, not the pixels). That fits OreoFR's −1.16 ms on a card limited by the submitting thread.
AI-assisted: Claude Code (Claude Opus 5.5)
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-02T14:39:01Z.
Inside the full stack:
LEONIDA_SUBMIT_SENDER=1andLEONIDA_COMPARE_ON_SENDER=1on in both phases,LEONIDA_AB=8,LEONIDA_PORT_JOURNAL, two runs of 600 s on current main plus #3097. RTX 4070 Laptop, Series S, walking. Frame median -0.76 +-1.68 and -1.52 +-1.46 ms; submitting thread -0.81 and -1.28. No panic and no device lost. The journal's gain holds with the other two on, so there is no interaction that cancels it. (oreofr-agent, AI-assisted)Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-02T14:48:49Z.
Merging (oreofr-agent, with OreoFR's written OK as maintainer): head
2ce2bafe3cb37c91980aeeb2bee602b1269ff294, mergeable onto mainacc3507455ab10a38e5a49a2c4678a276fbcf31d, CI green. Four paired A/Bs on an RTX 4070 Laptop with no crash; a no-regression check by enlighted-agent on an RTX 3090; a 1200 s stability run with this and the other launcher default both on. It can be turned off with-More(see the description).