Skip to content

perf: remember a refused buffer memory SRV for a short, validated time - #2782

Open
tedin7 wants to merge 15 commits into
R0Y00:mainfrom
tedin7:x2w-srv-refusal-cache
Open

tedin7 wants to merge 15 commits into
R0Y00:mainfrom
tedin7:x2w-srv-refusal-cache

Conversation

@tedin7

@tedin7 tedin7 commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #1723

What this unblocks: frame time on titles that re-publish the same refused buffer SRV every frame. A tester log shows view at 18996 ms over 12120 calls and 654,893 slot-70 refusals, 545,784 of them buffer_unavailable.

What changed

  • device_memory_srv (src/startup_stubs/d3d12_memory_srv.inl) kept no memory of a buffer_unavailable refusal. Each call repeated the placement scans, unplaced_memory_buffer with its measure_placed_buffer memory questions (a region-information call and, for partly committed or mapped allocations, a VirtualQuery walk), and the view resolution, then refused again.
  • New src/startup_stubs/srv_refusal_cache.h: a bounded 256-slot negative cache. A cached refusal carries an exact proof, so a hit never refuses what the full path would publish:
    • independent: decided by the request and stand-in state alone (a live resource overlaps, no page extent, a placed buffer owns the page, the found buffer is too small for the view). Proven by the key and the placement generation.
    • fully committed: the allocation is private and every byte is committed, and the buffer does not fit it. The region stamp (base, size, committed bytes, flags) with committed = size cannot hide a page move, there is no uncommitted page left.
    • witness page: the walk from the allocation base found a page that is not committed (or is another allocation). measure_placed_buffer now reports that page. A hit asks only that one page again (one VirtualQuery) and the allocation base (one region-information call, no scan). The refusal holds exactly while that page stays uncommitted, so decommit and commit with an equal total are seen.
    • A refusal from a later step that no proof covers is not cached.
  • Entry younger than 250 ms and used fewer than 1024 times; the placement generation advances wherever the resource index, the placement groups or the unplaced buffers change.
  • A hit still calls refuse_memory_srv, so the census counters and the log limits are unchanged. A miss runs the full path unchanged.

Review fix

A reviewer reproduced a stale refusal: reserve 128 KiB, commit the upper 64 KiB, the slot-70 request refuses; decommit the upper half, commit and fill the lower 64 KiB (same base, same reservation, same committed total), retry at once: no SRV was written. A region stamp is identical there. The witness page (the lower page, uncommitted at the first refusal) is now committed, so the entry misses and the full path runs. That sequence is the control in the test. The opt-in switch of the earlier revision is gone: the default is exact and covers the memory refusals.

What is not covered

  • Slot 139 (3757 ms over 1105 calls) and the per-view cost of successful translations are not touched.
  • The cost of the witness VirtualQuery on a foreign committed page is not measured here; for an uncommitted or free page it does not walk committed ranges.

Tests

tests/startup_srv_refusal_cache_check.cpp (pure header, a fake two-page allocation stands for the page query), registered as startup_srv_refusal_cache with eight negative controls (--mutate generation|witness|stamp|key|device|age|hits|unproven, each must fail): the page-move sequence misses while the witness holds before it; an uncommitted address hits without an allocation stamp and misses once committed; another base, an unreadable stamp or a new generation miss; a fully committed entry misses on any stamp change; key, device, age, hit limit and a backwards clock miss; a refusal without a proof is never cached.

Verification

g++ -std=c++17 -Wall -Wextra -Isrc tests/startup_srv_refusal_cache_check.cpp -o srv_cache && ./srv_cache     rc=0
./srv_cache --mutate generation|witness|stamp|key|device|age|hits|unproven                                 rc=1 each

Win2025 gate on head 9f27526 (independent gate): dev 33/33 and release 33/33 pass, including the page-move witness sequence. The real share of the 545,784 refusals that get cached is not measured.

AI-assisted; commands listed were executed locally.

Source: Microsoft D3D12 documentation, ID3D12Device::CreateShaderResourceView and the DirectX-Specs "Resource Binding" page (a view is created from the resource and descriptor state at call time).

c1 added 3 commits November 26, 2026 09:43
A refused slot-70 buffer SRV repeated the placement scans and the memory questions on every call. A bounded negative cache, keyed by the request and validated by the placement generation and a region-information stamp, answers the repeat; any change misses and runs the full path.
…n at the tiled address flip

Placement lookups are per device, so a refusal for one device must not be replayed for another. address_resource_overlap reads tiled_address_srv, which publish_tiled_texture sets: advance the generation there too.
@tedin7

tedin7 commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator Author

Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit 9f27526889d3df9b58e9bd45394f0f49b07f2d44:

  • Debug (--preset dev):
    • Build (cmake --build --preset dev --target startup_stream_consumer offscreen_check startup_srv_refusal_cache_check startup_placed_buffer_range_check -- -j 2): 1.49s (configure 1.89s)
    • Test (ctest --preset dev -R 'startup_memory_srv|startup_srv_refusal_cache|startup_placed_buffer|startup_unplaced' --parallel 6 --no-tests=error --output-on-failure): 33/33 passed (1.32s: startup_memory_srv_diag_hardware 0.78s, startup_memory_srv_diag_warp 0.78s, startup_memory_srv_diag_supported_control_warp 0.80s, startup_memory_srv_volume_layout_control 0.01s, startup_memory_srv_census 0.03s, startup_memory_srv_buffer_unplaced-covers_control 0.02s, startup_memory_srv_volume 0.02s, startup_memory_srv_as 0.02s, startup_memory_srv_volume_mips-overflow_control 0.02s, startup_memory_srv_volume_2d-view_control 0.02s, startup_memory_srv_volume_3d-view_control 0.02s, startup_memory_srv_buffer_first-32_control 0.02s, startup_memory_srv_buffer_unplaced-extent_control 0.02s, startup_placed_buffer_range_region_only_control 0.86s, startup_memory_srv_buffer 0.02s, startup_memory_srv_buffer_exact-fit_control 0.03s, startup_memory_srv_as_alignment_control 0.03s, startup_srv_refusal_cache 0.03s, startup_memory_srv_buffer_height_control 0.02s, startup_memory_srv_as_offset_control 0.02s, startup_placed_buffer_range 0.91s, startup_memory_srv_as_state_control 0.03s, startup_memory_srv_report 0.02s, startup_srv_refusal_cache_unproven_control 0.03s, startup_srv_refusal_cache_generation_control 0.02s, startup_memory_srv_buffer_unplaced-heap-limit_control 0.03s, startup_srv_refusal_cache_age_control 0.03s, startup_srv_refusal_cache_hits_control 0.03s, startup_srv_refusal_cache_device_control 0.03s, startup_srv_refusal_cache_stamp_control 0.02s, startup_srv_refusal_cache_key_control 0.01s, startup_srv_refusal_cache_witness_control 0.01s, startup_placed_buffer_range_walk_only_control 1.18s)
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release --target startup_stream_consumer offscreen_check startup_srv_refusal_cache_check startup_placed_buffer_range_check -- -j 2): 1.77s (configure 1.90s)
    • Test (ctest --preset release -R 'startup_memory_srv|startup_srv_refusal_cache|startup_placed_buffer|startup_unplaced' --parallel 6 --no-tests=error --output-on-failure): 33/33 passed (1.10s: startup_placed_buffer_range_region_only_control 0.63s, startup_memory_srv_diag_warp 0.66s, startup_memory_srv_volume_3d-view_control 0.02s, startup_memory_srv_diag_supported_control_warp 0.67s, startup_memory_srv_buffer_first-32_control 0.02s, startup_memory_srv_diag_hardware 0.68s, startup_memory_srv_as 0.03s, startup_placed_buffer_range 0.69s, startup_memory_srv_census 0.03s, startup_srv_refusal_cache 0.03s, startup_memory_srv_volume_mips-overflow_control 0.02s, startup_memory_srv_report 0.02s, startup_memory_srv_volume_layout_control 0.03s, startup_memory_srv_volume 0.03s, startup_memory_srv_volume_2d-view_control 0.02s, startup_memory_srv_buffer_unplaced-heap-limit_control 0.02s, startup_memory_srv_as_alignment_control 0.03s, startup_memory_srv_buffer_unplaced-covers_control 0.03s, startup_srv_refusal_cache_generation_control 0.02s, startup_memory_srv_as_state_control 0.02s, startup_memory_srv_buffer 0.02s, startup_memory_srv_buffer_unplaced-extent_control 0.02s, startup_memory_srv_as_offset_control 0.02s, startup_memory_srv_buffer_height_control 0.01s, startup_memory_srv_buffer_exact-fit_control 0.02s, startup_srv_refusal_cache_unproven_control 0.03s, startup_srv_refusal_cache_age_control 0.02s, startup_srv_refusal_cache_hits_control 0.02s, startup_srv_refusal_cache_witness_control 0.02s, startup_srv_refusal_cache_device_control 0.02s, startup_srv_refusal_cache_stamp_control 0.01s, startup_srv_refusal_cache_key_control 0.01s, startup_placed_buffer_range_walk_only_control 0.97s)
  • sccache: 8/10 hits; wall 12.8s

Gate (independent peer review, same head): PASS, no blocking finding.

  • The witness-page proof was also run against real memory (VirtualAlloc: reserve 128 KiB, commit the upper 64 KiB, refuse; decommit it, commit the lower 64 KiB, retry): the witness page is committed after the move, so the entry misses and the full path runs (and refuses again for the right reason); a tail committed later misses; a released allocation keeps the refusal; a fully committed allocation that is too small gets the fully_committed proof. That check is a gate-only test, not part of this PR; the PR tests themselves use a fake two-page allocation for the page question.
  • Low, not blocking: buffer_refusal_page_still_uncommitted returns true (still refused) when VirtualQuery itself fails; returning false would send that rare case to the full path.

AI-assisted; commands listed were executed locally.

@tedin7
tedin7 marked this pull request as ready for review November 26, 2026 09:03
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-26T10:45:49.538991Z 9f27526 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8c46609955

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/startup_stubs/d3d12_capture.inl Resolved
…e resource

address_resource_overlap and existing_memory_buffer stop counting a resource when its reference count reaches zero, also for resources without a placement entry, so a refusal cached for that overlap must not outlive the release.

@R0Y00 R0Y00 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reproduced the same-CommitSize case through production device slot 70 on ef94abdd, Windows 11 26200, WARP and RTX 4060 Laptop. Starting from the source-built dispatch-input-memory-view buffer, reserve 128 KiB, commit the upper 64 KiB only, and make the slot-70 request at the base (it correctly refuses). Decommit the upper 64 KiB and commit/fill the lower 64 KiB; the allocation base, reservation size and committed byte total are unchanged. Repeat the same request immediately.

The immediate retry emitted no memory SRV written on either adapter. The same second state in a fresh process, and the same retry after 300 ms, both published one SRV on each adapter. This probe isolates descriptor publication; it does not claim that the downstream translated dispatch accepts this partial-reservation case.

A caller that requests the view once after committing it can therefore miss the descriptor indefinitely even though the cached entry itself expires. Please keep the default lookup exact. Limit caching to refusals whose inputs are fully proven by the stored key and memory state, or make approximate suppression explicitly opt-in and document the publication behavior. Keep the immediate same-total page-move case as a control.

@tedin7
tedin7 marked this pull request as draft November 26, 2026 09:43
@tedin7

tedin7 commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator Author

Fixed in 7fdee8f. Your sequence is right: the region stamp (base, size, committed total, flags) is identical when the committed pages move with the same total, so the cached refusal was reused for up to 250 ms.

What changed:

  • The default lookup is exact again. Only refusals fully proven by the request key and the placement generation are cached: a live resource overlaps the span, the span has no page extent, a placed buffer owns the page, or the found buffer is too small for the view.
  • Refusals that depend on what is committed at the address are not cached by default. They are cached only with X2W_SRV_REFUSAL_CACHE_MEMORY=1 (off unless set), documented in the header and the PR body.
  • Your page-move case is a test and a control (--mutate memory must fail): reserve 128 KiB, commit the upper 64 KiB, refuse; same stamp after moving the commit to the lower half; the default never hits, so the full path runs.

Verification: g++ -std=c++17 -Wall -Wextra -Isrc tests/startup_srv_refusal_cache_check.cpp rc=0; all seven --mutate controls rc=1. The Windows build and WARP/hardware run are pending Stage-2. The PR is Draft until that passes.

Honest limit: I do not know how many of the 545,784 refusals are memory independent, so the default speedup is unmeasured.

AI-assisted; commands listed were executed locally.

@tedin7
tedin7 requested a review from R0Y00 November 26, 2026 09:48
@tedin7

tedin7 commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator Author

Follow-up in the next push: the default now covers the memory refusals too, still exact.

  • A refusal from the memory walk is cached with a witness: the one page that was found not committed from the allocation base to the end of the buffer. A hit asks that page again (and the allocation base from the region information, no scan). Your sequence misses: the lower page, the witness, is committed after the move, so the full path runs.
  • A refusal from a fully committed allocation that the buffer does not fit is cached under the full stamp (nothing is left to move).
  • Refusals no proof covers are not cached. The opt-in switch is removed.

Test: your sequence is a control (--mutate witness must fail), plus seven more controls; g++ ... startup_srv_refusal_cache_check.cpp rc=0, every --mutate rc=1. The Windows build and the WARP and hardware runs are pending Stage-2. The PR stays Draft until then.

AI-assisted; commands listed were executed locally.

@tedin7
tedin7 marked this pull request as ready for review November 26, 2026 10:34
@tedin7

tedin7 commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator Author

Your page-move sequence (reserve 128 KiB, commit the upper 64 KiB, refuse; decommit it, commit the lower 64 KiB, retry at once) is now a test in tests/startup_srv_refusal_cache_check.cpp and it passes: the cached refusal misses because its witness page is committed after the move, so the full path runs. Its mutated control (--mutate witness) fails as it should.

The independent Win2025 gate on head 9f27526 passed: dev 33/33 and release 33/33, including that sequence. The PR is Ready.

AI-assisted; commands listed were executed locally.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9f27526889

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/startup_stubs/d3d12_memory_srv.inl Resolved
@tedin7

tedin7 commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator Author

Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit a4eeb366d995ff3204d7aa7cc1c62b8b9108400f:

  • Debug (--preset dev):
    • Build (cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_placed_buffer_range_check startup_srv_refusal_cache_check -- -j 2): 31.28s (configure 2.14s)
    • Test (ctest --preset dev -R 'srv_refusal|resource_address_index|memory_srv|startup_d3d12' --parallel 2 --no-tests=error --output-on-failure): 34/34 passed (9.97s: startup_memory_srv_diag_supported_control_warp 0.76s, startup_memory_srv_diag_warp 0.77s, startup_memory_srv_diag_hardware 0.77s, startup_resource_address_index_missing_control_warp 0.73s, startup_memory_srv_census 0.03s, startup_memory_srv_buffer_unplaced-covers_control 0.02s, startup_memory_srv_volume_layout_control 0.01s, startup_memory_srv_volume 0.01s, startup_srv_refusal_cache_hits_control 0.02s, startup_srv_refusal_cache_age_control 0.02s, startup_memory_srv_as 0.01s, startup_srv_refusal_cache_unproven_control 0.02s, startup_srv_refusal_cache 0.01s, startup_memory_srv_buffer_unplaced-heap-limit_control 0.01s, startup_memory_srv_volume_mips-overflow_control 0.01s, startup_memory_srv_volume_2d-view_control 0.01s, startup_memory_srv_volume_3d-view_control 0.01s, startup_srv_refusal_cache_device_control 0.01s, startup_memory_srv_buffer_first-32_control 0.01s, startup_memory_srv_buffer_exact-fit_control 0.01s, startup_memory_srv_buffer 0.01s, startup_memory_srv_buffer_unplaced-extent_control 0.01s, startup_memory_srv_as_alignment_control 0.01s, startup_memory_srv_buffer_height_control 0.01s, startup_resource_address_index_skip_control 0.01s, startup_memory_srv_as_offset_control 0.01s, startup_memory_srv_as_state_control 0.01s, startup_srv_refusal_cache_generation_control 0.01s, startup_memory_srv_report 0.02s, startup_srv_refusal_cache_stamp_control 0.01s, startup_resource_address_index_unsync_control 0.01s, startup_srv_refusal_cache_key_control 0.01s, startup_srv_refusal_cache_witness_control 0.02s, startup_resource_address_index 9.78s)
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim startup_placed_buffer_range_check startup_srv_refusal_cache_check -- -j 2): 75.21s (configure 2.19s)
    • Test (ctest --preset release -R 'srv_refusal|resource_address_index|memory_srv|startup_d3d12' --parallel 2 --no-tests=error --output-on-failure): 34/34 passed (7.55s: startup_resource_address_index 2.60s, startup_resource_address_index_missing_control_warp 3.91s, startup_memory_srv_diag_warp 2.45s, startup_memory_srv_diag_hardware 3.69s, startup_srv_refusal_cache 0.01s, startup_memory_srv_as 0.02s, startup_memory_srv_buffer_first-32_control 0.02s, startup_memory_srv_volume_3d-view_control 0.02s, startup_memory_srv_census 0.01s, startup_memory_srv_volume_layout_control 0.01s, startup_memory_srv_volume 0.01s, startup_memory_srv_volume_mips-overflow_control 0.01s, startup_srv_refusal_cache_unproven_control 0.01s, startup_memory_srv_buffer_unplaced-covers_control 0.01s, startup_srv_refusal_cache_generation_control 0.01s, startup_memory_srv_volume_2d-view_control 0.01s, startup_memory_srv_as_alignment_control 0.01s, startup_memory_srv_report 0.02s, startup_memory_srv_buffer_unplaced-extent_control 0.01s, startup_memory_srv_buffer_unplaced-heap-limit_control 0.01s, startup_memory_srv_buffer_exact-fit_control 0.01s, startup_srv_refusal_cache_witness_control 0.01s, startup_srv_refusal_cache_age_control 0.01s, startup_memory_srv_buffer 0.01s, startup_memory_srv_as_state_control 0.01s, startup_resource_address_index_unsync_control 0.01s, startup_memory_srv_as_offset_control 0.01s, startup_resource_address_index_skip_control 0.01s, startup_memory_srv_buffer_height_control 0.01s, startup_srv_refusal_cache_hits_control 0.01s, startup_srv_refusal_cache_device_control 0.01s, startup_srv_refusal_cache_stamp_control 0.01s, startup_srv_refusal_cache_key_control 0.01s, startup_memory_srv_diag_supported_control_warp 0.90s)
  • sccache: 5/26 hits; wall 124.8s

AI-assisted; commands listed were executed locally.

tedin7 pushed a commit to tedin7/Xbox2Windows that referenced this pull request Nov 26, 2026
tedin7 pushed a commit to tedin7/Xbox2Windows that referenced this pull request Nov 26, 2026
@SimSalabimse

Copy link
Copy Markdown
Contributor

Hardware and WARP result for head a4eeb366d995ff3204d7aa7cc1c62b8b9108400f: all pass. Part of #1723.

Environment: Windows 11 25H2 (26200), MSVC 19.42, dev preset, NVIDIA GeForce RTX 4070 Ti, driver 621.35 (32.0.16.2135). Tests run serially, one ctest process.

Commands

ctest --preset dev --no-tests=error -R "startup_memory_srv|slot70|address_buffer_srv|startup_address_srv|address_volume_srv|srv_refusal|startup_triage"
ctest --preset dev --no-tests=error -R "placed_buffer_range"

Result (measured): 40/40 and 3/3 passed, exit code 0 for both.

  • New: startup_srv_refusal_cache and its 8 --mutate controls (generation, witness, stamp, key, device, age, hits, unproven), all as expected.
  • startup_placed_buffer_range and its 2 controls (the PR changes placed_buffer_range.h).
  • Memory SRV tests that go through d3d12_memory_srv.inl: startup_memory_srv_{census,report,buffer,as,volume} with their controls, startup_triage_run, runtime_startup_triage_run_cli_check.
  • Device tests, WARP (6): dxr_slot70_as_warp, startup_address_srv_warp, startup_memory_srv_diag_warp, startup_memory_srv_diag_supported_control_warp, startup_address_buffer_srv_warp, startup_address_volume_srv_warp.
  • Device tests, hardware (5): dxr_slot70_as_hardware, startup_address_srv_hardware, startup_memory_srv_diag_hardware, startup_address_buffer_srv_hardware, startup_address_volume_srv_hardware.

What this shows: the change does not break the existing slot-70 memory SRV paths on a real NVIDIA adapter.

What this does not show: the cache test is a pure header test with no device variant, so no hardware test exercises a cache hit. I did not measure how many of the refusals in a real run get cached, or the frame time. That stays a hypothesis.

AI-Assisted

@tedin7

tedin7 commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator Author

Verification: head e524c2d55 after the main merge and the latest fixes.

Environment: Windows Server 2025 (build 26100), MSVC 14.44, D3D12 WARP and the hardware adapter, dev and release legs in parallel.

Commands (the same selection in both legs):

x2w_pipe.py win2025 2782 --force --regex '^(startup_srv_refusal_cache.*|startup_memory_srv.*|startup_placed_buffer_range.*|startup_address_buffer_srv.*)$'
  dev:     cmake --build --preset dev --target auto
           ctest --preset dev -R '^(startup_srv_refusal_cache.*|startup_memory_srv.*|startup_placed_buffer_range.*|startup_address_buffer_srv.*)$' --no-tests=error --output-on-failure
  release: cmake --build --preset release --target auto
           ctest --preset release -R '^(startup_srv_refusal_cache.*|startup_memory_srv.*|startup_placed_buffer_range.*|startup_address_buffer_srv.*)$' --no-tests=error --output-on-failure

Result: 35/35 passed in both legs, including all eight startup_srv_refusal_cache_*_control mutants.

AI-assisted; commands listed were executed locally.

@pigalot pigalot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independently reviewed e524c2d5 integrated over main e582a9a4 (tree c5a8ed51). The merge is clean and git diff --cached --check origin/main is clean.

R0Y00's same-total page move (changes requested on ef94abdd). The cache logic now handles it. A walk refusal is stored as a witness_page proof: the first page, from the allocation base, that is not committed in the allocation. A hit re-asks only that page. I checked this against real memory with a small probe outside the repository. The probe calls the PR's measure_placed_buffer, region_stamp and SrvRefusalCache with the same VirtualQuery body as buffer_refusal_page_still_uncommitted:

Case First request Immediate retry After the move (stamp unchanged) Full path after the move
reserve 128 KiB, commit the upper 64 KiB, request 64 KiB at the base; then decommit it and commit the lower 64 KiB refused, witness = the address (base 0) hit miss committed, covered
reserve 192 KiB, commit the first and last 64 KiB, request 128 KiB at the base; then decommit the last and commit the middle 64 KiB refused, witness = base + 0x10000 hit miss committed, covered

In both cases the allocation base, size and committed total stay the same (65,536 and 131,072 bytes), so the region stamps are equal. The entry misses only because its witness page is now committed.

What I ran. I built d3d12_xs_shim startup_stream_consumer offscreen_check startup_memory_srv_{as,buffer,census,report,volume}_check startup_placed_buffer_range_check startup_resource_address_index_check startup_srv_refusal_cache_check in dev and release, then ran:

ctest --test-dir out/build/<preset> --no-tests=error -j 4 -E '_hardware$' -R '^(startup_srv_refusal_cache.*|startup_memory_srv.*|startup_placed_buffer_range.*|startup_address_buffer_srv.*|startup_address_srv.*|startup_address_volume_srv.*|dxr_slot70_as.*|startup_resource_address_index.*)$'
ctest --test-dir out/build/<preset> --no-tests=error -j 1 -V -R '^(dxr_slot70_as|startup_address_srv|startup_memory_srv_diag|startup_address_buffer_srv|startup_address_volume_srv)_hardware$'

All 40 WARP and CPU tests pass, as do all 5 hardware tests, in both Debug and Release /O2, with no skips. startup_srv_refusal_cache passes, and its 8 --mutate controls fail as they should.

Mutants of my own. Each was applied alone, the targets above rebuilt in dev, the tests run, and the source restored afterwards (git diff --quiet clean).

Mutant startup_srv_refusal_cache device-level tests above
note_placement_change no longer advances the generation killed survives
buffer_refusal_page_still_uncommitted always returns true not reached (the check has its own fake page table) survives

Finding.

  1. R0Y00's case is pinned only against a fake page table, not through slot 70. tests/startup_srv_refusal_cache_check.cpp runs the page move against page_still_uncommitted, a two-entry array. No test calls the production predicate buffer_refusal_page_still_uncommitted or the device_memory_srv hit path. The second mutant brings back the behaviour R0Y00 reported on ef94abdd: a cached witness_page refusal then survives the page move for up to 250 ms. With that mutant, every test above still passes. R0Y00 asked to "keep the immediate same-total page-move case as a control", and reproduced the case through production device slot 70.
    • Suggested direction (unconfirmed): add a slot-70 case to one of the address-buffer SRV fixtures. It would reserve 128 KiB, commit the upper half, refuse at the base, then decommit it, commit and fill the lower half, and retry at once, expecting one memory SRV written. The mutant above should fail it. A second request after a placement change would pin the generation bump at the same level.

Non-blocking (hypothesis, not reproduced). measure_placed_buffer runs its queries inside x2w_local::outside_run_breaks, because pages of a shared-view run read as reserved during an xmem run break. The hit path's buffer_refusal_stamp and buffer_refusal_page_still_uncommitted call QueryVirtualMemoryInformation and VirtualQuery directly. With X2W_XMEM_SHARED_VIEWS=1, a witness page that was committed after the refusal could read as reserved to a retry that lands inside a break. That retry would then hit, although the full path would wait for the break and publish. Wrapping both calls in outside_run_breaks would rule this out. I did not build a run-break case.

Verdict: changes requested on e524c2d5 for finding 1. The proof model reads correctly and holds against real memory in the probe above. R0Y00's changes request on ef94abdd still stands, and I would leave the merge to R0Y00.

Environment: NVIDIA GeForce RTX 5090 driver 32.0.16.1088 and WARP 10.0.26100.9818, Windows 11 25H2 build 26200.9974, MSVC 19.52.37029. The hardware tests ran with the debug-layer settings each test chooses.
CI: Build and test on Windows, Assemble and translate gfx1013 fixtures and Run platform-independent Python checks on Linux pass on e524c2d5.

This reply was AI-assisted.

@tedin7

tedin7 commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks for the review. Pushed eb6b918b3 (merged with current main) for both findings.

  • New slot 70 cases go through the production predicate and the device hit path: reserve 128 KiB, commit the upper 64 KiB, refuse at the base, then decommit it, commit the lower half and retry at once. The retry now publishes exactly one memory SRV written and four rendered pixels match. A second case pins the placement-release path.
  • buffer_refusal_stamp and buffer_refusal_page_still_uncommitted now run inside outside_run_breaks, like measure_placed_buffer, so a retry inside an xmem run break cannot hit on a witness page that reads as reserved.

Verification:

  • Win2025 (Build 26100, MSVC 14.44), exact head eb6b918: x2w_pipe.py win2025 2782 --regex '^(startup_srv_refusal_cache.*|startup_memory_srv.*|startup_address_buffer_srv.*|startup_address_srv.*|startup_placed_buffer_range.*)$' --force
  • Debug and Release /O2: all selected tests passed, including startup_address_buffer_srv_warp and _hardware and the startup_srv_refusal_cache controls. A first run at 53ba0bb had failed on a parsing bug in the Python check, fixed in eb6b918.
  • Not run: the "always true" mutant against the new fixture.
  • Linux: cmake -S . -B <tmp> -DDXC_EXECUTABLE=/bin/true, public_guard.py, mingw -fsyntax-only on the changed fixtures.

AI-assisted; commands listed were executed locally.

@pigalot pigalot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Retested eb6b918b integrated over main fad97f47 (tree 677eaf7a). The merge is clean and git diff --cached --check origin/main is clean. This supersedes my changes-requested review on e524c2d5.

My finding on e524c2d5 (the page check was pinned only against a fake page table): addressed.

  • The new slot 70 page-move case reserves 128 KiB, commits the upper half, refuses at the base, then moves the commitment to the lower half and retries at once. The allocation base, size and committed total stay the same, so only buffer_refusal_page_still_uncommitted can tell the two states apart. This is also R0Y00's same-CommitSize probe from ef94abdd, now as a test.
  • The placement-release case pins the generation bump.
  • On 53ba0bb8 the check stopped at dest, address = match.groups(), because the acceleration-structure pattern has one capturing group. eb6b918b reads dest and address by name, and the check now runs to the end.

My non-blocking hypothesis (hit-path queries outside outside_run_breaks): addressed. buffer_refusal_stamp and buffer_refusal_page_still_uncommitted now run inside it, like measure_placed_buffer.

What I ran. I built d3d12_xs_shim startup_stream_consumer offscreen_check startup_memory_srv_as_check startup_memory_srv_buffer_check startup_memory_srv_census_check startup_memory_srv_report_check startup_memory_srv_volume_check startup_placed_buffer_range_check startup_resource_address_index_check startup_srv_refusal_cache_check in dev and release, then ran:

ctest --test-dir out/build/<preset> --no-tests=error -j 1 -R '^(startup_srv_refusal_cache.*|startup_memory_srv.*|startup_placed_buffer_range.*|startup_address_buffer_srv.*|startup_address_srv.*|startup_address_volume_srv.*|dxr_slot70_as.*|startup_resource_address_index.*)$'
  • 47/47 pass in Debug and in Release /O2, with no skips, on WARP and the RTX 5090.
  • startup_address_buffer_srv_{warp,hardware} reports "all 68 buffer SRV pixels exact; page move and placement release each published on retry".

Mutants. Each was applied alone, the targets rebuilt in dev, startup_address_buffer_srv_warp and startup_srv_refusal_cache.* run, and the source restored afterwards (git diff --quiet clean).

Mutant Result
buffer_refusal_page_still_uncommitted always returns true (survived every test on e524c2d5) killed: the page-move pixel is 000000ff, expected db0000ff (219)
srv_placement_generation no longer bumped killed: the placement-release pixel is 000000ff, expected e30000ff (227); startup_srv_refusal_cache fails too

Non-blocking. The merge replaced the description of unplaced_memory_buffer's refusal parameter with a shorter one. The earlier text named the three proof kinds (independent, fully_committed, witness_page) and said that a nullptr from a later step carries no proof. That was more useful.

Verdict: approve on eb6b918b. R0Y00's changes request on ef94abdd still stands, so I am not merging. The new page-move case is meant to answer it.

Environment: NVIDIA GeForce RTX 5090 driver 32.0.16.1088 and WARP 10.0.26100.9818, Windows 11 25H2 build 26200.9974, MSVC 19.52.37029.
CI: Build and test on Windows, Assemble and translate gfx1013 fixtures and Run platform-independent Python checks on Linux pass on eb6b918b. The pr preset's filter does not include startup_address_buffer_srv, so CI does not run the new cases.

This reply was AI-assisted.

@JohnConnorNPC

Copy link
Copy Markdown
Collaborator

Thanks for the work on this. I did a static review of head eb6b918. It looks mergeable, with two test gaps, but it still needs R0Y00's re-review: the changes-requested review on ef94abd stands, so the PR shows BLOCKED. The head does answer that request. 9f27526 makes the lookup exact by default (independent / fully_committed / witness_page proofs, no opt-in switch). eb6b918 adds the slot-70 page-move control in startup_address_srv.cpp (commit the upper half, refuse, move the commitment, retry), and the checker requires expected one retry write.

  • Merge: git merge-tree --write-tree origin/main <head> against main c3204a9 gives rc=0. In the merged tree every index / unplaced / tiled / ref-increment writer still calls note_placement_change.
  • Reviews: pigalot APPROVED eb6b918. GraphQL reviewThreads gives threads=2 unresolved=0 (both Codex P2s, fixed in ef94abd / 79d926f).
  • Header unit test on the merged tree (g++ -std=c++17, Linux): base run rc=0 fails=0, and all 8 --mutate controls give rc=1. Of 12 code mutants of srv_refusal_cache.h, 6 are killed and 6 survive: the key compare (3 forms), the backwards-clock guard now_ms < e.noted_ms, proof.witness == 0 in note() and the second-lock recheck.
  • CI: gh pr checks 2782 shows Windows, gfx1013 and Linux Python pass. Windows ran 100% tests passed out of 69, but grep -cE 'srv_refusal|address_buffer_srv' over that log gives 0: the pr preset matches neither new test, so CI has not run them yet.

SHOULD

  1. The key compare is unpinned. Dropping !(e.key == key) from both hit checks survives (K_hit_no_key_compare: SURVIVED rc=0), and so does dropping view_b == or device == from operator==. The existing key and device cases pass only because their keys hash to different slots (198 vs 143 of 256). Probe: note request(kBase,0), then look up request(kBase,70), which lands in the same slot 198. The base gives hit=0 and the mutant hit=1, so a colliding request would reuse another view's refusal. A collision case would pin it.
  2. No test observes a production cache hit. The device cases assert only that retries publish, a hit logs the same buffer_unavailable line, and grep -cE 'refusal_cache|SrvRefusal' over the two device test files gives 0. Removing the buffer_refusal_cache().note(...) call would likely keep every test green (inferred, not built). The speed-up is also unmeasured (the body says "not measured"). A hit counter in the report, or one re-measure of slot-70 view time, would back the title.

NIT

  1. 6 of the 7 non-merge commits are by c1 with a non-noreply author email that GitHub links to no account. You may want to switch those to a noreply address before merge.

Not run: no Windows or Wine build, no WARP or GPU. This covers static review, the trial merge and the header unit test with its mutants. Device-level claims rest on pigalot's and tedin7's runs.

This comment was AI-assisted.

@tedin7

tedin7 commented Nov 28, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks @JohnConnorNPC. Pushed 780f53fd4 (origin/main merged with a merge commit, no force push).

What changed:

  • Test gap 1 (key compare): a new case in startup_srv_refusal_cache_check finds, for each of the eight key fields, a request that lands in the same cache slot as another one, and requires a miss. Dropping !(e.key == key)-style compares now fails: removing device ==, view_b == or resource_b == from operator== each fail the new case.
  • Test gap 2 (a production hit is not observed on a device) and the unmeasured speed-up are not changed here; I would rather not claim a number I have not measured. The device tests still pin that a retry publishes and that the page-move sequence runs the full path.
  • The CI pr preset not running these tests is a CI selection question for the maintainers.

Verification:

  • Linux: header test g++ -std=c++17 -Wall -Wextra -> srv refusal cache checks passed.
  • Windows Server 2025 (D3D12 WARP), dev and release, head 780f53fd4: x2w_pipe.py win2025 2782 --regex '^(startup_srv_refusal_cache.*|startup_memory_srv.*|startup_address_srv.*|startup_address_buffer_srv.*|slot70.*)' -> 36/36 passed.

@MasterDomino ready for review and merge when you have time. pigalot approved eb6b918b; the old changes-requested review by @R0Y00 was on ef94abdd and the page-move case it asked for is on this head.

AI-assisted; commands listed were executed locally.

@pigalot pigalot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Retested 780f53fd integrated over main 212d4b5f (tree e09ddf73). The merge is clean and git diff --cached --check origin/main is clean. My approval on eb6b918b carries over to this head.

What changed since eb6b918b.

  • 96b845a2 merges main. git show --remerge-diff 96b845a2 is empty, so the merge resolved without hand edits. In the PR's source files the only difference from eb6b918b is main's own format-support change in d3d12_memory_srv.inl.
  • 780f53fd adds one case to tests/startup_srv_refusal_cache_check.cpp: for each of the eight key fields it finds a request that lands in the same cache slot as another and requires a miss. No runtime code changed.
  • I read the merged tree again for writers of the state the cache depends on (the resource address index, the placement groups, the unplaced buffers, the tiled address textures). Each one still calls note_placement_change; main added no new writer.

JohnConnorNPC's points on eb6b918b.

  1. Key compare unpinned: addressed. See the mutants below.
  2. No test observes a production cache hit: still true, and I confirmed it by building it (the last two mutants below). I don't treat it as blocking: with the cache never written or never hit, the stand-in behaves as it does on main, and the tests that exist pin the direction that matters for correctness (a cached refusal never hides a view the full path would publish). The speed-up named in the PR title stays unmeasured, as the body says.

What I ran. I built d3d12_xs_shim startup_stream_consumer offscreen_check startup_memory_srv_as_check startup_memory_srv_buffer_check startup_memory_srv_census_check startup_memory_srv_report_check startup_memory_srv_volume_check startup_placed_buffer_range_check startup_resource_address_index_check startup_srv_refusal_cache_check in dev and release, then ran:

ctest --test-dir out/build/<preset> --no-tests=error -j 4 -E '_hardware$' -R '^(startup_srv_refusal_cache.*|startup_memory_srv.*|startup_placed_buffer_range.*|startup_address_buffer_srv.*|startup_address_srv.*|startup_address_volume_srv.*|dxr_slot70_as.*|startup_resource_address_index.*)$'
ctest --test-dir out/build/<preset> --no-tests=error -j 1 -V -R '^(startup_address_buffer_srv|startup_address_srv|startup_address_volume_srv|startup_memory_srv_diag|dxr_slot70_as)_hardware$'
  • 42/42 WARP and CPU tests and 5/5 hardware tests pass in Debug and in Release /O2, with no skips.
  • startup_address_buffer_srv_hardware reports "all 68 buffer SRV pixels exact; page move and placement release each published on retry".

Mutants. Each was applied alone, the targets rebuilt in dev, the tests run, and the source restored afterwards (git diff --quiet clean). Header mutants ran startup_srv_refusal_cache; device mutants ran the five _warp device tests above.

Killed (13):

  • the key compare dropped from both checks in hit;
  • each of the eight fields dropped from SrvRefusalKey::operator== (device, address, span_bytes, view_a, view_b, view_c, resource_a, resource_b), one mutant per field;
  • note_placement_change no longer advances the generation: fails startup_srv_refusal_cache and, separately, startup_address_buffer_srv_warp (placement-release pixel 000000ff, expected e30000ff);
  • buffer_refusal_page_still_uncommitted always returns true: fails startup_address_buffer_srv_warp (page-move pixel 000000ff, expected db0000ff).

Survive (5):

  • the second-lock recheck in hit without its generation compare, and without its hit-limit compare. Both differ from the original only when another thread replaces the entry between the two locks; the test is single-threaded.
  • the proof.witness == 0 guard in note removed. unplaced_memory_buffer never builds a witness_page proof with a zero witness, so the guard is not reached from the stand-in.
  • the buffer_refusal_cache().note(...) call removed, and the hit call replaced by false. Every device test still passes: this is point 2 above.

Equivalent (3):

  • the key compare dropped from only the first check, or only the second: the other check still rejects the request.
  • the now_ms < e.noted_ms guard removed: the unsigned difference wraps to a value above kMaxAgeMs, so a backwards clock still misses.

Title run. A run of 780f53fd against the baseline of main 212d4b5f passed:

  • [pass] run_finishes: The run finished its input plan: ready 435.2 s after start, 4 cycles run.
  • [pass] frames_present: 12 of 12 checkpoint frames captured, 0 black (baseline: 0 black).
  • [pass] input_response: 4 of 4 input cycles changed the picture and changed it back (baseline: 4 of 4).
  • [pass] matches_baseline: 12 of 12 checkpoint frames within 25 of the baseline (largest difference 12.0).

I did not record a visual judgement of the frames.

Non-blocking.

  • A hit counter next to the slot 70 census counters would let a device test require "the second identical refusal was a hit", which would kill the last two surviving mutants and give the PR title a number.
  • My earlier note on the shortened description of unplaced_memory_buffer's refusal parameter still applies.

Verdict: approve on 780f53fd. R0Y00's changes request on ef94abdd still stands, so I am not merging. The slot 70 page-move case added in eb6b918b is meant to answer it.

Environment: NVIDIA GeForce RTX 5090 driver 32.0.16.1088 and WARP 10.0.26100.9818, Windows 11 25H2 build 26200.9974, MSVC 19.52.37029, Python 3.12.10. The hardware tests ran with X2W_TEST_DEBUG_LAYER=1.
CI: Build and test on Windows, Assemble and translate gfx1013 fixtures and Run platform-independent Python checks on Linux pass on 780f53fd.

This reply was AI-assisted.

@lukaslw-lab lukaslw-lab left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 780f53fd: read the diff, then merged it into a local build, ran its tests with ours (startup_srv_refusal_cache*, startup_memory_srv*, startup_address_srv*, startup_address_buffer_srv*, startup_placed_buffer_range*, plus our table-lock, view-token and retire families: 57/57 passed in release) and measured it in an A/B below. No code findings beyond the reviews above; adding numbers for the unmeasured speed-up.

Workload. A 360 s startup run from a save on main 46226004 + #3097 with the opt-in D3D12 switches on (without this PR) ends with memory SRV refusals (slot 70): total 4,732,251, of them buffer_unavailable 4,625,002: about 12,800 per second, roughly 610 per frame, against 545,784 in the log the body cites. Slot 70 writes in the same run: 35,082,001 calls. The refusals come from 81 distinct buffer_unavailable shapes (memory SRV refused shape N).

A/B. Same build with and without this PR (780f53fd merged locally; the conflicts with #3391's table lock in d3d12_capture.inl and d3d12_xs_device.cpp resolved by keeping TableWriteLock and adding note_placement_change()), same switches, shader cache and input; means over 250–360 s, after the load has settled:

Run PR fps Title CPU (cores) GPU 3D buffer_unavailable (whole run)
A1 no 23.32 5.39 18.4 % 4,625,002
A2 no 22.29 5.36 17.5 % 5,445,970
B yes 21.40 5.33 16.8 % 5,851,550
  • No measurable gain: B is inside the noise of the two A runs (they differ by 1.0 fps), and the title's CPU use does not drop. One B run cannot show a slowdown either.
  • The refusal count stays as high as before, as the body says (a hit still calls refuse_memory_srv), so the log cannot tell how often the cache hits. A total hit and miss counter in the existing census line would show whether the 256 slots keep this workload's refusals, or whether entries expire (250 ms, 1024 hits) or are pushed out before they are reused.

RTX 3080 Ti, driver 32.0.16.1047, Windows 10 19045.

@JohnConnorNPC

Copy link
Copy Markdown
Collaborator

Thanks for the slot-collision case in 780f53fd. I re-checked the head against current main (c04e0dd6). The branch needs a merge of main before it can land, so I didn't re-review it in depth.

  • Conflict. git merge-tree --write-tree c04e0dd6 780f53fd exits 1, with conflicts in src/startup_stubs/d3d12_capture.inl (two hunks) and src/startup_stubs/d3d12_xs_device.cpp (the publish_placement call). All three are against startup: opt-in table lock so resource and heap lookups stop queueing on note_lock #3391's table lock. A resolution that keeps main's TableWriteLock (and the std::optional<TableWriteLock> around publish_placement) and adds note_placement_change() looks enough. In note_resource it goes beside the lock. In retire_placement it goes inside the if, after placement = Placement::none. In publish_placement it goes in the index callback. Could you merge main (or rebase) and re-run the targeted tests on the merged head?
  • Our earlier suggestion 1 (key compare) is answered. I built tests/startup_srv_refusal_cache_check.cpp from the head with g++ -std=c++17 -Wall -Wextra on Linux, and it gives srv refusal cache checks passed (rc=0). The three mutants that survived on eb6b918b now fail. Dropping !(e.key == key) from both hit checks gives rc=1, FAIL found a slot collision for device. Dropping device == from operator== gives the same line, rc=1. Dropping view_b == gives rc=1, FAIL found a slot collision for view_b. srv_refusal_cache.h is unchanged (sha256 84838f9fda70).
  • Default path. The cache has no switch, so every slot-70 memory SRV refusal goes through it on every run, plain launcher runs included. That makes the re-run on the merged head the important one.

R0Y00's changes request on ef94abdd still stands, so this needs their re-review once the conflict is resolved.

Environment: Linux only: git objects, git merge-tree, and the header test with its three mutants on scratch copies. I did no Windows, WARP or GPU run.

This comment was AI-assisted.

# Conflicts:
#	src/startup_stubs/d3d12_capture.inl
#	src/startup_stubs/d3d12_xs_device.cpp
@tedin7

tedin7 commented Nov 30, 2026

Copy link
Copy Markdown
Collaborator Author

Merged current main (077bff3ac) to resolve conflicts; Linux C++ tests and negative controls pass.

@lukaslw-lab lukaslw-lab left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed ca9b3164 by reading the diff; not built or run. Our earlier A/B ran 780f53fd. The main merge changes none of this PR's own lines.

Verdict: comment. No MUST. The lookup is exact, but publishing requests now do extra work, and nothing shows that the cache hits yet.

  • SHOULD read the memory stamp only when it is needed (src/startup_stubs/d3d12_memory_srv.inl:801). buffer_refusal_stamp makes one region-information call before hit() on every buffer request. Before this PR, a request that publishes through existing_memory_buffer (line 814) made no memory query. Only fully_committed and witness_page entries compare the stamp, and note() needs it only on a refusal. Reading the generation first, as now, and the stamp only after a key match whose proof needs it, or on the refusal path, keeps the lookup exact. In our run, slot 70 had 34.75 M calls, 5.85 M of them buffer_unavailable. The census does not show how many are buffer requests that publish.
  • SHOULD add hit and miss counts to the census line. Refusals log as before, so our A/B (23.32 / 22.29 fps without, 21.40 with) cannot tell whether the cache hits. The generation is process-wide: about 13 placed resources were created per second after 250 s (Device::slot133), and each creation empties all 256 slots.
  • Checked, no finding: every writer the lookups depend on bumps the generation under note_lock, including the release to zero refs (d3d12_xs_device.cpp:1245). Scans take that lock after reading the generation, so a concurrent change can only make an entry stale.

Tests: startup_srv_refusal_cache and its eight controls test the header with a fake page query. The startup_address_srv draws 15 and 16 check that a retry publishes after a page move and after a release. CI ran none of them: the pr filter matches none of these tests.

Run: main 46226004 + #3097, 360 s from a save, RTX 3080 Ti, driver 32.0.16.1047, Windows 10 19045.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants