Repository navigation
Conversation
…ettle boykopovar#1441 compares every Windows host import because a driver can mark imported pages written again shortly after the import window (1.2-2 ms on the NVIDIA driver in boykopovar#1434), and those marks dropped GPU results. The comparisons make PPSA22520 spend 6.8 s of every 10 s revalidating resources: about 7.5 FPS instead of 59. Imports stay watched. Each import keeps a copy of its bytes for a settle period (1 s, APS5_IMPORT_SETTLE_MS): a page marked in that period whose bytes still equal the copy is stamped maybe written, like the import window's own marks, and a page whose bytes changed is a CPU store. One walk of the import at the next collect after the period applies the same rule to the rest. An import whose copy would exceed 256 MiB, or 512 MiB with the copies already kept, is compared, as is every import under APS5_IMPORT_SETTLE_MS=0 or APS5_WRITE_WATCH_IMPORTS=unwatch, which is now read on Windows too; =watch keeps plain watching. Unwatching a range or giving it fresh private backing drops its copy. On Windows the DCC first-write test now rewrites the imported block with its own bytes between the import and the write-back, so it reproduces boykopovar#1434 on every driver: it fails in every run with plain watching. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
MarcZX10
left a comment
There was a problem hiding this comment.
I reviewed the full PR and the incremental diff atop its declared dependency #1847. The driver-stamp path now refreshes the settle snapshots, and the regression covers a synchronous driver store followed by a late same-byte mark and a real CPU edit. The reported Linux/Windows checks pass on this stacked head. One integration item remains: the overlap check also lists #1960 in GuestMemory.cpp, but this PR only declares #1847 as a dependency. Please document whether #1953 must be rebased/integrated with #1960, then run checks on the combined final head before merge. The current checks validate the #1847 stack, not a combination with #1960; I am leaving approval open pending that integration evidence.
What
Superseded by #1847 commit 9a4b70f4. The prerequisite now refreshes settle snapshots in
storeOwn's completed-store stamping, covering the synchronous-store gap and paths that do not walk. ItsCheckImportSettleregression includes the same own-store/late-mark case, plus a CPU store after an asynchronous GPU write. Linux and Windows CI pass on that prerequisite head. This follow-up is closed to avoid a duplicate implementation; its branch and the historical validation below are preserved. Direct asynchronous GPU completion-time snapshot refresh remains unimplemented in #1847, as documented there.A synchronous driver write-back during the import settle period changes guest bytes but leaves #1847's settle copy at the old value. A later driver dirty mark over those bytes then compares unequal and is classified as a CPU store, recreating the write-back problem that settling is intended to prevent. This addresses the synchronous-store gap reported at #1847 (comment).
Let Driver walks refresh every overlapping settle copy while retaining the Driver stamp kind. ImportWindow walks retain their existing behavior. Later unchanged pages are classified maybe written; real CPU edits still update the copy and are classified CPU.
Extend CheckImportSettle with a StoreOwnBytes write, a subsequent same-byte dirty mark, and a real CPU edit after that write. TechnicalDebt explicitly records that asynchronous GPU writes notified by MarkWritten do not have completion-time snapshot refresh and still need separate synchronization work.
Depends on #1847, head ec961ed. This branch is based on that PR; its prerequisite changes are part of the upstream diff until #1847 merges. The follow-up itself changes three files with 15 added and two removed lines.
Tested
macOS arm64, AppleClang 17:
GitHub Actions Build run 37872407962 passes on Linux and Windows, including building patched libs. Windows: 488 registered tests, 285 passed and 203 skipped; agc_write_tracking (including the new Windows settle case) and agc_recorder_kept_bytes pass. Linux: 497 registered tests, 472 passed and 25 skipped; the first-write GPU regression passes with the CI software Vulkan driver.
Draft pending Windows GPU validation of the original late-write regressions and affected title performance. Windows GPU tests, including agc_driver_dcc_keys_first_write, were skipped by the CI runner. No physical-hardware execution or frame-rate improvement is claimed for this follow-up. The prerequisite's snapshot caps, settling-time assumption, large-import fallback and import-retirement gap remain.
Checklist