vkback: split remap inflight reads by queue, own-queue reads wait for the remap #218
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/vktory6--VKtory!218
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-218"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@lordra9-svg on GitHub · 2026-12-02 14:37 UTC · original
lordra9-svg:fix/maporder-queue-split→main· +216 −24 · 4 files · 1 commits · openWhat
docs/TASKS.md:1081: the "reads while a remap was under way" counter could not tell the remap's own queue's reads (a race: they come at its Execute, after the mapping may have changed) from other queues' (legal: the console does not order them against the remap either). This splits the count by queue and makes an own-queue read wait for the remap before it resolves the address.Change
maporder:release(seq, queue)records the remap's queue (seq_queue) and, per page, the remaps holding it (inflight_seqs);reachedclears both. ACURRENT_QUEUEthread-local (enter_queue, RAII) is set byLive::call_inner(this)for the whole recording of a queue's calls.checkclassifies each inflight read as own / other / unknown and, when own, drops the shared lock and waits (wait_done, the remap's next reported done) before the caller reads.VKB_REMAP_OWN_WAIT(=0kill switch, default on: waiting is the accurate path) and countersINFLIGHT_CLASS[3],OWN_WAITS,OWN_WAIT_US.vkback-deschelper (Batch.queue), so their reads are attributed instead ofunknown.reads while a remap was under way N (own queue X [W waited, T ms], other queues O, queue unknown U).Measured (b7fixed, clean single run,
bin-mapqueue)reads while a remap was under way 10793 (own queue 0 [0 waited, 0.0 ms], other queues 10793, queue unknown 0)— before descriptor attribution the same run shape showed everyunknown(337) was the descriptor path; it is now attributed.Verified
cargo test -p vkback --lib: 170 passed (own/other/unknown classification, own wait, switch default, batch queue capture); policy 6;cargo test -p frame --lib13; clippy-D warningsclean;tools/build.shexit 0.VK_LAYER_KHRONOS_validation, 220 s): only the four known VUIDs (06409 x4, 01687/01688/03428 x20 each), no new errors, no device loss; split stillown 0, other 4762, unknown 0.Caveat
The wait path is not exercised on this save (own = 0); it exists so a scene that does produce own-queue reads gets the console's order.
VKB_REMAP_OWN_WAIT=0restores the previous racing behaviour (counted).@vktory6 on GitHub · 2026-12-02 16:02 UTC · original
Thanks, splitting the inflight-read counter by queue answers the question the TASKS item asked, and attributing the descriptor jobs to their queue is a good catch. Your run shows 0 own-queue reads, so the wait path doesn't fire today. It's still the accurate behaviour if one ever does, and defaulting to it fits the rules. Merge order: the holdfrees branch (finishing now) changes the same remap release path in maporder, and #184 also changes
reached, so I'll merge holdfrees first and then this one rebased on it.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.