Skip unserviceable shader memory fault reports on demand #243

Closed
github-bot wants to merge 1 commit from github-bot/gh-243 into main AGit
Owner

@⁠tommiehansen on GitHub · 2026-12-02 20:30 UTC · original
tommiehansen:experiment/skip-sentinel-memory-faults → main · +77 −1 · 4 files · 1 commits · closed without merging

Bottleneck and change

A shader with a guest address outside the usable page directory reaches the permanently empty last entry. The ordinary missing-page path reports that entry with a store to the fault buffer, although the host will never map it. Repeated reports use the same hash slot, potentially overwriting a recoverable fault. In #23 the sentinel accounted for 27% of the reported misses in one instrumented route. This is a count of reported faults, not a measure of instructions or frame time.

With VICTORY_SKIP_SENTINEL_FAULTS=1, gate the fault-report store on the clamped page differing from the last entry. The null view, its reads and writes, present-page predicate, descriptor selection and guard for inactive lanes are unchanged. Fault-tag and traversal-loop probes keep the original reports even when the flag is set. The enabled shader and prepared-pipeline cache keys differ from the default, so switching it off restores the original behavior.

Validation and hardware testing

The portable shader suite passed, including an IR interpreter test across both switch states, missing and present entries, the sentinel and overflow pages, and a valid page that hashes to the same slot. The Windows target for victory and victory-gpu, including diagnostics and test compilation, passed from macOS with a check-only mimalloc override and the pure Rust BLAKE3 path. git diff --check passed. Hardware benchmarking was unavailable.

Could maintainers test RX 9060 XT 16 GB and RX 9070 XT on the same scenes at native 1920×1080 with RT enabled and frame generation off? Compare render frame-time percentiles and the distant-shadow pass GPU time, check shader ISA for the cost of the new predicate and compare image output. This can only improve frame time if discarded report traffic outweighs the additional predicate; it does not address the source of invalid addresses. Use the regular build for the timing comparison, because instrumented fault-tag or loop-probe shaders keep the original behavior.

**@⁠tommiehansen** on GitHub · 2026-12-02 20:30 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/243) `tommiehansen:experiment/skip-sentinel-memory-faults` → `main` · +77 −1 · 4 files · 1 commits · closed without merging ### Bottleneck and change A shader with a guest address outside the usable page directory reaches the permanently empty last entry. The ordinary missing-page path reports that entry with a store to the fault buffer, although the host will never map it. Repeated reports use the same hash slot, potentially overwriting a recoverable fault. In #23 the sentinel accounted for 27% of the reported misses in one instrumented route. This is a count of reported faults, not a measure of instructions or frame time. With `VICTORY_SKIP_SENTINEL_FAULTS=1`, gate the fault-report store on the clamped page differing from the last entry. The null view, its reads and writes, present-page predicate, descriptor selection and guard for inactive lanes are unchanged. Fault-tag and traversal-loop probes keep the original reports even when the flag is set. The enabled shader and prepared-pipeline cache keys differ from the default, so switching it off restores the original behavior. ### Validation and hardware testing The portable shader suite passed, including an IR interpreter test across both switch states, missing and present entries, the sentinel and overflow pages, and a valid page that hashes to the same slot. The Windows target for `victory` and `victory-gpu`, including diagnostics and test compilation, passed from macOS with a check-only mimalloc override and the pure Rust BLAKE3 path. `git diff --check` passed. Hardware benchmarking was unavailable. Could maintainers test RX 9060 XT 16 GB and RX 9070 XT on the same scenes at native 1920×1080 with RT enabled and frame generation off? Compare render frame-time percentiles and the distant-shadow pass GPU time, check shader ISA for the cost of the new predicate and compare image output. This can only improve frame time if discarded report traffic outweighs the additional predicate; it does not address the source of invalid addresses. Use the regular build for the timing comparison, because instrumented fault-tag or loop-probe shaders keep the original behavior.
All guest addresses beyond the usable directory clamp to its permanently empty last entry. Reporting that entry issues a write to the fault buffer, where it can collide with a recoverable page, without giving the host a mapping it can install.

Add an off-by-default translation setting to skip the report while leaving the null view, lane guards and original return values intact. Retain the report for detailed diagnostics and key the enabled translation separately so experimental code cannot be loaded by an off run.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 20:35:29 +00:00
github-bot closed this pull request 2026-12-02 20:40:57 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.