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

Open
avt0m4t48 wants to merge 2 commits from upstream-pr/946 into main
avt0m4t48 commented 2026-11-25 13:26:54 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by avt0m4t48 on 2026-11-25T13:26:54Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6605544677 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/946). Originally posted by [avt0m4t48](https://github.com/avt0m4t48) on 2026-11-25T13:26:54Z. --- 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.
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/946:upstream-pr/946'
git switch 'upstream-pr/946'

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/946'
git switch 'upstream-pr/946'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/946'
git switch 'upstream-pr/946'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/946'
git switch 'main'
git merge --squash 'upstream-pr/946'
git switch 'main'
git merge --ff-only 'upstream-pr/946'
git switch 'main'
git merge 'upstream-pr/946'
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
fxceless/victory-fork!945
No description provided.