Repository navigation
fix(agc): compare pending storage results over a surface whose page walk fails - #12792
EagleBearerYS wants to merge 17 commits into
Conversation
…alk fails A page walk that stops part way reports the rest of its range as written by the CPU and leaves the range watched, so the collect of the surface returns 0 while every block reads as a CPU store newer than the units' generations. The refresh then dropped the pending 64 KiB units holding GPU results, re-uploaded them from guest memory and printed "guest memory changed while GPU results were pending"; the write-back left the same blocks to the CPU. When the surface's own collect fails, the refresh and the write-back now take the untracked path and compare the guest bytes with the ones saved at the upload or the previous store, as for memory outside the watch. Co-authored-by: Tharun Balaji K <239791575+sktharunbalaji13-cmd@users.noreply.github.com>
|
@EagleBearerYS thanks, the change is narrow: only a watched surface whose own walk fails now takes the existing compare path. Two independent reviews; one correctness point and one test point.
Please retain confirmed CPU-write provenance from successfully walked pages/blocks while separating synthetic failure stamps, or use an equivalently sound rule. Add the same-value-store case with an unrelated later failed page. Please cover both Refresh and direct write-back without a preceding Refresh resolving the state. The current distinct-value CPU edit in another block does not discriminate this case. Windows production-path coverage is also needed; the new executable currently skips there.
|
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
@oneandonlydean Thank you for the insightful and precise review! Both points are spot-on. Here is the architectural breakdown and the concrete plan to address both points cleanly: 1. Retaining Confirmed CPU-Write Provenance vs. Synthetic Failure StampsThe Root Cause of the InversionIn GuestWriteWatch.cpp (scanWritten), when ioctl(_pagemap, PAGEMAP_SCAN, ...) returns < 0 at cursor < end: Because commit 7664a30 treated the entire surface as untracked whenever current == 0 (or !walked), falling back to compareUntracked against original caused a same-value CPU store ( \to A$) in a successfully walked block ($[begin, cursor)$) to evaluate as BlockUnchanged. The watch evidence was discarded, allowing pending GPU result $ to survive over the CPU store. Proposed Resolution
2. Windows Coverage & Test Harness
|
✅ NVIDIA GPU test: passedPR head
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (4, not counted against this PR)Validated but not compared (1, not in the main baseline's validation pass)Validation IDs already present on main (4 IDs in 475 tests)Skipped (44)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
# Conflicts: # docs/dev/debt/libSceAgcDriver.md
✅ NVIDIA GPU test: passedPR head
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Validated but not compared (1, not in the main baseline's validation pass)Validation IDs already present on main (4 IDs in 497 tests)Skipped (45)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
|
AMD RDNA 2 on RADV, which the Tested section and the later runs here don't cover (lavapipe and NVIDIA). No regression, and the new test goes from red to green on this GPU. This run doesn't bear on the open points from the 2026-10-29 review; details below. Setup: RX 6700 XT ( Commits: head
New test:
What this doesn't cover:
Same on both sides, unrelated to this PR: AI-assisted: yes |
mashingaan
left a comment
There was a problem hiding this comment.
The current head still has the same-value CPU-store loss described in the earlier issue review. The new test only writes a distinct value in another block, so it does not exercise the case where the guest bytes equal the saved baseline but a real CPU store must still win. Please preserve successful CPU-write provenance across a later failed page walk, or otherwise distinguish confirmed writes from synthetic failure stamps, and cover both Refresh and direct write-back.
| if (!tracked) awaitStoredSave(nullptr); | ||
| tracked = current != 0 && GuestMemory::ChangedBlocks(descriptor.baseAddress, static_cast<std::size_t>(guestBytes), generations, stampedBlocks, cpuBlocks); | ||
| if (!tracked) { | ||
| std::fill(stampedBlocks.begin(), stampedBlocks.end(), GuestMemory::BlockWritten); |
There was a problem hiding this comment.
On a partial walk failure, this marks every block as written. compareUntracked then has to infer CPU writes from byte differences against the saved snapshot. If the CPU really stores the same value as the snapshot to a block with a pending GPU result, that comparison cannot see the store, and the GPU result can overwrite it. Please retain the confirmed write-watch stamps for the successfully walked part and distinguish them from the synthetic stamps for the failed part.
XairRrR
left a comment
There was a problem hiding this comment.
Reviewed — changes requested
The fix builds, the new test passes and fails on main's Texture.cpp, but I reproduced the open same-value-store point. When the walk fails on a later page, GPU results overwrite a CPU store that the successful part of the walk had recorded. The path that walks the whole surface keeps that store.
What I ran
Head 5e106c566dda63169ca2accc08b7b0008994918d, main 9090972b7e91fd266819cbd77a8b058e177b5682, merged tree d50c2a238617b5054bb243dbd17474bd57ec10db. Debian 13 VM, Xeon Gold 6136, GCC 14.2.0, lavapipe (Mesa 26.1.6, LLVM 19), Release.
git diff --check 9090972b7e91fd266819cbd77a8b058e177b5682...5e106c566dda63169ca2accc08b7b0008994918d
python3 tools/check_conventions.py --base 9090972b7e91fd266819cbd77a8b058e177b5682
ctest --test-dir build -R '^agc_driver_pending_untracked_layer$' --repeat until-fail:3 --output-on-failure
build/tests/agc_driver_pending_untracked_layer_tests
# negative control
git show 9090972b7e91fd266819cbd77a8b058e177b5682:core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp > core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
ninja -C build agc_driver_pending_untracked_layer_tests
build/tests/agc_driver_pending_untracked_layer_tests # x3
# same-value probe (temporary local edit of the test, merged Texture.cpp)
ninja -C build agc_driver_pending_untracked_layer_tests
build/tests/agc_driver_pending_untracked_layer_tests # x3
# restore merged files, rebuild, rerun, git status --porcelain (clean)
Results
| Check | Result |
|---|---|
git diff --check |
clean |
check_conventions.py |
passed |
| Build (script) and the tests it selected | 2033 ran, 0 new failures, 0 timeouts; the 7 known failures also fail on main |
| Vulkan validation comparison (script) | 758 tests, layer loaded in 757 and missing in none, 0 new VUIDs |
agc_driver_pending_untracked_layer (merged) |
passed 3/3, about 0.6 s; all four cases ran (no not run line) |
Negative control (main's Texture.cpp) |
failed 3/3 |
| Same-value CPU store probe | the CPU store is lost when the walk fails (see below) |
Negative control output (each of 3 runs)
[pending untracked layer] results over a surface whose walk fails: the image holds 0 of 8 results, guest memory 0, CPU words 0, CPU write reported 1
[pending untracked layer] results and a CPU store over a surface whose walk fails: the image holds 0 of 8 results, guest memory 0, CPU words 1, CPU write reported 1
AGC graphics: pending storage results or a CPU store over a write-watched surface were lost
exit=1
Same-value probe output (identical in 3 of 3 runs)
What the probe does: after the first store (guest holds Stored, which is also the saved baseline), the StoreAgainCode result is held pending. The CPU then stores Stored again to the first result word, in block 0, and Refresh runs. One case remaps the block 3 page (LoseWalk), so the walk succeeds over block 0 and fails later. The other case keeps the walk complete.
[probe] same-value store, walk fails: image 8 StoredAgain, guest 8 StoredAgain, 0 Stored
[probe] same-value store, walk complete: image 0 StoredAgain, guest 0 StoredAgain, 8 Stored
- Walk complete: the existing tracked path sees the CPU store in block 0 and leaves the block to the CPU.
- Walk fails on block 3: the same store, in a block the walk reached, is discarded and the GPU results overwrite it.
The probe's non-zero exit came only from the probe case's own pass condition. It was a local edit and is not part of the PR.
Negative control
I restored core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp from main and rebuilt the test executable:
- On
main's code: the new test failed 3 of 3 runs, in cases 1 and 2, matching the description's main column. - After restoring the merged file: it passes.
git status --porcelain was empty afterwards.
Findings
Blocking
- A failed walk on a later page discards confirmed CPU stores from the part the walk reached. This is at
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp:2355-2363for the refresh, and atTexture.cpp:6490andTexture.cpp:6500for the write-back.- What the code does: when
current == 0orwalkedis false, both paths drop every stamp fromChangedBlocksand decide only by comparing bytes with the saved baseline. - Why it matters: a CPU store that writes back the baseline value, in a block whose pages were walked and stamped, now reads as unchanged. The pending GPU results then win over it. Normally the CPU wins whenever the watch saw it write while results were pending.
- Status: oneandonlydean raised this in the 2026-10-29 review and mashingaan in the change request on this head. The reply describes a plan, but no change has been pushed. The probe above is new evidence that it happens on the merged tree.
- Debt entry:
docs/dev/debt/libSceAgcDriver.md:193does not record this loss. - Suggested fix: keep the stamps for the pages the walk reached, and treat only the unreached part as unknown. For example, stop
scanWrittenfrom stamping[cursor, end)as CPU writes, or report that part separately. Compare bytes only for blocks in the unreached part. - Test: add a same-value store case with the failure on an unrelated later page, for
Refreshand for a direct write-back with noRefreshfirst.
- What the code does: when
Non-blocking
- A later skipped case can hide an earlier failure. At
core/libs/prx/libSceAgcDriver/tests/execution/PendingUntrackedLayer.cpp:372,main()returnsVulkanTestSkippedon the firstNotRun, even when an earlier case already came backLost. oneandonlydean raised this on 2026-10-29 and it is still there. Fail whenkeptis already false before returning 77, or skip only the cases that cannot run. - The Windows path has no test. The new executable always skips on Windows, so the production path the description names for Windows (
collectWindowsWritesfailing, thennoteRefusedWalk) is not tested. The debt entry should at least say so if no test can reach it.
Not verified
- Windows: not built or run here, including the
noteRefusedWalkpath. - Hardware GPUs: only lavapipe here. The RADV and NVIDIA runs in the discussion were not repeated.
- The title: Ghost of Tsushima (PPSA02225) was not launched, so the title evidence was not checked.
- Probe coverage: the probe covers only
Refreshon Linux, with a page remapped by the test. I did not build a direct write-back variant.
To get this to a good state
- Keep the stamps: keep the walk's CPU stamps for the pages it reached, and limit the byte comparison to the part it did not reach. Cover this with a same-value store test, for
Refreshand for a direct write-back. - Fix the skip: make the test fail rather than skip when an earlier case was lost.
- Update the debt entry: have it state what is still open after the fix, including the missing Windows coverage.
- Ask for re-review: re-request review from mashingaan once it is pushed.
|
@oneandonlydean sorry for leaving this four days without an answer. Both points are fair. 2. The skip. Fixed in 81ad915. A case that can't run no longer returns 77 before the other cases are checked: 1. The same-value store. You're right that the whole-surface compare throws away the watch evidence of a store in a walked block. I'm building the fix on @sktharunbalaji13-cmd's plan above:
It comes with the cases you asked for:
@sktharunbalaji13-cmd, it's your plan. If you'd like to push it yourself, say so and I'll leave it to you. Otherwise it goes in with you as co-author. Thanks also to @mashingaan and @XairRrR for their reviews, and to XairRrR for the probe that reproduces the |
XairRrR
left a comment
There was a problem hiding this comment.
Re-checked — changes still requested
The one new commit, 81ad915, changes how the test handles a skipped case: an earlier failure now fails the test instead of being reported as a skip. Texture.cpp did not change, so the blocking same-value CPU-store loss from my last review is still open.
What changed since my last review
- New commit
81ad915d78: it changes onlyPendingUntrackedLayer.cpp. A case that cannot run (NotRun) is now noted and skipped over.main()checks that no case wasLostbefore it returns 77. - Same production code:
git diff 5e106c566d 81ad915d78touches no other file.Texture.cppand the debt entry are the same as in the head I reviewed last time. - Author reply (2026-11-02): EagleBearerYS agrees with the same-value-store point. They describe a fix: keep the confirmed stamps and compare only the blocks the walk never reached, with tests for
Refresh, a direct write-back, and Windows. None of it has been pushed yet.
What I ran
Head 81ad915d786415669b61143d7bb202272ab521a2, main 9090972b7e91fd266819cbd77a8b058e177b5682, merged tree 0036d44d39bfe7ff176afa824122aca64a268a47. Debian 13 VM, Xeon Gold 6136, GCC 14.2.0, lavapipe (Mesa 26.1.6, LLVM 19), Release.
git diff --check 9090972b7e91fd266819cbd77a8b058e177b5682...81ad915d786415669b61143d7bb202272ab521a2
python3 tools/check_conventions.py --base 9090972b7e91fd266819cbd77a8b058e177b5682
git diff 5e106c566dda63169ca2accc08b7b0008994918d 81ad915d786415669b61143d7bb202272ab521a2
ctest --test-dir build -R '^agc_driver_pending_untracked_layer$' --repeat until-fail:3 --output-on-failure
# negative control
git show 9090972b7e91fd266819cbd77a8b058e177b5682:core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp > core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
ninja -C build -j32 -l32 agc_driver_pending_untracked_layer_tests
ctest --test-dir build -R '^agc_driver_pending_untracked_layer$' --output-on-failure # x3
# restore
git show 0036d44d39bfe7ff176afa824122aca64a268a47:core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp > core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
ninja -C build -j32 -l32 agc_driver_pending_untracked_layer_tests
ctest --test-dir build -R '^agc_driver_pending_untracked_layer$'
git status --porcelain
| Check | Result |
|---|---|
git diff --check |
clean |
check_conventions.py |
passed |
| Build and selected tests (script) | 2033 tests ran, with 0 new failures and 0 timeouts. The 7 known failures also fail on main. |
| Vulkan validation comparison (script) | 758 tests ran. The layer loaded in 757, with no test reported missing it, and there were 0 new VUIDs. |
agc_driver_pending_untracked_layer (merged tree) |
passed 3/3, about 0.5 s per run |
Negative control (main's Texture.cpp) |
failed 3/3, in cases 1 and 2; passes again once the merged file is restored |
git status --porcelain after the restore |
empty |
Negative control output (identical in all 3 runs)
[pending untracked layer] results over a surface whose walk fails: the image holds 0 of 8 results, guest memory 0, CPU words 0, CPU write reported 1
[pending untracked layer] results and a CPU store over a surface whose walk fails: the image holds 0 of 8 results, guest memory 0, CPU words 1, CPU write reported 1
AGC graphics: pending storage results or a CPU store over a write-watched surface were lost
Previous findings
- Blocking 1, a failed walk on a later page discards confirmed CPU stores: still open.
- Evidence:
Texture.cppis the same as in the head I reviewed last time. On a failed walk,core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp:2355-2360still overwrites every stamp. The write-back does the same atTexture.cpp:6490andTexture.cpp:6500. - Effect: my same-value probe from the last review still applies. When the walk fails on a later page, the GPU results overwrite a CPU store in a block the walk did reach.
- Debt entry:
docs/dev/debt/libSceAgcDriver.md:193still does not record this loss. - Author's position: the author agrees, and the plan in their reply would address it once it is pushed.
- Evidence:
- Non-blocking 1, a later skipped case can hide an earlier failure: resolved.
- Evidence:
PendingUntrackedLayer.cpp:368-380now setsnotRun, finishes the loop, callsRequire(kept, ...), and only then returnsVulkanTestSkipped. ALostoutcome therefore fails the test even when a later case cannot run. - How I checked: by reading the code. On this machine all four cases run, so the skip branch was not exercised.
- Evidence:
- Non-blocking 2, no test reaches the Windows path: still open. The executable still returns 77 on
_WIN32. The author's reply plans a Windows case throughGuestArenaCompareWhenShared_nid_no_patch, but none has been pushed.
New findings
Blocking
None beyond the open finding above.
Non-blocking
None.
Not verified
- Windows: not built or run here.
- Hardware GPUs: only lavapipe here. The RADV and NVIDIA runs in the discussion were not repeated.
- The skip branch: it never ran here, because all four cases ran.
- The title: Ghost of Tsushima (PPSA02225) was not launched.
To get this to a good state
- Keep the stamps: push the planned fix. Keep the confirmed CPU stamps for the pages the walk reached, and compare bytes only for the blocks it never reached.
- Add the same-value test: cover a same-value CPU store with a failed walk on an unrelated later page, through
Refreshand through a direct write-back with noRefreshbefore it. Each should fail without the fix and pass with it. - Update the debt entry: have it state what is still open after the fix, including Windows coverage if no Windows test lands.
- Ask for re-review: re-request review from the reviewers who asked for changes.
✅ NVIDIA GPU test: passedPR head
Failing on main too (3, not counted against this PR)Validated but not compared (1, not in the main baseline's validation pass)Validation IDs already present on main (4 IDs in 512 tests)Skipped (44)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
A walk that fails part way stamped its whole remaining range as CPU writes, and the refresh and the write-back of a storage image over it then compared every block with the saved bytes, so a CPU store of the saved value in a block the walk had reached lost to pending results. On Linux the collect now reports the regions PAGEMAP_SCAN wrote out before its error and names the part it did not reach through new reporting exports, which agc records per page with the page's genuine CPU stamp. ChangedBlocks gains an unknown flag. After a failed walk the refresh and the write-back keep the stamps of the blocks the walk reached, leave a block the walk saw the CPU write to the CPU whatever its bytes, and compare only the unknown blocks. Co-authored-by: Tharun Balaji K <239791575+sktharunbalaji13-cmd@users.noreply.github.com>
|
@oneandonlydean, point 1 is in. 89c782b keeps the CPU stores a failed walk saw before it stopped, and 37a0eb9 adds the two cases you asked for. It's built on sktharunbalaji13-cmd's plan, with them as co-author. The change
The cases: a same-value CPU store in a block the walk reached before failing on a later page, then a What it doesn't change
@XairRrR and @mashingaan, this addresses the blocking point of your reviews. GitHub doesn't let my account re-request reviews here, so could you take another look? |
|
A correction before the second look: please hold it for now. While designing the Windows case, I found from reading the code (not yet confirmed by a run) that 37a0eb9 likely makes Windows worse.
Linux isn't affected: there the failed walk reports the regions it reached and marks the rest unreached. The fix compares a refused range by bytes again on Windows. It will come in this PR together with the Windows case, which should show the problem on 37a0eb9 and its absence with the fix. I'll post here when both are up. |
|
NVIDIA Linux run with the Khronos validation layer of the pending storage result comparison over a surface whose page walk fails, on the storage, pending, write tracking and collect memo tests the Tested section names. Setup: Arch Linux, kernel 7.3.4, GCC 16.2.1, Release. NVIDIA GeForce RTX 4090 (vendor
Every device test selected the RTX 4090 (
No new AI-assisted: yes (Claude Code) |
|
@domx4q thanks for the RTX 4090 pair with the validation layer, and for checking that |
|
Linux A/B on Ghost of Tsushima (PPSA02225), plain
|
|
@milescoviello thanks for the A/B on Ghost of Tsushima. It matches what the description says for plain |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
No verified defect blocks this change; the prepared evidence includes targeted regression runs and a GPU validation run at this head, while I did not run checks myself.
What I ran
Reviewed head 095d74935785c1090069e4b427f2388f52120b32. I did not run tests or build commands. Read description.md, commits.md, manifest.json, diff.patch, and all included changed files except only portions of long files; read Texture.cpp through repo_read.py for the changed refresh block. The full text of Texture.cpp was excluded from the review folder as too large, and I read only its relevant range through the reader. files.json was not present; the review folder listing served to identify included and excluded changed files.
Results
| Check | Result | Note |
|---|---|---|
| Prepared regression evidence | not run | Reported by author; not independently run |
| Changed-code review | passed | No concrete blocking defect verified |
| Full-file review | not run | Texture.cpp was read only in the relevant range |
Findings
Blocking
None.
Non-blocking
None.
Not verified
I did not run tests, builds, or GPU checks. I did not read the entire Texture.cpp file or all unchanged repository context. The prepared description reports several known limitations and an untested alias failure-reporting path; I did not verify those behaviors independently.
To get this to a good state
Nothing is required.
|
This passed review on 095d749, but it now conflicts with main in Texture.cpp. Please merge main into the branch and push; it goes back to the merge queue on the new head. |
Keeps both sides where boykopovar#16753 meets this branch: the record keeps this branch's unknownBlocks and takes boykopovar#16753's rewatchCompared, which confirmRewatched now sizes on first use.
An unwatched range leaves compareUnknown at ChangedBlocks' early return, so nothing is sized for it; the write-back keeps marking its blocks written.
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — comments
A complete approval is not justified because I could not run checks or read every changed file in full.
What I ran
Reviewed head 38516b5e639672419eed45fae5ede9caef11c917 against main using the prepared review bundle and repo_read.py targeted reads. No commands or tests were run.
Results
| Check | Result | Note |
|---|---|---|
| Prepared diff review | passed | 8 changed files listed |
| Tests and prechecks | not run | No execution environment available |
| Full changed-file review | not run | Some files were read only in relevant ranges |
Negative control
Not run; no tests were executed.
Findings
Blocking
None identified in the code ranges reviewed.
Non-blocking
None.
Sources
Reviewed description.md, commits.md, manifest.json, and diff.patch, plus targeted ranges in GuestMemory.hpp, GuestMemory.cpp, Texture.cpp, PendingUntrackedLayer.cpp, and GuestWriteWatch.cpp at the pinned head.
Not verified
Did not run tests or prechecks. Did not read all lines of the changed files; in particular, the full text of Texture.cpp was excluded from the review folder as too large, and only relevant ranges were read through repo_read.py. The full test and documentation files were not read. The file listing shows eight changed files; Texture.cpp is the only one excluded from the prepared full-text bundle.
To get this to a good state
Nothing is required. Optional: run the relevant AGC tests and review the remaining changed-file content before treating this as a complete approval.
ligmaSec
left a comment
There was a problem hiding this comment.
The trial merge conflicts in GuestWriteWatch.cpp. The new behavior depends on an unavailable page walk triggering byte comparison instead of discarding pending GPU results. Please keep a case where only part of the range can be collected, with a CPU update in that range and unchanged bytes beside it. That can verify that the fallback preserves the GPU result while still detecting CPU edits. Please move the direct debt update to a fragment. I have no paired Vulkan result for this head.
AI-assisted: yes.
What
When a page walk over a storage image stops part way, the surface's collect returns 0 while the range stays watched. The walk also reports the rest of its range as written by the CPU.
StorageTexture::Refreshthen sees the 64 KiB units that hold GPU results as CPU-written newer than their generations. It drops them, re-uploads them from guest memory, and printsguest memory changed while GPU results were pending; keeping the CPU's blocks. The write-back leaves the same blocks to the CPU.scanBlocks) and the write-back (writeBackLayers) no longer read the walk's synthetic stamps as CPU stores.PAGEMAP_SCANthat fails has already written out the dirty regions it found before the failure and re-protected those pages. The newGuestWriteWatchCollectReporting_nid_postfixandGuestWriteWatchCollectArmedReporting_nid_postfixreport those regions as written, and the range the walk didn't finish as unreached. The old collect calls are unchanged.ChangedBlocksoverload answers per 64 KiB block: known (today's stamps), CPU-confirmed (a genuine store after the block's generation) or unknown.docs/dev/debt/libSceAgcDriver.md:PAGEMAP_SCANerror leaves the whole range unreached (Linux 6.18 writes them);main's write-back leaves a stamped block to the CPU only when its bytes differ, so a same-value store made while results are pending is overwritten there. That'smain's existing rule, in its own entry, and isn't changed here;markLayersPendingandRefresh, and they're co-author of the commit.markLayersPending. That doesn't reach the loss: the refresh's own failed walk stamps the blocks newer again. It would also hide a CPU store made between a refresh and the pending mark. Case 3 below covers that.mainand on this PR alike. On Windows the title run below is the evidence.Tested
agc_driver_pending_untracked_layer(new):Setup: a watched surface, real
image_storedispatches, then a readback throughimage_load. It setsAPS5_NO_HOST_IMPORT=1itself, so lavapipe doesn't take the range off the watch with an import, and it skips (77) on Windows.Red/green on Linux (Ubuntu 24.04, GCC 13.3, lavapipe, Release): red at run 1 of
--repeat until-fail:10onmain'sTexture.cpp, and 10 of 10 direct runs fail. Green, 10 of 10.ctest -R '^agc'on this change: 1,118 tests, 1,045 passed, 73 skipped, 0 failed.main.keeping the CPU's blockswent from every frame to 1 occurrence at allocation on0x1500010000(3840x2160R16G16B16A16_SFLOAT), and 8 in the whole run (7 on0x1504000000during setup).agc_driver_pending_untracked_layerpassed 10 of 10 under validation. With it, the^agc_storageand^agc_driver_storagetests ran 21 tests: 20 passed and 1 skipped,agc_storage_clear_hand_over, since lavapipe makes no watched host import.mainand with this change isVUID-VkDeviceCreateInfo-pNext-pNext, for an extension structure the layer predates. The change adds none.APS5_SKIP_TIMING_TESTS=1, pass: 191 and 291 tests on Linux, 220 and 314 on Windows.main, so the runner's comparison arm has no red. The red is the Linux one above.-fsyntax-onlyonTexture.cppand the test gives no warning on the changed lines.check_conventions.pypasses, with no comment lines added.main88e804b. The one conflict was indocs/dev/debt/libSceAgcDriver.md, where this PR's page-walk entry sits amongmain's new write-watch entries; both sides are kept. This PR's diff overmainis unchanged. On GitHub's runners (run, on 7ed1db8, the same merge with that entry one line higher),agc_driver_pending_untracked_layerand the^agc_storageand^agc_driver_storagetests ran 10 times with no failure. Linux: 24 run, 23 pass, 1 skip (agc_storage_clear_hand_over), 0 fail. Windows: 25 run, 0 pass, 25 skip (no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (210 and 310) and on Windows (237 and 331). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.main()runs every case, requires that none came backLost, and only then returns 77 if a case couldn't run. On GitHub's runners (run),agc_driver_pending_untracked_layerand the^agc_driver_pending,^agc_storageand^agc_driver_storagetests ran 10 times with no failure. Linux: 25 run, 24 pass, 1 skip (agc_storage_clear_hand_over), 0 fail. Windows: 26 run, 0 pass, 26 skip (no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (210 and 310) and on Windows (237 and 331). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.maina4eca2a, Linux, with the Khronos validation layer. The new test is red onmain3 of 3 and green on the merge 3 of 3. 22 tests under the layer give no new VUID; the gate's exit 1 comes only fromagc_storage_clear_hand_overskipping on both sides.main1d91f29, driver 595.99.02, Ubuntu 26.04.1. 2,621 passed, 3 failed (none new: all 3 fail onmain) and 44 skipped, with no new validation IDs over 983 tests on the GPU.agc_driver_pending_untracked_layer: 5, a same-value CPU store in a block the walk reached before it failed on a later block, then a refresh; 6, the same, then a direct write-back (FlushAllPending) with no refresh. Each requires guest memory and the image to hold the 8 stored words and no results, and guest memory still to hold them after a last flush.^agc_driver_pending,^agc_storage,^agc_driver_storageand^guest_memorytests,agc_collect_memo_generation,agc_import_watchandagc_write_watch_coverage. Linux: 32 run, 31 pass, 1 skip (agc_storage_clear_hand_over), 0 fail. Windows: 31 run, 4 pass, 27 skip (no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (210 and 310) and on Windows (237 and 331). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.agcandguest_memorytest, once (run): Linux: 1,223 run, 1,145 pass, 77 skip, 1 fail. Windows: 1,258 run, 382 pass, 876 skip (no Vulkan device), 0 fail. The Linux failure isagc_driver_pipeline_journal's 120-second timeout, whichmain7feb37e's own run of that test hits too (run).agc_driver_pending_untracked_layer,agc_import_watchand the^agc_storageand^agc_driver_storagetests pass on both arms, and the change adds no VUID.PAGEMAP_SCANthat fails on a remapped page returns -1, but it has already written out the dirty regions before that page and re-protected them. Itswalk_endgives the range end, so the whole unfinished range is reported unreached.main's rule, in its own debt entry.check_conventions.pypasses, with no comment lines added. On a cloud Linux machine (lavapipe),ctest -R '^agc'runs 1,219 tests on both trees: 1,142 pass, 77 skip, 0 fail.main7feb37e, RADV NAVI24, Mesa 25.2.8. 3,621 passed, 14 failed (none new: 12 fail onmaintoo, 2 are unstable there) and 59 skipped, with no new validation IDs over 1,309 tests on the GPU.main9090972, driver 595.99.02. 3,502 passed, 5 failed (none new: 3 fail onmaintoo, 2 are unstable there) and 51 skipped, with no new validation IDs over 1,307 tests on the GPU.test(agc): the walk-failure cases on Windows. The test no longer skips on Windows. There the surface is one section mapped into the guest arena, and the first page of block 3 is mapped a second time and compared when shared (GuestArenaCompareWhenShared), so a walk over the surface is refused, as on the production path.main's code: on the same GPU, before the same-value and new cases ran on Windows, the four earlier cases passed 3 of 3 withmain88e804b's code as well as with this PR's, also with the shared page moved under the results' block or the CPU word's block. So on Windows this case covers the refused-walk path without showing a loss.agc_storage_clear_hand_over), 0 fail, withagc_driver_pending_untracked_layerpassing 10 of 10. Windows: 31 run, 4 pass, 27 skip (no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (210 and 310) and on Windows (237 and 331). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.check_test_registration.pyandcheck_skips.pypass. Only the test and the debt file change, with no comment lines added.mainf6232fc, driver 595.99.02. 3,636 passed, 6 failed (none new: 3 fail onmaintoo, 3 are unstable there) and 52 skipped, with no new validation IDs over 1,309 tests on the GPU.maind1ae628. The one conflict was inExecution/src/GuestMemory.cpp, where fix(agc): keep write-tracker generations 64-bit so they cannot wrap #14899 made the write-tracker generations 64-bit. The merge widens this PR's unreached-page tracker (UnreachedPage,noteUnreached,newestUnknownMark,provenCpuStore) tostd::uint64_twith them, andagc_driver_pending_untracked_layerruns its cases a second time with the generation past 2^32 (AdvanceTrackerGenerationForTest). Apart from those types and that pass, this PR's diff overmainis unchanged.agc_driver_pending_untracked_layerandmain's fiveagc_write_trackingtests pass 3 of 3.main'sagc_write_trackingtests and the compared-shared tests added. Linux: 34 run, 33 pass, 1 skip (agc_storage_clear_hand_over), 0 fail. Withmain's implementation onlyagc_driver_pending_untracked_layerfails there, in cases 1 and 2 and in the same-value direct write-back case, in both generation passes. Windows: 40 run, 13 pass, 27 skip (no Vulkan device), 0 fail. Suites: libc and libkernel pass on Linux (297 and 321) and on Windows (324 and 342). The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.maind1ae628.agc_driver_pending_untracked_layerpasses 3 of 3, with all 7 cases run in both generation passes, and 30 of 31 related tests pass, with 1 skip (agc_storage_clear_hand_over). There are no new VUIDs over 768 tests. Withmain's five production files, the test fails 3 of 3, in cases 1 and 2 and in the same-value direct write-back case, in both passes.main4f41f4c, which brings hugodearaujo's fix(agc): keep a CPU store that rewrote a pending block with its baseline bytes #14302 (a CPU store that rewrote a pending block with its baseline bytes is kept).Graphics/src/Texture.cpp, inStorageTexture::writeBackLayers, on the line that decides whether a block was written. fix(agc): keep a CPU store that rewrote a pending block with its baseline bytes #14302 replaced its!unchangedSinceBaseline(from, to)with!cpuLeftUnchanged(layer, from, to, edge), and this PR had putcpuSeen(a CPU store that a failed walk saw) in front of that check. The merge keeps both:(cpuSeen || !cpuLeftUnchanged(layer, from, to, edge)), with this PR'sbyByteswheremainhascompared[layer], and in the skip condition below it, as before.mainstays +723 −32 in 8 files; that line is the only one that changes.agc_driver_pending_untracked_layer,agc_collect_memo_generation,agc_import_watch,agc_write_watch_coverageand every test matching^agc_driver_pending,^agc_storage,^agc_driver_storage,^guest_memoryor^agc_write_tracking, with the compared-shared tests (agc_compared_shared_generations,agc_import_alias_shared,agc_resident_direct_remap,agc_rewatched_direct_shared) on Windows, the only runner that has them. Linux: 36 run, 35 pass, 1 skip (agc_storage_clear_hand_over), 0 fail; withmain's implementation onlyagc_driver_pending_untracked_layerfails there. Windows: 42 run, 13 pass, 29 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 300 and 322 tests on Linux and 327 and 342 on Windows, with 0 failed. The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.agcandguest_memorytest, once (run): Linux: 1,277 run, 1,193 pass, 83 skip, 1 fail. Windows: 1,313 run, 402 pass, 911 skip (no Vulkan device), 0 fail. The Linux failure is751/1277 Test #1389: agc_driver_pipeline_journal ...........................................***Timeout 120.06 sec, the 120-second limit thatmain's own run of that test reaches too (see the 37a0eb9 sweep above); this PR doesn't touch the journal.cpuSeenterm is untested for a block the layer covers only in part and for a layer with no pending stamp, which this PR's fixture doesn't reach.mainb5a9a47, which brings Tehshortbus's perf(libc, libkernel): keep aliased direct memory on the Linux write watch and collect stores through every alias #12452 (aliased direct memory stays on the Linux write watch, and a collect takes stores through every alias).libc/src/GuestWriteWatch.cpp. perf(libc, libkernel): keep aliased direct memory on the Linux write watch and collect stores through every alias #12452 rebuiltCollect,CollectFreshandCollectArmedaround aFanout, which reports a written range at its own address and at every alias in an alias plan. This PR had givenCollectandCollectArmedanunreachedcallback for the pages a failed walk couldn't read. The merge keeps both.Fanoutcarriesunreachedbesidewritten, andFanout::ReportUnreachedreports an unreached range at every alias address, the same wayReportdoes for a written range. When a step ofCollectorCollectArmedfails, the aliases it hasn't reached yet are reported unreached too, and so are their armed parts forCollectArmed.CollectFreshkeeps perf(libc, libkernel): keep aliased direct memory on the Linux write watch and collect stores through every alias #12452's loop and reports nothing unreached, as before. This PR'stakeFreshandscanWrittenmerged without a conflict.agc_driver_pending_untracked_layermakes a walk fail with no alias. perf(libc, libkernel): keep aliased direct memory on the Linux write watch and collect stores through every alias #12452's alias tests collect through aliases, but no walk fails in them. So no test runs an unreached report over an aliased range.maingoes from +724 −32 to +776 −46 in 8 files, all of the change inGuestWriteWatch.cpp.agc_driver_pending_untracked_layer,agc_collect_memo_generation, and every test matching^agc_driver_pending,^agc_storage,^agc_driver_storage,^agc_write_tracking,^agc_write_watch,^write_watch,^windows_write_watchor^guest_memory.agc_storage_clear_hand_over), 0 fail.agc_driver_pending_untracked_layerpasses 10 of 10.agc_driver_pending_untracked_layeris among the skips, as on every earlier Windows-runner run of this PR.APS5_SKIP_TIMING_TESTS=1, which relaxesprecise_wait's median bounds on GitHub's hosted runners.main's Windowsguest_standard_streamsfailure (libc: guest_standard_streams aborts on Windows because a second ungetc on an unbuffered stream fails #17423) didn't show up in these runs.agctest, once (run): Linux: 1,453 run, 1,361 pass, 92 skip, 0 fail. Windows: 1,493 run, 445 pass, 1,048 skip (no Vulkan device), 0 fail.main0245231, CachyOS (Linux 7.3.1), GCC 16.2.1, Release,ctest -R '^(agc|video_out|shader)', againstmainon the same machine. Both GPUs (NVIDIA 615.78.08; Mesa 26.2.6) show no difference frommain, andagc_driver_pending_untracked_layerpasses on both. No validation layer was installed there.mainea32608 (×10, everyagctest), which brings JJenkx's perf(agc): scope pending texture snapshots to unwatched units #18940 (a pending texture's snapshot at an unwatch covers only the units the unwatched range meets, and when the write-watch query over the whole range fails, each unit is queried on its own).Graphics/src/Texture.cpp, four hunks, inStorageTexture::refresh's drop rule and inStorageTexture::writeBackLayers. Where this PR's lines read the range-widetrackedandcompared, perf(agc): scope pending texture snapshots to unwatched units #18940 reads per-unit answers (unitTracked, and in the refreshunitCompared) when the range query fails. The merge keeps both:comparedandtracked, and still compares a unit's stamps when a failed walk left its block unknown;compareUnknownahead of perf(agc): scope pending texture snapshots to unwatched units #18940's per-layer queries, which run only when it can't answer. Itsunknownand skip conditions read perf(agc): scope pending texture snapshots to unwatched units #18940'slayerTrackedwhere this PR hadtracked, with this PR's!compared[layer]and!byBytesterms kept.So in those lines, a surface with no unknown blocks takes
main's path, and one with unknown blocks takes 3317dcb's.mainstays +776 −46 in 8 files. InTexture.cppthe changed lines are the same, on perf(agc): scope pending texture snapshots to unwatched units #18940's per-unit names.agc_unwatch_snapshot_scope*tests. Linux: 51 run, 50 pass, 1 skip (agc_storage_clear_hand_over), 0 fail;agc_driver_pending_untracked_layerand perf(agc): scope pending texture snapshots to unwatched units #18940's five tests pass 10 of 10. Windows: 58 run, 15 pass, 43 skip (no Vulkan device;agc_driver_pending_untracked_layerand perf(agc): scope pending texture snapshots to unwatched units #18940's five tests are among them), 0 fail. The libc and libkernel suites run 380 and 376 tests on Linux and 410 and 404 on Windows, with 0 failed. They ran withAPS5_SKIP_TIMING_TESTS=1, which relaxes onlyprecise_wait's median bounds on GitHub's hosted runners.agctest, once: Linux: 1,690 run, 1,582 pass, 106 skip, 2 fail. Windows: 1,728 run, 502 pass, 1,226 skip (no Vulkan device), 0 fail. The two Linux failures aremain's:agc_driver_global_atomic_csub: "AGC graphics: global atomic csub without glc: wave64 byte 644 is 146, expected 0";agc_driver_coherent_atomic_loads_enabled: a 60-second timeout.main's own Linux job fails both, with the same message and the same timeout, at d2949cd (job) and at 67ec0f7 (job), covered by test(agc): skip the csub and coherent atomic load runs on subgroups narrower than 32 lanes #19332._putenv_stest fix (#19899) on top, becausemain's Windows test build breaks without it ("'setenv' was not declared" inUploadCacheReadOnlyFlush.cpp, from perf(agc): reuse read-only guest buffer uploads #18037); it isn't on this branch. The first runs, on this head alone (×10, everyagctest), gave the same Linux results, and their Windows builds stopped at that error.main790e9a3 (×10, ×10 with the Windows test fix, everyagctest), which brings Ducengarth's fix(agc): renew a storage image's upload copy when its range leaves the watch #17788 (a storage image's upload copy is renewed when its range leaves the write watch).docs/dev/debt/libSceAgcDriver.mdonly. fix(agc): renew a storage image's upload copy when its range leaves the watch #17788 rewrote the "Units without a baseline outside the write watch" entry, right before this PR's four entries. The file merges withmerge=union, which would keep the old copy of that entry next to the new one, so the merge takes fix(agc): renew a storage image's upload copy when its range leaves the watch #17788's entry and keeps this PR's four after it.mainstays +776 −46. Only context lines moved: that debt entry, and chitters2004's perf(agc): answer a write-watch collect from a per-block observation table #17766 lines next to this PR's intests/CollectMemoGeneration.cpp.Texture.cpp, where fix(agc): renew a storage image's upload copy when its range leaves the watch #17788 also changesStorageTexture, merged without a conflict.agc_storage_clear_hand_over), 0 fail. Windows: 64 run, 19 pass, 45 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 388 and 384 tests on Linux and 418 and 412 on Windows, with 0 failed. They ran withAPS5_SKIP_TIMING_TESTS=1, which relaxes onlyprecise_wait's median bounds on GitHub's hosted runners.agctest, once, on Linux: 1,801 run, 1,677 pass, 114 skip, 10 fail.main's own Linux job at 3e1b183 (job):agc_driver_global_atomic_csub,agc_driver_stencil_copy_draw,agc_driver_coherent_atomic_loads_enabled,agc_driver_image_table_packed_guards,agc_driver_recorder,agc_draw_input_mirrorsandagc_draw_input_reuse.agc_driver_frame_replay_rewind_copy("FAILED: no memory delta was read while 1 submissions waited for the CPU") and theagc_driver_runtime_buffer_spans_x3_spansand_x4_spanstimeouts. Over 10 runs ofmain790e9a3 with fix(tests): set the upload cache test's environment with _putenv_s on Windows #19899's test-only commit on top (run), all three fail too,frame_replay_rewind_copywith the same message. Over 10 runs of this merge (run),frame_replay_rewind_copypasses 10 of 10, and the span tests fail as onmain.main's Windows test build still stops at "'setenv' was not declared" inUploadCacheReadOnlyFlush.cpp(from perf(agc): reuse read-only guest buffer uploads #18037). It isn't on this branch. The Windows builds of the first ×10 and of theagcrun, on this head alone, stopped at that error.main0694c4c (×10, everyagctest), which brings klosixgaming-arch's perf(agc): return settled imports under live storage images to the write watch #19071 (settled imports under live storage images go back to the write watch).Graphics/src/Texture.cppplanned under Overlap, resolved as described there. The declarations keep this PR'sunknownBlocksand perf(agc): return settled imports under live storage images to the write watch #19071'srewatchCompared.scanBlockskeeps this PR'sChangedBlocksread, taken only when the surface's own collect succeeded, with perf(agc): return settled imports under live storage images to the write watch #19071'sconfirmRewatchedcall after it.droppablekeeps both cases in one condition.writeBackLayerskeeps this PR'sunknownBlocks, and perf(agc): return settled imports under live storage images to the write watch #19071'sconfirmRewatchedcall now follows this PR'swalked && ChangedBlocksline.mainit is +777 −47 in the same 8 files, against +776 −46 before. The changed lines are the same, apart from where perf(agc): return settled imports under live storage images to the write watch #19071's code meets this PR's: thedroppablecondition this PR extends now also holds perf(agc): return settled imports under live storage images to the write watch #19071's rewatched-unit case, and perf(agc): return settled imports under live storage images to the write watch #19071'sconfirmRewatchedcall inwriteBackLayersmoves after this PR'sChangedBlocksline.agc_storage_clear_hand_over), 0 fail. Windows: 66 run, 19 pass, 47 skip (no Vulkan device), 0 fail. The libc and libkernel suites run 391 and 390 tests on Linux and 421 and 417 on Windows. On Windows, 0 failed. On Linux, libkernel'sguest_thermal_sensorsreached its 20 s timeout. It times out in every run I have on GitHub's Intel Xeon 6975P-C runners,main0694c4c alone included (run), and passes on GitHub's other runners and inmain's own job. This PR changes no libkernel file. The suites ran withAPS5_SKIP_TIMING_TESTS=1, which relaxes onlyprecise_wait's median bounds on GitHub's hosted runners.agctest, once: Linux: 1,867 run, 1,739 pass, 116 skip, 12 fail. Windows: 1,909 run, 558 pass, 1,351 skip (no Vulkan device), 0 fail.main's own Linux job at 0694c4c (job):agc_driver_global_atomic_csub,agc_driver_stencil_copy_draw,agc_driver_coherent_atomic_loads_enabled,agc_hook_clear_access,agc_hook_clear_access_off,agc_driver_recorder,agc_draw_input_mirrorsandagc_draw_input_reuse.agc_driver_image_table_packed_guardsfails the same way inmain's own Linux job at e249fc4 (job): three identical "stage 4 pc 0x68" records, then "unrecoverable packed table format was not poisoned". fernandomcrsilva's open test(agc): keep the packed image table guard programs at different addresses #21255 changes that test.agc_driver_runtime_buffer_spans_x2_spans,_x3_spansand_x4_spanstimeouts:main's own Linux job passes them at 0694c4c, in 3.09, 3.79 and 4.16 s, and times them out at dcf3d15 (job), together with_x4_reference. On GitHub's runners, ×10 of the span tests with this PR's set in both arms,main0694c4c (run, Intel Xeon 6975P-C) and this merge (run, AMD EPYC 9V74) differ by little. The merge's passing medians are 0.99 to 1.12 ofmain's:runtime_buffer_spans3.92 and 3.90 s,_x2_reference1.55 and 1.66 s,_x3_reference1.89 and 2.08 s,_fault_stop0.205 and 0.230 s,_fault_barrier0.210 and 0.230 s. Its timeouts are the fourmain's own job shows at dcf3d15. The two arms ran on different CPUs. For scale,main's own code takes 0.68 to 0.78 of the time on the Xeon that it takes on an AMD EPYC 7763 (run), and two runs of this merge on the same EPYC 9V74 differ from each other by up to 20% (run).ANYPS5_REQUIRE_VULKAN=1andANYPS5_NO_SHADER_CACHE=1. This head 095d749 merged ontomaine4caa07 (a clean merge), againstmaine4caa07 alone,ctest -R '^agc_(driver_pending|collect_memo_generation|storage|driver_storage|write_tracking|write_watch_coverage|import_watch)'.main: 45 of 45 pass. This PR: 46 of 46 pass, includingagc_driver_pending_untracked_layer, whichmaindoesn't have, run on the RTX 4090 (no skip). NoVUID-line on either side, and every device test selected the RTX 4090.main, by @milescoviello (comment): Ubuntu 26.04.1, NVIDIA GeForce RTX 4070 Ti (driver 615.71.09), Release libraries,maineb20410 against its merge with 095d749, 3 runs per arm of up to 600 s from a pinned save with a cold shader cache.keeping the CPU's blocks8 times, all during setup. Without the stack above, this title doesn't reach the per-frame case, so the run can't show the fix, as expected.mainrun and two of this PR's runs; they read it as varying from run to run rather than following the change. The two PR runs with the most of it also had the highest RSS (25.0 and 24.1 GB, one killed at the 22G cap at 393 s, against 19.2 to 20.3 GB formain).main's third run entered the same phase and was killed at 237 s, so they don't read the memory difference as coming from this PR.Overlap
Graphics/src/Texture.cpp, inStorageTexture::RefreshandStorageTexture::writeBackLayers, conflicted with this PR, and the merge ofmain0694c4c resolves them like this (see Tested):unknownBlocksand perf(agc): return settled imports under live storage images to the write watch #19071'srewatchComparedare added on the same line, and both are kept.scanBlocksandwriteBackLayers: this PR readsChangedBlocksonly when the surface's own collect succeeded, and movesmain'sawaitStoredSaveinto its!trackedpath, after the unknown-block compare. perf(agc): return settled imports under live storage images to the write watch #19071 callsconfirmRewatchedaftermain'sChangedBlockscall. The merge keeps this PR's lines and callsconfirmRewatchedafter this PR'sChangedBlockscall, with perf(agc): return settled imports under live storage images to the write watch #19071's conditions.droppable: both add a case to the same condition, this PR's unknown blocks and perf(agc): return settled imports under live storage images to the write watch #19071's rewatched units, and both are kept.libc/src/GuestWriteWatch.cpp: a fresh range is protected before it is reported, and eachFanoutre-resolves its alias translations when a link changes during a collect. It conflicts with this PR in four hunks, inCollect,CollectFresh,CollectArmedandFanout::Report(git merge-treeof its 895760f and this PR's 095d749; each merges cleanly withmaind50640e on its own). Proposed order: fix(libc): close two write-watch report races on Linux #24008 first, and this PR then resolves the conflict keeping both sides (note):Fanout: carries both PRs' members, fix(libc): close two write-watch report races on Linux #24008's watch, range, link version and refreshed translations, and this PR'sunreached. EveryFanoutis built with all of them, including this PR's constructions inCollectArmed's uncovered-range path and inunreachAliases, which merge without a text conflict;unreachAliasesstops beingstaticso it can pass the watch.takeFreshandscanWrittentake this PR's unreached report besideFanout::Report, and this PR's failure paths, which report the remaining aliases as unreached before returningfalse, are kept.ReportUnreachedcalls fix(libc): close two write-watch report races on Linux #24008'srefresh()before it fans out, asReportdoes, so an unreached range also reaches a view linked during the collect.agc_write_trackingtests and this PR'sagc_driver_pending_untracked_layer,^agc_storageand^agc_driver_storagetests on the merged tree.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)main0694c4c keeps bothmain, which doesn't reach the case), by @milescoviello