maporder: split the inflight-read counter by path #128

Manually merged
github merged 2 commits from github-bot/gh-128 into gh-pr/128/base 2026-12-01 18:39:41 +00:00 AGit
Owner

@⁠TheRifai on GitHub · 2026-12-01 18:04 UTC · original
TheRifai:maporder-split → main · +32 −16 · 5 files · 2 commits · merged 2026-12-01 18:35 UTC

What

The reads while a remap was under way counter in maporder.rs did not distinguish the work that raced with the remapper. It is now split by the path that resolved the address: copy source, copy destination, texture fill, title-memory write, descriptor write (docs/TASKS.md "Reads of pages while their remap is under way"). The stats line prints all five and their sum. No behaviour changes.

The reference

No console counterpart: this is a rule-32 counter. The task asks for a queue split first; path-by-path is the step before that, since the call sites already know what they are doing.

Evidence

  • cargo check -p vkback --all-targets and all 155 native tests pass; build succeeds.
  • House-save camera walk (150 s, GE-Proton11-16): inflight by path: copy-src 0, copy-dst 0, fill 4509, title-write 0, descriptor 0. So the hits are the CPU read that prepares a texture fill's byte runs (fill.rs:336), not the renderer's descriptor/slot reads at Execute — the specific race the task was worried about does not appear in this run.
  • Run: /tmp/opencode/capture/maporder-split/runs/20261201-190022.

Checklist (docs/AGENTS.md)

  • One topic; docs/TASKS.md not edited (rule 29/31)
  • No fallback, constants, switches, queues, unsafe or translator output changed (rules 2/9b/33/35/36/27)
  • Comments say what is true now (rule 3)
  • Nothing from the title, no non-free data pointers (hard constraints)
**@⁠TheRifai** on GitHub · 2026-12-01 18:04 UTC · [original](https://github.com/vktory6/VKtory/pull/128) `TheRifai:maporder-split` → `main` · +32 −16 · 5 files · 2 commits · merged 2026-12-01 18:35 UTC ## What The `reads while a remap was under way` counter in `maporder.rs` did not distinguish the work that raced with the remapper. It is now split by the path that resolved the address: copy source, copy destination, texture fill, title-memory write, descriptor write (docs/TASKS.md "Reads of pages while their remap is under way"). The stats line prints all five and their sum. No behaviour changes. ## The reference No console counterpart: this is a rule-32 counter. The task asks for a queue split first; path-by-path is the step before that, since the call sites already know what they are doing. ## Evidence - `cargo check -p vkback --all-targets` and all 155 native tests pass; build succeeds. - House-save camera walk (150 s, GE-Proton11-16): `inflight by path: copy-src 0, copy-dst 0, fill 4509, title-write 0, descriptor 0`. So the hits are the CPU read that prepares a texture fill's byte runs (`fill.rs:336`), not the renderer's descriptor/slot reads at Execute — the specific race the task was worried about does not appear in this run. - Run: `/tmp/opencode/capture/maporder-split/runs/20261201-190022`. ## Checklist (docs/AGENTS.md) - [x] One topic; `docs/TASKS.md` not edited (rule 29/31) - [x] No fallback, constants, switches, queues, `unsafe` or translator output changed (rules 2/9b/33/35/36/27) - [x] Comments say what is true now (rule 3) - [x] Nothing from the title, no non-free data pointers (hard constraints)
The 'reads while a remap was under way' counter did not say which work raced
with the remapper. Split it into copy source/destination, texture fill, title
write and descriptor write (rule 32). A house walk with a camera script shows
all 4,509 hits in the texture-fill path: the CPU read that prepares a fill's
byte runs (fill.rs:336), none in descriptor/slot reads. That is the first step
toward the queue split in docs/TASKS.md.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 18:08:08 +00:00
The third bucket counts every TitleMemory::locate_span caller (buffer views and arguments through span(),
landings, exact copies, write-backs), not title-memory writes. A texture fill counted its whole range as
FILL and then each byte run again through locate_span; the runs now locate without counting. The index
slots read at Execute do not go through check(), which the comment now says.
github-bot changed target branch from main to gh-pr/128/base 2026-12-01 18:39:39 +00:00
github manually merged commit 711961db88 into gh-pr/128/base 2026-12-01 18:39:41 +00:00
Author
Owner

@⁠vktory6 on GitHub · 2026-12-01 18:35 UTC · original

Merged, thanks! Splitting by path is a useful step before the queue split.

I pushed one commit (711961d) before merging:

  • The third bucket counts more than writes. It counts every TitleMemory::locate_span caller: buffer views and indirect arguments through span(), landings, exact copies and write-backs. So it's named "other spans" now.
  • A texture fill was counted twice. A fill counted its whole range as fill, then each byte run again through locate_span. The byte runs now locate without counting.

One thing to keep in mind when reading your result: the index slots read at Execute don't go through check() at all, and the comment says so now. So descriptor 0 doesn't yet show that the own-queue slot-read race is absent. Instrumenting the slot reads is the next step of the task ("Reads of pages while their remap is under way").

**@⁠vktory6** on GitHub · 2026-12-01 18:35 UTC · [original](https://github.com/vktory6/VKtory/pull/128#issuecomment-7321189278) Merged, thanks! Splitting by path is a useful step before the queue split. I pushed one commit (711961d) before merging: - **The third bucket counts more than writes.** It counts every `TitleMemory::locate_span` caller: buffer views and indirect arguments through `span()`, landings, exact copies and write-backs. So it's named "other spans" now. - **A texture fill was counted twice.** A fill counted its whole range as `fill`, then each byte run again through `locate_span`. The byte runs now locate without counting. One thing to keep in mind when reading your result: the index slots read at `Execute` don't go through `check()` at all, and the comment says so now. So `descriptor 0` doesn't yet show that the own-queue slot-read race is absent. Instrumenting the slot reads is the next step of the task ("Reads of pages while their remap is under way").
This discussion has been locked. Commenting is limited to contributors.
No description provided.