GPU: remember the block where a plain copy faults #946

Open
github-bot wants to merge 2 commits from github-bot/gh-946 into main AGit
Owner

@⁠avt0m4t48 on GitHub · 2026-11-25 13:26 UTC · original
avt0m4t48:fix/plaincopy-fault-block → main · +117 −66 · 1 files · 2 commits · open

With VICTORY_COPY_PLAIN=1, a read that crossed an unmapped block marked both ends of the request as recently faulted. Later reads of either readable end then skipped the fast path. The actual fault could lie in a block the cache never marked.

Use the count left in RCX when REP MOVSB stops to identify the source block that faulted. The cache checks the whole requested span with at most one probe per slot. Intel instruction reference

The baseline test failed when a separate read of the first committed block skipped the fast path. All five plain-copy tests passed with the patch on Windows, including the reserved block between two readable blocks and eight concurrent copying threads. The local MSVC-target test check, asset policy, and 49,152 cache lookup comparisons against a separate model passed. Title performance was not measured. Baseline · Patched tests

AI-assisted using Codex.

**@⁠avt0m4t48** on GitHub · 2026-11-25 13:26 UTC · [original](https://github.com/fxceless/victory-fork/pull/946) `avt0m4t48:fix/plaincopy-fault-block` → `main` · +117 −66 · 1 files · 2 commits · open With `VICTORY_COPY_PLAIN=1`, a read that crossed an unmapped block marked both ends of the request as recently faulted. Later reads of either readable end then skipped the fast path. The actual fault could lie in a block the cache never marked. Use the count left in RCX when `REP MOVSB` stops to identify the source block that faulted. The cache checks the whole requested span with at most one probe per slot. [Intel instruction reference](https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-2b-manual.pdf) The baseline test failed when a separate read of the first committed block skipped the fast path. All five plain-copy tests passed with the patch on Windows, including the reserved block between two readable blocks and eight concurrent copying threads. The local MSVC-target test check, asset policy, and 49,152 cache lookup comparisons against a separate model passed. Title performance was not measured. [Baseline](https://github.com/avt0m4t48/victory-fork/actions/runs/45622212277) · [Patched tests](https://github.com/avt0m4t48/victory-fork/actions/runs/45623017720) AI-assisted using Codex.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:54:24 +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 origin '+refs/pull/946/head:github-bot/gh-946'
git switch 'github-bot/gh-946'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-946'
git switch 'github-bot/gh-946'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-946'
git switch 'github-bot/gh-946'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-946'
git switch 'main'
git merge --squash 'github-bot/gh-946'
git switch 'main'
git merge --ff-only 'github-bot/gh-946'
git switch 'main'
git merge 'github-bot/gh-946'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.