Fix #2503: tell GPU write watch before DirectStorage page writes #3058

Closed
tharun-37 wants to merge 1 commit from upstream-pr/3060 into main
tharun-37 commented 2026-11-26 05:50:40 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by tharun-37 on 2026-11-26T05:50:40Z.


write_physical and PageWindow called kernel_will_write (watch::writing) after writing through our own views. The watch must be told before the write so it saves the page's original bytes and keeps the guarded blocks open during the write.

Now report_written returns Writing guards that stay alive during the write, write_physical reports current views after the write, and PageWindow holds pre-write guards until dropped and reports views currently showing the pages on drop.

Fixes #2503.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6620456583 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3060). Originally posted by [tharun-37](https://github.com/tharun-37) on 2026-11-26T05:50:40Z. --- write_physical and PageWindow called kernel_will_write (watch::writing) after writing through our own views. The watch must be told before the write so it saves the page's original bytes and keeps the guarded blocks open during the write. Now report_written returns Writing guards that stay alive during the write, write_physical reports current views after the write, and PageWindow holds pre-write guards until dropped and reports views currently showing the pages on drop. Fixes #2503.
upstream-sync closed this pull request 2026-11-26 06:03:35 +00:00
kotekompotek commented 2026-11-26 06:03:35 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-26T05:58:52Z.

Review: APPROVED


Verified: this is the same bug #3037 fixes (kernel_will_write guards dropped before the write, so the watch never covered it), and this version additionally keeps the post-write report at current views — a page remapped to a new title view mid-write still gets reported, which holding only pre-write guards misses. Drop ordering is explicit and correct in both write_physical and PageWindow::drop. Maintainer note: conflicts with #3037 on the same functions — whichever merges second needs rebasing; this one covers a case #3037 doesn't.

<!-- greyfinch-sync:Marvisak/VIctory:review:6069229644 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3060#pullrequestreview-6069229644). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-26T05:58:52Z. **Review:** APPROVED --- Verified: this is the same bug #3037 fixes (kernel_will_write guards dropped before the write, so the watch never covered it), and this version additionally keeps the post-write report at *current* views — a page remapped to a new title view mid-write still gets reported, which holding only pre-write guards misses. Drop ordering is explicit and correct in both write_physical and PageWindow::drop. Maintainer note: conflicts with #3037 on the same functions — whichever merges second needs rebasing; this one covers a case #3037 doesn't.
tharun-37 commented 2026-11-26 06:03:49 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by tharun-37 on 2026-11-26T05:51:54Z.


Don't create new PRs; continuing on #3037

<!-- greyfinch-sync:Marvisak/VIctory:comment:7183874634 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3060#issuecomment-7183874634). Originally posted by [tharun-37](https://github.com/tharun-37) on 2026-11-26T05:51:54Z. --- Don't create new PRs; continuing on #3037

Pull request closed

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
Marvisak/VIctory!3058
No description provided.