CPU → GPU: the write-watch round trip (catch → upload → re-lock) #1304
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Imported from fxceless/victory-fork. Originally posted by liuycsbxbxn on 2026-11-26T13:32:32Z.
Split out of #1273.
Suggested labels: performance / memory
Verification cost:
[GPU]What the meta-issue points at
watch.rs(the exception path —writes_as/writing).shadow.rs—refresh_check,copy_stale,copy,copy_changed(meta-issue cites L3411–L3487 on988aa41).watch.rs—open/open_here/protect_here.Acceptance
Imported from fxceless/victory-fork. Originally posted by JayFoxRox on 2026-11-26T16:37:57Z.
Some information was lost in transition from #1273.
When the CPU writes to (the read-only system-RAM copy of) a GPU resource, currently a read-only page exception occurs which eventually triggers a reupload of the CPU side memory to the GPU. However, page-exceptions are slow and the current approach requires unlocking and relocking pages.
The idea is to use https://github.com/fxceless/victory-fork/issues/1305 to handle this (avoiding page exception and page re-locking, which takes 1000x than doing it the proposed way)
Imported from fxceless/victory-fork. Originally posted by liuycsbxbxn on 2026-11-26T17:04:03Z.
Same for the write side - restoring the background the split dropped: the CPU writes into the read-only system-RAM copy, the fault wakes the uploader, and the unlock/relock is what makes it expensive. If #1305 lands, both directions can drop the exception path; #1306 is the read-side counterpart, so the two are one chain rather than two independent tasks.