GPU: a bench of preparation over synthetic title memory, with no title or window (host::prepbench) #3820

Open
voidharbor wants to merge 1 commit from upstream-pr/3820 into main
voidharbor commented 2026-11-30 08:22:39 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by voidharbor on 2026-11-30T08:22:39Z.


Refs #2415

What it changes

Preparing a submission (asking the write watch what the title wrote, refreshing the copies, sending them to the card) can today be timed only by playing the title. #2415 measures each change with game runs of 300 to 660 seconds, and the audit says the same in 4.3 (docs/unified-memory-audit.md): "No test drives Host::submit end to end", and victory replay prepares nothing.

This adds two ignored tests in one new file, crates/victory-gpu/src/host/prepbench.rs, that drive that code over synthetic title memory with no title, no window and no game files:

  • host::prepbench::preparation_without_the_title, CPU only: the real Batch::add and Batch::flush, watch::ask_once, the write watch and the guards' fault handler, with copies of the test's own (Shadow::unbacked).
  • host::prepbench::submission_without_the_title: the same frames as host lists of refresh steps, sent through the real Host::submit (Host::execute_own) on the PC's card, with copies the runtime makes (shadow::register, shadow::find). It prints the frame line's split of the submitting thread for each scenario. The crate's tests run with the relay off, and then no submission lands: every send keeps its upload memory and its list, and the split's "card copies" grows to 17 to 34 ms a frame of buffers never given back. So with VICTORY_RELAY unset this test runs itself again in a child process with VICTORY_RELAY=2, the title's default. With the relay off it prints a line saying what that row then measures.

The memory, all made by the test at run time: 3,000 copies of 224 KiB in write-watched private memory; 1,400 copies of 224 KiB in a section shown at two addresses (views of 64 KiB in a placeholder, as the CPU-less pool is, and one alias view), both told to the runtime with title_memory_section and title_memory_view; one 174 MB copy of another section, shown the same two ways. A simulated frame is 30 submissions: the first refreshes every copy, the other 29 refresh 157 random copies each, and the first 20 also the 174 MB copy (8,973 refreshes a frame). Between submissions the test writes 1% of the 64 KiB pages, one 8-byte word each, at the primary address or through the alias. Writes into guarded blocks fault into the runtime's own handler. Six scenarios: nothing written, 1% at the primary address, 1% through the alias, and the same three for the 174 MB copy alone, 20 times a frame.

For each scenario it prints refreshes, refreshes known unchanged, MB looked at, MB compared (VICTORY_SEND_CHANGED=1 only), MB taken into copies, MB that would go up (CPU bench), write faults at primary addresses and through aliases, ms of preparation (mean and best frame), ns per refresh, and copies stale after a last full refresh. Stale must be 0 or the test fails: every copy's CPU side is compared with title memory, and in the card bench a compute pass also compares the card's words of copies in its memory with their CPU sides (upcheck's existing look). Each row is also a CSV line that carries every VICTORY_* variable set, so two runs can be diffed.

How to run it

cargo test --release --locked -p victory-gpu --lib -- --ignored --exact host::prepbench::preparation_without_the_title --nocapture --test-threads=1
cargo test --release --locked -p victory-gpu --lib -- --ignored --exact host::prepbench::submission_without_the_title --nocapture --test-threads=1

or the built test executable with the arguments after --, one bench per process. Each run takes a few seconds and makes about 1.1 GB of title memory and as much again of copies. Switches are read once a process, so an A/B is two runs, with the switch set for the second.

Knobs (the bench's own): VICTORY_PREP_FRAMES (12, of which 2 are warm-up), VICTORY_PREP_PERMILLE (10, that is 1% of pages written a frame), VICTORY_PREP_VIEW_KB (64; 0 for one view), VICTORY_PREP_ONLY (part of a scenario name), VICTORY_PREP_WRITERS (0; threads that keep writing the scenario's memory while submissions are prepared) with VICTORY_PREP_WRITE_US (20). For the card bench, VICTORY_RELAY as above.

Results on this PC

Upstream main 41adb551 with this change. Ryzen 7 9800X3D, RTX 5070 Ti 16 GB, 64 GB DDR5-4800, Windows 11. Release test binary, no switches set (the card bench sets VICTORY_RELAY=2 itself). Median of three runs. ms of preparation a simulated frame, mean of 10 frames, with the best frame in brackets.

Scenario Refreshes a frame CPU bench ms ns a refresh Card bench ms ns a refresh Faults primary / alias MB taken Stale
nothing written 8,973 5.72 (5.22) 638 7.75 (7.22) 864 0 / 0 0 0
1% at the primary address 8,973 7.02 (6.26) 782 9.97 (8.99) 1,111 77 / 0 5.34 0
1% through an alias 8,973 7.46 (6.33) 831 9.66 (8.67) 1,076 0 / 77 5.34 0
174 MB view x20: nothing written 20 0.03 (0.03) 1,643 1.45 (0.71) 72,394 0 / 0 0 0
174 MB view x20: 1% at the primary 20 0.34 (0.27) 16,798 2.91 (1.74) 145,569 28 / 0 1.84 0
174 MB view x20: 1% through an alias 20 0.41 (0.30) 20,392 2.46 (1.91) 122,964 0 / 28 1.84 0

Stale was 0 in every row of every run, with all 4,401 copies checked. Known unchanged: 8,948 and 8,758 of 8,973 (CPU bench), 8,897 and 8,706 (card bench). Faults count only guarded memory; writes to write-watched memory do not fault. In the card bench's full frames, asking is about 5.6 ms of the total, the lists' steps 1.1 to 2.3 ms, card copies under 1 ms and sending 0.7 to 0.9 ms. The PC was doing other work at the time: two CPU runs and three card runs read 20 to 45% higher and were repeated.

What the numbers can and cannot stand for

They can compare the cost of the refresh, write watch and guard code on one memory shape before and after a change: ms and ns a refresh, faults, bytes taken and compared, and whether the copies are still right (the stale check).

They do not model:

  • the title's write pattern: 1% of 64 KiB pages, uniformly random, is a guess (raise VICTORY_PREP_PERMILLE to bracket it);
  • the title's threads writing while a submission is prepared, and the list, heap and landing threads taking the same locks; VICTORY_PREP_WRITERS is a crude stand-in and off by default, so the lock contention #2415 describes is mostly absent here;
  • list threads, and lists from real command streams: no draws, fills, declared shader writes or snapshots;
  • landing of shader writes (the relay is on, but nothing is declared written) and textures;
  • the size of the title's memory: 1.1 GB and 7,686 views here.

So it is a comparator for A/B of that code, not a predictor of frame time in the game. In the card bench the runtime places the copies itself: here all but the 174 MB copy stay in PC memory, so fewer copies have a card side than in the CPU bench (1 against 1,401), and its "MB up" column is 0 because the sends happen inside the submissions.

What it touches

  • crates/victory-gpu/src/host/prepbench.rs: new, test builds only.
  • crates/victory-gpu/src/host.rs: #[cfg(test)] mod prepbench;.
  • crates/victory-gpu/src/shadow.rs: SEND is pub(crate), to read bytes compared without the diagnostics build.
  • crates/victory-gpu/src/host/upcheck.rs: #[cfg(test)] pub(super) fn differs_now, which calls the existing look, for the card bench's check.

Nothing changes in what the runtime does outside tests. All data is synthetic and made by the test.

How it was tested

  • GPU and profile: RTX 5070 Ti 16 GB, Windows 11. No title, no window.
  • Before: nothing could run this. After: both benches, three runs each from the release test binary, as in the table.
  • Built on Linux with cargo xwin for x86_64-pc-windows-msvc. cargo xwin clippy --workspace --all-targets --locked, and the same with --all-features, report the same warnings as main (35 and 41, compared by file and message), none in this change. With -D warnings both stop in victory-shader, whose warnings are the same on main. cargo xwin test --workspace --no-run --locked builds. cargo xwin build --release --locked -p victory builds.
  • cargo xtask policy: one violation, crates/victory-loader/src/heap_sites/frame_users.rs, which is on main and not touched here, so repository_passes_policy fails as it does on main.
  • For shader changes, the wave sizes tested: not a shader change.
  • cargo test for the crate it touches, on Windows (the release test binary of victory-gpu, 4 threads): 920 passed and 62 ignored, the two new tests among the ignored. Two tests fail, and they fail the same way on main 41adb551 without this change: shader_cache::tests::every_switch_of_the_translator_is_in_the_key (every run) and host::card_steps::tests::places_written_after_sending_are_learned (2 of 2 runs on main, 1 of 2 with this change). The two new tests pass when run by name.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #3268 adds synthetic benches of placements and of one sparse buffer (host/bus.rs, host/placement.rs). #3508 (draft) adds profiling switches and a stress harness in shadow.rs. Neither drives preparation over aliased memory or through Host::submit without the title.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5561636427 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3820). Originally posted by [voidharbor](https://github.com/voidharbor) on 2026-11-30T08:22:39Z. --- Refs #2415 ## What it changes Preparing a submission (asking the write watch what the title wrote, refreshing the copies, sending them to the card) can today be timed only by playing the title. #2415 measures each change with game runs of 300 to 660 seconds, and the audit says the same in 4.3 (`docs/unified-memory-audit.md`): "No test drives `Host::submit` end to end", and `victory replay` prepares nothing. This adds two ignored tests in one new file, `crates/victory-gpu/src/host/prepbench.rs`, that drive that code over synthetic title memory with no title, no window and no game files: - `host::prepbench::preparation_without_the_title`, CPU only: the real `Batch::add` and `Batch::flush`, `watch::ask_once`, the write watch and the guards' fault handler, with copies of the test's own (`Shadow::unbacked`). - `host::prepbench::submission_without_the_title`: the same frames as host lists of refresh steps, sent through the real `Host::submit` (`Host::execute_own`) on the PC's card, with copies the runtime makes (`shadow::register`, `shadow::find`). It prints the frame line's split of the submitting thread for each scenario. The crate's tests run with the relay off, and then no submission lands: every send keeps its upload memory and its list, and the split's "card copies" grows to 17 to 34 ms a frame of buffers never given back. So with `VICTORY_RELAY` unset this test runs itself again in a child process with `VICTORY_RELAY=2`, the title's default. With the relay off it prints a line saying what that row then measures. The memory, all made by the test at run time: 3,000 copies of 224 KiB in write-watched private memory; 1,400 copies of 224 KiB in a section shown at two addresses (views of 64 KiB in a placeholder, as the CPU-less pool is, and one alias view), both told to the runtime with `title_memory_section` and `title_memory_view`; one 174 MB copy of another section, shown the same two ways. A simulated frame is 30 submissions: the first refreshes every copy, the other 29 refresh 157 random copies each, and the first 20 also the 174 MB copy (8,973 refreshes a frame). Between submissions the test writes 1% of the 64 KiB pages, one 8-byte word each, at the primary address or through the alias. Writes into guarded blocks fault into the runtime's own handler. Six scenarios: nothing written, 1% at the primary address, 1% through the alias, and the same three for the 174 MB copy alone, 20 times a frame. For each scenario it prints refreshes, refreshes known unchanged, MB looked at, MB compared (`VICTORY_SEND_CHANGED=1` only), MB taken into copies, MB that would go up (CPU bench), write faults at primary addresses and through aliases, ms of preparation (mean and best frame), ns per refresh, and copies stale after a last full refresh. Stale must be 0 or the test fails: every copy's CPU side is compared with title memory, and in the card bench a compute pass also compares the card's words of copies in its memory with their CPU sides (`upcheck`'s existing `look`). Each row is also a CSV line that carries every `VICTORY_*` variable set, so two runs can be diffed. ## How to run it ``` cargo test --release --locked -p victory-gpu --lib -- --ignored --exact host::prepbench::preparation_without_the_title --nocapture --test-threads=1 cargo test --release --locked -p victory-gpu --lib -- --ignored --exact host::prepbench::submission_without_the_title --nocapture --test-threads=1 ``` or the built test executable with the arguments after `--`, one bench per process. Each run takes a few seconds and makes about 1.1 GB of title memory and as much again of copies. Switches are read once a process, so an A/B is two runs, with the switch set for the second. Knobs (the bench's own): `VICTORY_PREP_FRAMES` (12, of which 2 are warm-up), `VICTORY_PREP_PERMILLE` (10, that is 1% of pages written a frame), `VICTORY_PREP_VIEW_KB` (64; 0 for one view), `VICTORY_PREP_ONLY` (part of a scenario name), `VICTORY_PREP_WRITERS` (0; threads that keep writing the scenario's memory while submissions are prepared) with `VICTORY_PREP_WRITE_US` (20). For the card bench, `VICTORY_RELAY` as above. ## Results on this PC Upstream main 41adb551 with this change. Ryzen 7 9800X3D, RTX 5070 Ti 16 GB, 64 GB DDR5-4800, Windows 11. Release test binary, no switches set (the card bench sets `VICTORY_RELAY=2` itself). Median of three runs. ms of preparation a simulated frame, mean of 10 frames, with the best frame in brackets. | Scenario | Refreshes a frame | CPU bench ms | ns a refresh | Card bench ms | ns a refresh | Faults primary / alias | MB taken | Stale | |---|---:|---:|---:|---:|---:|---:|---:|---:| | nothing written | 8,973 | 5.72 (5.22) | 638 | 7.75 (7.22) | 864 | 0 / 0 | 0 | 0 | | 1% at the primary address | 8,973 | 7.02 (6.26) | 782 | 9.97 (8.99) | 1,111 | 77 / 0 | 5.34 | 0 | | 1% through an alias | 8,973 | 7.46 (6.33) | 831 | 9.66 (8.67) | 1,076 | 0 / 77 | 5.34 | 0 | | 174 MB view x20: nothing written | 20 | 0.03 (0.03) | 1,643 | 1.45 (0.71) | 72,394 | 0 / 0 | 0 | 0 | | 174 MB view x20: 1% at the primary | 20 | 0.34 (0.27) | 16,798 | 2.91 (1.74) | 145,569 | 28 / 0 | 1.84 | 0 | | 174 MB view x20: 1% through an alias | 20 | 0.41 (0.30) | 20,392 | 2.46 (1.91) | 122,964 | 0 / 28 | 1.84 | 0 | Stale was 0 in every row of every run, with all 4,401 copies checked. Known unchanged: 8,948 and 8,758 of 8,973 (CPU bench), 8,897 and 8,706 (card bench). Faults count only guarded memory; writes to write-watched memory do not fault. In the card bench's full frames, asking is about 5.6 ms of the total, the lists' steps 1.1 to 2.3 ms, card copies under 1 ms and sending 0.7 to 0.9 ms. The PC was doing other work at the time: two CPU runs and three card runs read 20 to 45% higher and were repeated. ## What the numbers can and cannot stand for They can compare the cost of the refresh, write watch and guard code on one memory shape before and after a change: ms and ns a refresh, faults, bytes taken and compared, and whether the copies are still right (the stale check). They do not model: - the title's write pattern: 1% of 64 KiB pages, uniformly random, is a guess (raise `VICTORY_PREP_PERMILLE` to bracket it); - the title's threads writing while a submission is prepared, and the list, heap and landing threads taking the same locks; `VICTORY_PREP_WRITERS` is a crude stand-in and off by default, so the lock contention #2415 describes is mostly absent here; - list threads, and lists from real command streams: no draws, fills, declared shader writes or snapshots; - landing of shader writes (the relay is on, but nothing is declared written) and textures; - the size of the title's memory: 1.1 GB and 7,686 views here. So it is a comparator for A/B of that code, not a predictor of frame time in the game. In the card bench the runtime places the copies itself: here all but the 174 MB copy stay in PC memory, so fewer copies have a card side than in the CPU bench (1 against 1,401), and its "MB up" column is 0 because the sends happen inside the submissions. ## What it touches - `crates/victory-gpu/src/host/prepbench.rs`: new, test builds only. - `crates/victory-gpu/src/host.rs`: `#[cfg(test)] mod prepbench;`. - `crates/victory-gpu/src/shadow.rs`: `SEND` is `pub(crate)`, to read bytes compared without the diagnostics build. - `crates/victory-gpu/src/host/upcheck.rs`: `#[cfg(test)] pub(super) fn differs_now`, which calls the existing `look`, for the card bench's check. Nothing changes in what the runtime does outside tests. All data is synthetic and made by the test. ## How it was tested - GPU and profile: RTX 5070 Ti 16 GB, Windows 11. No title, no window. - Before: nothing could run this. After: both benches, three runs each from the release test binary, as in the table. - Built on Linux with `cargo xwin` for `x86_64-pc-windows-msvc`. `cargo xwin clippy --workspace --all-targets --locked`, and the same with `--all-features`, report the same warnings as main (35 and 41, compared by file and message), none in this change. With `-D warnings` both stop in victory-shader, whose warnings are the same on main. `cargo xwin test --workspace --no-run --locked` builds. `cargo xwin build --release --locked -p victory` builds. - `cargo xtask policy`: one violation, `crates/victory-loader/src/heap_sites/frame_users.rs`, which is on main and not touched here, so `repository_passes_policy` fails as it does on main. - For shader changes, the wave sizes tested: not a shader change. - `cargo test` for the crate it touches, on Windows (the release test binary of `victory-gpu`, 4 threads): 920 passed and 62 ignored, the two new tests among the ignored. Two tests fail, and they fail the same way on main 41adb551 without this change: `shader_cache::tests::every_switch_of_the_translator_is_in_the_key` (every run) and `host::card_steps::tests::places_written_after_sending_are_learned` (2 of 2 runs on main, 1 of 2 with this change). The two new tests pass when run by name. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #3268 adds synthetic benches of placements and of one sparse buffer (`host/bus.rs`, `host/placement.rs`). #3508 (draft) adds profiling switches and a stress harness in `shadow.rs`. Neither drives preparation over aliased memory or through `Host::submit` without the title.
gabrielecabrini commented 2026-11-30 19:11:30 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by gabrielecabrini on 2026-11-30T19:11:30Z.


Ran both benches on Linux under Proton (vkd3d-proton), to give the comparator a second platform. Both pass, and stale is 0 in every row of every run. Two things came up: in the card bench, the runtime under Proton handles the section-backed copies differently, so three of its rows measure nothing there; and the bench doesn't reproduce the write-watch cost I see in game under Wine.

Setup: i5-14600KF (20 logical processors), 31 GB RAM, RTX 4070 SUPER 12 GB, NVIDIA 620.73.04, Arch Linux, Proton Experimental 11.0-20261123b (vkd3d-proton vkd3d-1.1-5776-g30b0eb9bc). This PR merged onto main e1251c31, test exe cross-built with cargo xwin, run with Proton's wine and WINEDLLOVERRIDES="d3d12=n;d3d12core=n;dxgi=n". No switches except VICTORY_DXC (pointing at a dxcompiler.dll) for the card bench, which sets VICTORY_RELAY=2 itself. Three runs each, medians below. Runs agreed within a few percent.

CPU bench (preparation_without_the_title)

Scenario Refreshes Proton ms (best) ns a refresh Faults primary / alias MB taken Title writes ms (13th field) Your Windows ms
nothing written 8,973 2.35 (2.32) 262 0 / 0 0 0.002 5.72
1% at the primary address 8,973 4.07 (3.86) 454 77 / 0 5.34 0.452 7.02
1% through an alias 8,973 3.85 (3.71) 429 0 / 77 5.34 0.371 7.46
174 MB view x20: nothing written 20 0.05 (0.05) 2,422 0 / 0 0 0.001 0.03
174 MB view x20: 1% at the primary 20 0.79 (0.78) 39,484 28 / 0 1.84 0.121 0.34
174 MB view x20: 1% through an alias 20 0.77 (0.76) 38,592 0 / 28 1.84 0.096 0.41

Known unchanged: 8,948 and 8,758, as on Windows. Different CPUs, so the Windows column is a reference, not an A/B. Under Wine a guard fault costs about 4 to 6 µs of the title's write time (0.452 ms for 77, 0.121 for 28). The 174 MB rows with writes take 2.3x the Windows time. The rest is faster here than in your table.

Card bench (submission_without_the_title)

On Windows the header has 1 copy with a card side and every CPU side checked (your text: "1 against 1,401"). Under Proton it says:

prepcard: 4401 copies (0 with a card side, 3000 with a CPU side checked for staleness), 7686 views ...

So the 1,401 section-backed copies (the 1,400 and the 174 MB one) get neither side here. In the 174 MB rows nothing is refreshed even with 1% written (20 of 20 unchanged, 0 MB taken, 0 faults). In the full frames only the write-watched copies are taken (0.42 MB, against 5.34 in the CPU bench), and there are no faults. Stale stays 0, but it covers 3,000 copies only.

Scenario Proton ms (best) ns a refresh Asking Lists' steps (refreshes) Sending Your Windows ms
nothing written 3.00 (2.92) 334 1.98 0.84 (0.33) 0.06 7.75
1% at the primary address 3.33 (3.22) 371 2.19 0.89 (0.39) 0.06 9.97
1% through an alias 3.32 (3.23) 370 2.19 0.92 (0.41) 0.06 9.66
174 MB view x20 (all three) 0.15 to 0.16 n/a 0.00 0.02 0.02 1.45 to 2.91

I haven't looked into why the runtime leaves the section copies unregistered under Proton. A suggestion: the card bench could fail, or print a warning, when a scenario's copies have no side. Then a row that measures nothing can't pass silently on another platform.

What it doesn't show under Wine

In game on the same PC (Series S, release build of main 84bd61e2, same switches as the launcher), the submitting thread's split has "asking the write watch" at a median of 10.4 ms a frame (8 to 18), against about 2 ms here. The bench has 7,686 views. In game the runtime's process-memory line reports about 74,500 regions. docs/linux-proton.md (the view-tree section) says the stock Wine server walks a list of all the process's views on every map and unmap (Wine bug 60868). I suspect the gap comes from the view count, not the per-refresh work. But I haven't measured it, and I don't know whether the write-watch queries go through the same walk. A knob that adds idle views or regions around the bench's memory would test it, and would let the bench reproduce the Wine case.

Not tested: Windows on this PC, VICTORY_PREP_WRITERS, other VICTORY_PREP_PERMILLE values.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7288987457 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3820#issuecomment-7288987457). Originally posted by [gabrielecabrini](https://github.com/gabrielecabrini) on 2026-11-30T19:11:30Z. --- Ran both benches on Linux under Proton (vkd3d-proton), to give the comparator a second platform. Both pass, and stale is 0 in every row of every run. Two things came up: in the card bench, the runtime under Proton handles the section-backed copies differently, so three of its rows measure nothing there; and the bench doesn't reproduce the write-watch cost I see in game under Wine. **Setup:** i5-14600KF (20 logical processors), 31 GB RAM, RTX 4070 SUPER 12 GB, NVIDIA 620.73.04, Arch Linux, Proton Experimental 11.0-20261123b (vkd3d-proton `vkd3d-1.1-5776-g30b0eb9bc`). This PR merged onto main e1251c31, test exe cross-built with `cargo xwin`, run with Proton's `wine` and `WINEDLLOVERRIDES="d3d12=n;d3d12core=n;dxgi=n"`. No switches except `VICTORY_DXC` (pointing at a `dxcompiler.dll`) for the card bench, which sets `VICTORY_RELAY=2` itself. Three runs each, medians below. Runs agreed within a few percent. ### CPU bench (`preparation_without_the_title`) | Scenario | Refreshes | Proton ms (best) | ns a refresh | Faults primary / alias | MB taken | Title writes ms (13th field) | Your Windows ms | |---|---:|---:|---:|---:|---:|---:|---:| | nothing written | 8,973 | 2.35 (2.32) | 262 | 0 / 0 | 0 | 0.002 | 5.72 | | 1% at the primary address | 8,973 | 4.07 (3.86) | 454 | 77 / 0 | 5.34 | 0.452 | 7.02 | | 1% through an alias | 8,973 | 3.85 (3.71) | 429 | 0 / 77 | 5.34 | 0.371 | 7.46 | | 174 MB view x20: nothing written | 20 | 0.05 (0.05) | 2,422 | 0 / 0 | 0 | 0.001 | 0.03 | | 174 MB view x20: 1% at the primary | 20 | 0.79 (0.78) | 39,484 | 28 / 0 | 1.84 | 0.121 | 0.34 | | 174 MB view x20: 1% through an alias | 20 | 0.77 (0.76) | 38,592 | 0 / 28 | 1.84 | 0.096 | 0.41 | Known unchanged: 8,948 and 8,758, as on Windows. Different CPUs, so the Windows column is a reference, not an A/B. Under Wine a guard fault costs about 4 to 6 µs of the title's write time (0.452 ms for 77, 0.121 for 28). The 174 MB rows with writes take 2.3x the Windows time. The rest is faster here than in your table. ### Card bench (`submission_without_the_title`) On Windows the header has 1 copy with a card side and every CPU side checked (your text: "1 against 1,401"). Under Proton it says: ``` prepcard: 4401 copies (0 with a card side, 3000 with a CPU side checked for staleness), 7686 views ... ``` So the 1,401 section-backed copies (the 1,400 and the 174 MB one) get neither side here. In the 174 MB rows nothing is refreshed even with 1% written (20 of 20 unchanged, 0 MB taken, 0 faults). In the full frames only the write-watched copies are taken (0.42 MB, against 5.34 in the CPU bench), and there are no faults. Stale stays 0, but it covers 3,000 copies only. | Scenario | Proton ms (best) | ns a refresh | Asking | Lists' steps (refreshes) | Sending | Your Windows ms | |---|---:|---:|---:|---:|---:|---:| | nothing written | 3.00 (2.92) | 334 | 1.98 | 0.84 (0.33) | 0.06 | 7.75 | | 1% at the primary address | 3.33 (3.22) | 371 | 2.19 | 0.89 (0.39) | 0.06 | 9.97 | | 1% through an alias | 3.32 (3.23) | 370 | 2.19 | 0.92 (0.41) | 0.06 | 9.66 | | 174 MB view x20 (all three) | 0.15 to 0.16 | n/a | 0.00 | 0.02 | 0.02 | 1.45 to 2.91 | I haven't looked into why the runtime leaves the section copies unregistered under Proton. A suggestion: the card bench could fail, or print a warning, when a scenario's copies have no side. Then a row that measures nothing can't pass silently on another platform. ### What it doesn't show under Wine In game on the same PC (Series S, release build of main 84bd61e2, same switches as the launcher), the submitting thread's split has "asking the write watch" at a median of 10.4 ms a frame (8 to 18), against about 2 ms here. The bench has 7,686 views. In game the runtime's process-memory line reports about 74,500 regions. `docs/linux-proton.md` (the view-tree section) says the stock Wine server walks a list of all the process's views on every map and unmap (Wine bug 60868). I suspect the gap comes from the view count, not the per-refresh work. But I haven't measured it, and I don't know whether the write-watch queries go through the same walk. A knob that adds idle views or regions around the bench's memory would test it, and would let the bench reproduce the Wine case. **Not tested:** Windows on this PC, `VICTORY_PREP_WRITERS`, other `VICTORY_PREP_PERMILLE` values.
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/3820:upstream-pr/3820'
git switch 'upstream-pr/3820'

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 'upstream-pr/3820'
git switch 'upstream-pr/3820'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3820'
git switch 'upstream-pr/3820'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3820'
git switch 'main'
git merge --squash 'upstream-pr/3820'
git switch 'main'
git merge --ff-only 'upstream-pr/3820'
git switch 'main'
git merge 'upstream-pr/3820'
git push origin 'main'
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
trustno1-coder/VIctory-NVIDIA!3820
No description provided.