Skip to content

gpu: opt-in lazy GPU write-back (VEH), O(dirty) CopiedPages, AVX2 shadow & AdapterKey PSO (vitutu1#20 handover) - #51

Closed
Vladimir-Human wants to merge 85 commits into
PastiiJay:mainfrom
Vladimir-Human:perf/lazy-copyback-rebar-pso
Closed

Vladimir-Human wants to merge 85 commits into
PastiiJay:mainfrom
Vladimir-Human:perf/lazy-copyback-rebar-pso

Conversation

@Vladimir-Human

@Vladimir-Human Vladimir-Human commented Nov 25, 2026 •

Copy link
Copy Markdown

Summary

AI-assisted handover and major reliability/performance upgrade of vitutu1/victory-perf PR #20 (since that repository is now unavailable), bringing four opt-in / zero-regression subsystems onto PastiiJay/klbf-lab beta:

  1. Opt-in Lazy GPU-Resident Write-Back (VICTORY_LAZY_COPYBACK=1, default OFF):
    • Avoids copying 42–100+ MB/frame of shader-written buffers back over PCIe every frame when title CPU code never reads those pages.
    • Tracks clean eligible whole-page-aligned regions with PAGE_NOACCESS and an acyclic VEH fault handler (lazy_on_fault, never acquiring Level 0 watch/Shadow/BUFFERS/CARD_WORK/host.submitted locks); flushes only actually accessed 64 KiB pages on demand, using atomic dual-view MapViewOfFile writes before restoring PAGE_READWRITE for section-backed MEM_MAPPED console heaps (zero torn-read window).
    • Preserves coherence across DirectStorage title_memory_written (lazy_release_written_range with partial-page complement copy and pending-write FlushedBaseline preservation), VICTORY_RELAY / late_exact (Shadow::writing pending carve-out, stale_under_writes/merge_under_writes settle on LAZY_RESYNC, Step::GpuWrite settle in stale_under_flights), host::{copy_mapped, read_into, write_mapped} lazy_flush_and_hold range barrier, multi-flight FlushedBaseline subrange consumption, overlapping Shadow::exact / nested views (lazy_flush_other_shadows), shadow::unregister, and watch::Remapping (LazyRemapGuard).
    • Completely inert (0 overhead, unchanged paths) unless VICTORY_LAZY_COPYBACK=1 is set.
  2. O(dirty) CopiedPages & AVX2 Shadow/Merge Acceleration:
    • Replaces linear full-shadow scans with a 64-page uncopied_bits bitmask and lock-released plan_stale / plan_stale_filtered, plus AVX2 first_difference / last_difference, changed_runs, merge_piece, merge_sync_card, merge_gpu_into_title_runs, and merge_back_piece (preserving title-wins conflict handling).
  3. Opt-in ReBAR Upload Path (VICTORY_REBAR=1|2, default OFF):
    • Explicit D3D12_HEAP_TYPE_GPU_UPLOAD path with write-combining fences (_mm_sfence() after WC stores; _mm_mfence() + VMOVNTDQA + RAII MfenceOnExit for reads).
  4. Adapter-Keyed PSO Library Isolation (AdapterKey):
    • Keys pipeline/library.rs cache filenames by (vendor, device, revision, software) ({:04x}-{:04x}-r{:02x}-{sw|hw}) with strict Release/Acquire publish ordering (VIEW[1] / LOADED_AT / TRIMMED before VIEW[0]). Subsystem ID and driver version are deliberately omitted from the filename key so driver updates reopen the same file and fall back cleanly to an empty library if D3D12 rejects old blobs.

Verification (6b174ce6f, monotonic hardening on top of 7d31a81e)

  • Scope: only 4 files touched (host.rs, pipeline/library.rs, shadow.rs, watch.rs; shadow.rs = 410,902 B < 512 KiB), xtask policy --staged exit 0, clean merge-tree vs beta (78ad571).
  • cargo clippy -p victory-gpu --all-targets --locked (+ --all-features): 0 warnings in all modified/added code.
  • VICTORY_D3D12_DEBUG=1 cargo test -p victory-gpu --locked --all-features -- --test-threads=1: 185 passed; 0 failed; 5 ignored (0 D3D12 debug errors; includes all F1–F5 + 5 relay/VEH concurrency regression tests).
  • VICTORY_D3D12_DEBUG=1 cargo test -p victory-gpu --locked -- --test-threads=1: 177 passed; 0 failed; 5 ignored (0 D3D12 debug errors).
  • --release RTX 4070 SUPER / i5-13400F benchmarks (7d31a81e):
    • bench_lazy_copyback (64 MiB carded VRAM, 30 frames): 0% CPU reads 37.299 -> 0.585 ms/frame (63.78x, 0.00 MB/f readback/upload, 0.0 VEH faults/f); 2% sparse CPU reads 37.454 -> 9.001 ms/frame (4.16x, 1.25 MB/f, 20.0 faults/f).
    • bench_shadow_and_rebar: plan_stale 11.4 ns/call, 64 MiB AVX2 first+last 0.38 ms (175.5 GB/s), ReBAR GPU_UPLOAD 32 MiB write+SFENCE 3.10 ms (10.8 GB/s).

(Completes 10/10 open vitutu1/victory-perf PR handovers onto PastiiJay/klbf-lab beta: #15, #16, #29, #41, #42, #43, #44, #46, #50, and this PR.)

Co-Authored-By: AI Assistant

fxceless and others added 30 commits November 24, 2026 13:48
- 59 of the 64 trace programs and the irradiance-cache shading program
  translate; 51 programs leave the approximate wave64 forms.
- The workspace passes the lint with warnings as errors in both feature sets;
  a few style lints are let through in Cargo.toml for this fork.
- README status updated (relay and in-place memory results);
  docs/fork-ray-tracing.md describes what the title does and what is built.
…astiiJay#1)

Co-authored-by: ZazaJr24 <218105339+ZazaJr24@users.noreply.github.com>
…ning

- Shader tests: a software adapter given as the default device is not taken
  for a hardware device, so the tests that need a real card skip there.
- Diagnostics: the stencil plane of dumped depth-stencil targets and the
  title's descriptions of its stencil views.
- README: the newest commits lose the GPU device shortly after start on the
  test machine; the cause is not found yet.
The update moved the particle light-atlas compute programs to a form that
puts group barriers inside branches and loops; a dispatch of them stood on
the card until the device was reset. That form is now off unless
VICTORY_WAVE_WIDE=1, and the shader cache key includes the wave switches.
Checked with a plain run of this tree on the test machine.
…apter

Hosted runners list a display stub first, so the default device there is the
software adapter; the tests that need a real card now skip it.
- Clean-up passes over each translated module (VICTORY_SHADER_OPT bits: dead
  code, folding, reuse, branch facts, loads within a block, wave64 first-lane
  exchange), part of the shader cache key. About 43 % fewer host instructions
  over the pack; about 20 ms less GPU time per frame on the test machine.
- translate: a census of the emitted code.
- Checked with plain game runs of this tree on the test machine.
…ative VGPR reads keep parked lanes (PastiiJay#11)

The console compiler parks a wave64 lane mask in two lanes of a spare VGPR
and may restore the halves with other instructions between the two
v_readlane_b32. The pair restore now looks ahead in the block (nothing between
may touch the second register, write the first, or save into the lanes), so
the mask comes back as a mask. This lets indirect_light_probes
CS_IrradianceCache_Shade / ShadeSecondary translate: they were dropped every
frame, leaving the irradiance cache unlit and everything in shadow black.

An M0-relative read (v_movrels_b32) names every VGPR from its base up, which
marked the parking VGPR as an ordinary one and turned unspilling off for the
whole program. Relative reads no longer count there (relative writes still
do). billboard_nobump CS_RaytracingResolve_a56bfb9c translates with it.

translate: VICTORY_TRANSLATE_ONLY=<hash prefixes> limits a run to those
containers; VICTORY_HOST_MAX_WAVE=32 translates as on a 32-lane host, so
--pipelines matches what the runtime creates on NVIDIA.
Comments, documents and descriptions now say "the title". No code changes.
Its programs translate and run, but on the test machine the lighting gain
could not be shown, it costs about 40 ms of GPU time per frame, and the
picture is being re-checked one change at a time from a known-good tree.
It may come back once that is settled.
The previous commit took it out; that was not wanted. The tree is again as
it was before that commit.
Double-precision shader instructions (v_cvt_f32_f64, v_add_f64 sums, the
makeDouble overload name and flag), a first half of a paired interpolation
read as data, sooner eviction of idle textures and caches under memory
pressure, a retried DirectStorage destination write, the texture catch-up
budget, VICTORY_FIRSTLANE_OWN, and zlib-rs in place of miniz_oxide.

Left out: the fork's personal launcher scripts and its readme.
…e commit)

Every host view heap ends at a null slot that view indices past the heap
read (a host that takes large heaps gets 2^21 views; one that caps them
keeps the capped heap), the cache key includes that limit, and
v_permlane16/x16 are lowered.

Both forks lower v_cvt_f32_f64. The IEEE form with its test is the one in
use; this branch's flush-to-zero form is kept beside it, unused, and its
test is ignored until the console's float mode for the instruction is
checked.
…acters' skin and hair without colour in most launches)

A texture a shader picks by index was uploaded once, when the title wrote
its view, and again only if the view was rewritten or the runtime told of
a remap. The title often fills the texture's memory only afterwards (its
streaming reads land later), so the host copy kept what the memory held at
the first look for the rest of the run: zeros. Which textures lost that
race changed from launch to launch; the main character's face came out
black and her hair pale in about three launches of four.

Now a texture uploaded whole is looked at again after 4, 12, 40, 120 and
400 frames (a fingerprint of 48 KiB of its memory); a changed one is
uploaded again and the looks start over. One test launch re-uploaded more
than 6,000 textures this way. VICTORY_HEAP_RECHECK=0 turns it off.

Known gap: the fingerprint samples the start, middle and end of the
memory, so a texture whose other parts arrive later is still missed.
… are on the card before the character bake; one host copy per placed texture

- The depth bounds test (PastiiJay#82 by Kaivyyy, as is): a pipeline that enables
  it is made from a DEPTH_STENCIL1 stream under its own library name, and
  the title's OMSetDepthBounds reaches the host list. Before, such draws
  passed at every depth. On the test machine (RTX 4070) the first room is
  lit by its lamp for the first time: walls, table, bunks.
- Defaults: what shaders wrote is copied back by a thread of its own
  (stage 2), wide copy-back, card copies from 1 MiB up to 1,024 MB, and
  256 lists in the air. About 230 ms a frame where it was about 400.
  Off: VICTORY_RELAY=0, VICTORY_WIDE_BACK=0, VICTORY_CARD_BUFFERS_MIN_MB=16
  VICTORY_CARD_BUFFERS_MB=512, VICTORY_LATE_WAIT_LISTS=128.
- Textures picked by index are uploaded while loading and before a draw of
  the title's decoration bake, which samples them by index and runs once
  (VICTORY_EARLY_TEXTURES_MS, VICTORY_BAKE_TEXTURES_MS; 0 turns each off).
- Placed textures are keyed without the filler words of their description:
  two views that differed only there each had a host copy
  (VICTORY_PLACED_FILLER=1 keeps the old key).
- VICTORY_TEXTURE_ROOM_PERCENT (90, unchanged) sets how full the card may
  get before textures picked by index wait.

Known: the first room's walls are still missing in some launches, and
shaded areas are too dark (the bounce light has no ray-tracing structure
to trace yet).
…freshed when the card is full

Two fixes for textures that shaders pick by index, both proven with a
slot listing before they were made:

- The title keeps only a texture's small levels and places the next
  texture in the address range of the absent large ones. Described at full
  size every neighbour overlapped, and each view written took the textures
  beside it out of the upload queue and made their host slots null (tens
  of thousands of slots a run). A newer view now makes an older one stale
  only when it starts within that one's first 4 KiB.
  VICTORY_STALE_TEXTURES=overlap: the old rule; =0: never. Unit tests on
  the span table alone. The first room is lit with its walls and the
  characters' textures in the first launch with it.
- With the card at its limit, a texture that already has its host copy is
  uploaded again when the title changed its memory (it took no new card
  memory, and was refused all the same).
  VICTORY_REUPLOAD_WHEN_FULL=0: as before.

Logging only, off unless asked for: both video memory groups and budget
moves; card accounting (VICTORY_CARD_ACCOUNTING=1); the slots a listed
draw's shaders read, with their state (VICTORY_LIST_SLOTS=); a trace for
the missing first-room walls (VICTORY_WALLS_TRACE=1 or 2). A card test of
what a bare command costs (ignored by default):
cargo test -p victory-gpu --release -- --ignored bare_command_cost --nocapture

Known: about 3 to 5 frames a second; more than half of the texture memory
on the card is held for levels the title has not loaded yet (next).
…rites counted; levels on demand (off); warm-up; card memory numbers

Memory sync:
- The guard over every view of a physical page (code by myokex, victory-amd
  c6dc4d8, after pull request PastiiJay#115 by Spexivus, its correction by joroyt and
  a part of VIctory #1122 by tightfall): the title shows one page at several
  addresses and a copy was guarded at one only. 0.8 to 1.0 million writes
  through another view in a five-minute run on the test machine.
  VICTORY_VIEW_GUARD=0 turns it off.
- Kernel reads into title memory are read beside and copied in (Joshua Odom,
  10ea38e).
- Writes of the storage layer into physical pages are counted where the
  title has the pages mapped and can open the guards there
  (VICTORY_PAGE_WRITES, off: counted only). Failed page-destination reads
  are retried.

Card memory:
- Levels on demand, off unless VICTORY_LEVELS_ON_DEMAND=1: a texture the
  title fills takes card memory for the levels the title holds; held levels
  get memory only while the card has room and are asked for again. Its test
  runs on the software adapter; not run on a card yet.
- Refused texture slots are held back so a pass reaches the slots behind
  them; room can be kept for card copies of title buffers (off).

Tools: translate --warm all; the shader cache is keyed on the translator's
source; counters for copy-back races, page writes and the copies the
texture sweep never lets go; a walls trace.

Game runs of these changes on an RTX 4070: five five-minute runs without a
device loss or a failed request. This merged tree was built; its test
suites were run on the tree the changes come from (gpu 129, hle 97).
…ored, views off their copy's elements get their own bytes, card room for the first world frame, levels on demand run on the card

- Descriptor records the title copies into its heap as bytes are mirrored
  before each submission (pull request #305 by Flyander, after upstream
  VIctory 86a5ed6), with a per-slot fingerprint so only records that
  changed are mirrored, the page read through the kernel, a switch
  (VICTORY_HEAP_SYNC=0) and a counter: about 40,000 records a frame on the
  test machine.
- A buffer view off its copy's elements gets a copy of its own bytes
  (after upstream 86a5ed6; VICTORY_VIEW_OWN_COPY=0: refused as before).
- Room on the card for the world's first-frame bursts: buffer copies
  (VICTORY_CARD_ROOM_FOR_BUFFERS, now on) and render targets
  (VICTORY_CARD_ROOM_FOR_TARGETS_MB, 3,072); a copy turned down gives its
  room up and is logged; the texture pass asks again every 32 MiB. 98
  buffer copies made (945 MB) where earlier runs made 1; 25 MB compared
  on the processor a frame where it was 550 to 710.
- Levels on demand: the fixes of pull request #747 by AscilCH. First run
  on a card (RTX 4070, VICTORY_LEVELS_ON_DEMAND=1): no device loss, 3.1 GB
  not allocated for levels the title does not hold. Still off by default.
- The guarded blocks under storage writes into physical pages are opened
  by default (VICTORY_PAGE_WRITES=0: counted only).
- Shaders: a program is translated with first-half interpolation pairs
  only if it was refused for one (with it on for every program 8,551
  working pixel programs came out changed); parked lane-mask pairs,
  f64 conversions and sums, lane permutations: 14 more programs translate.
- Counted, not fixed: an indirect compute pass asks for about 77,500
  groups in x and is cut to 65,535.

One five-minute game run of these changes on the test machine: no device
loss, no failed request. This merged tree was built; its test suites
were not run.
…c, draw-table slots left to their draws, no failing write-watch calls; card fetches inside their flights (off by default)

- Descriptor sync: a multiply-and-fold fingerprint of a record in place of
  BLAKE3 (35 to 42 ms a frame over 250,000 to 300,000 records), and slots
  that draws read through tables lately are left to their draws
  (VICTORY_HEAP_SYNC_TABLES=1 mirrors them too): the pass over the heap
  went from 70-220 ms a frame to about 3.
- Write watch: no kernel asking for memory the guards already hold as view
  memory (pull request #670 by Jonirulah).
- Card copies' flagged pieces can come down inside their own flights
  (pull request #648 by Jonirulah; VICTORY_CARD_FETCH_INFLIGHT=1, off by
  default). One game run with it on: no device loss, the copy-back
  thread's fetch wait 181 -> 0 ms a frame, the card busier; no frame-time
  gain claimed.
- Logging: the heap pass's texture part and buffer slots; indirect compute
  dispatches over 65,535 groups.
- README: what was measured, and that pull request #220 with
  VICTORY_INDIRECT_WINDOW=1 lost the device twice here and is not in.

One five-minute game run of this tree's source on an RTX 4070: no device
loss; the frame is still 250 to 380 ms (the card is the limit). This
merged tree was built; its test suites were not run.
…ompile never ends (39f0e9aeb156a61c, override with VICTORY_SKIP_PIPELINES)
…ke each half wave as a console wave

On a host that may run pixel programs in waves of 64 (AMD), ballots, v_mbcnt,
first-lane and computed lane reads of a console wave32 program are taken per
32-lane half: the upper half no longer sees the lower half's mask.
VICTORY_PS_HALVES=0 turns it off. VICTORY_HOST_WAVE=32 translates compute
programs as for a 32-lane host.
…rm-mode ftz)

The console's MODE and NVIDIA flush them; a host left to "any" (AMD) kept
them, so legacy 0*x tests and reciprocals saw tiny numbers instead of 0.
VICTORY_DENORM=any (or preserve) leaves the mode to the host; part of the
shader cache fingerprint.
…e hosts; denormal flush only on request

Whole-wave sums, minimums, maximums, bit reductions and sum prefixes of a
console wave32 pixel or vertex program run as two host reductions, one per
32-lane half, like its ballots. fp32-denorm-mode ftz drew a triangle-edge
pattern on AMD: it is now left to the host unless VICTORY_DENORM names a mode.
A float a pixel program exports to a colour target gets NaN as 0 and an
infinity as +-65504; typed image and buffer stores get the same for the NaN
the GPU makes (0x7FC00000) and infinities, so integer bits pass. One bad pixel
no longer stays in a history blended into every frame. VICTORY_NAN_GUARD=0
turns it off; part of the shader cache fingerprint.
…dwords; AMD orders a shared-dword i64 compare wrong)
…_TEXTURE_QUEUE_MB/MS), defaults 1024 MB / 1000 ms
…they touch, not all title memory (fxceless/victory-fork PastiiJay#95; VICTORY_MAPPING_RANGES=0 restores the global lock)
@Vladimir-Human

Copy link
Copy Markdown
Author

Split #51 into 4 clean, independent PRs on beta (each passes VICTORY_D3D12_DEBUG=1 tests + xtask policy --staged, with zero cross-dependencies so they can be merged or reverted individually):

  1. Part 1/4 — Adapter-keyed PSO pipeline cache: gpu/pipeline: adapter-keyed PSO cache filenames and atomic rename (1/4 of #51) #56
  2. Part 2/4 — CopiedPages O(dirty) bitmask, lock-free has_pending/has_dirty/has_sent mirrors, AVX2 merge/diff & WideDone: gpu/shadow: O(dirty) CopiedPages bitmask, lock-free mirrors & AVX2 merge/diff (2/4 of #51) #57
  3. Part 3/4 — Opt-in ReBAR (D3D12_HEAP_TYPE_GPU_UPLOAD) + VRAM headroom guard & WC streaming helpers: gpu/shadow: opt-in ReBAR GPU_UPLOAD heap with VRAM guard & WC streaming (3/4 of #51) #58
  4. Part 4/4 — Opt-in VEH lazy GPU-to-CPU copy-back: gpu/shadow: opt-in VEH lazy GPU-to-CPU copy-back (4/4 of #51) #59

Leaving #51 open until you'd like to close it once the split queue lands.

@PastiiJay

Copy link
Copy Markdown
Owner

All four parts received (#56-#59), that's much easier to test. We'll go through them one at a time on the RX 9070 XT, starting with #56 and #57, and report in each PR. Closing #51 once they land is fine.

Backport concurrency hardening identified in @efsebayern's review and
TaynanGT/Vice-Tay#192 (c289a95):
- Keep `self.copied` locked across `self.copy` in `Shadow::copy_stale` so
  concurrent refreshes cannot observe `at == now` before bytes land or race
  on writing `self.data`.
- Skip `card_dirty` immediately when `!c.has_dirty` instead of locking and
  pruning `c.sent` on clean copies.
@Vladimir-Human

Copy link
Copy Markdown
Author

Backported the concurrency hardening identified by @efsebayern and @TaynanGT (TaynanGT/Vice-Tay#192, c289a95) in 5810d6b:

  • Hold self.copied across copies in Shadow::copy_stale: keeps the copied mutex locked from plan_stale / plan_stale_filtered through self.copy(...) so concurrent refreshes cannot observe stamped at == now pages before their bytes land or race on writing self.data.
  • Skip clean copies in card_dirty: returns early when !c.has_dirty instead of locking and pruning c.sent on clean copies.

Verified locally on Windows (VICTORY_D3D12_DEBUG=1):

  • cargo clippy -p victory-gpu --all-targets & --features diagnostics: 0 warnings in crates/victory-gpu/src/shadow.rs (only pre-existing upstream warnings in untouched files)
  • cargo test -p victory-gpu --lib shadow:: -- --test-threads=1: 48 passed; 0 failed; 2 ignored
  • cargo test -p victory-gpu --features diagnostics --lib shadow:: -- --test-threads=1: 48 passed; 0 failed; 2 ignored

@PastiiJay

Copy link
Copy Markdown
Owner

Thanks @Vladimir-Human, and credit to @efsebayern and @TaynanGT for the hardening. We'll review it with the next beta batch. Could you rebase on the current head if it no longer merges cleanly by then?

@TaynanGT

Copy link
Copy Markdown

@PastiiJay I checked 5810d6b against the current beta at 6cce57e. The merge is clean as of that revision. For the beta baseline, the lock-scope fix protects the ordinary shadow refresh too, so the first run with lazy write-back and ReBAR off will still exercise it.

@Vladimir-Human

Copy link
Copy Markdown
Author

Thanks @PastiiJay and @TaynanGT! Confirmed 5810d6b merges cleanly against current beta (6cce57e), and I am ready to rebase whenever the next beta batch lands.

@PastiiJay

Copy link
Copy Markdown
Owner

Thanks @Vladimir-Human, and @TaynanGT for the earlier testing. Lazy write-back is the riskiest of the batch, so we're reviewing it carefully and won't merge it in a rush. Could you post your GPU and driver with the VICTORY_LAZY_COPYBACK setting you used?

@TaynanGT

Copy link
Copy Markdown

@Vladimir-Human I’ll keep 6cce57e as the verified beta reference and check the new beta head once the next batch lands.

@PastiiJay

Copy link
Copy Markdown
Owner

We'll take them onto the AMD line one at a time with an A/B bench. Thanks, the tests you added make that much easier.

@PastiiJay

Copy link
Copy Markdown
Owner

We don't merge PRs directly, to keep the line safe. But we'll port the best of your work ourselves, one piece at a time with an A/B bench, and credit you by name. Thanks for the careful work across these PRs.

@TaynanGT

Copy link
Copy Markdown

@PastiiJay The copy-lock change is isolated in Vice-Tay #192 if you want that piece first. It is a narrow starting point for the beta port and keeps the lazy write-back and pipeline library experiments separate.

@PastiiJay

PastiiJay commented Nov 27, 2026 •

Copy link
Copy Markdown
Owner

checked it against our AMD line: our copy_stale already holds copied for the whole copy and card_dirty has no dirty/sent split, so that race isn't there. thanks for pointing at it, it was worth the check.

@TaynanGT

Copy link
Copy Markdown

@PastiiJay Use the current AMD copy path as the baseline for the lazy write-back comparison. Your lock-scope check establishes the starting point for that port.

@PastiiJay

Copy link
Copy Markdown
Owner

Thanks @TaynanGT, that's a good idea. Our current AMD copy path will be the reference for the before/after bench when we pick up the lazy write-back.

@TaynanGT

Copy link
Copy Markdown

@PastiiJay That AMD path is the reference I’d use. On the same frame window with ReBAR off in both runs, record transferred bytes and queue waits along with frame time. That will show whether lazy write-back changes traffic or just moves the wait.

@Vladimir-Human

Copy link
Copy Markdown
Author

Quick note for that A/B comparison @PastiiJay @TaynanGT: #59 (7311cab) now logs MB read back, explicit flushes, VEH read/write faults, and self-bypassed on the 5s line whenever VICTORY_LAZY_COPYBACK=1 (in both release and diagnostics builds, zero output when off). Happy to backport that same counter line into #51 too if you benchmark the combined branch.

@TaynanGT

Copy link
Copy Markdown

@Vladimir-Human The #59 counters give us useful detail for the lazy arm. Let’s use the same readback and queue-wait totals in both arms, then use the extra counters to explain the lazy run. The backport can stay separate until we compare the combined branch.

@PastiiJay
PastiiJay changed the base branch from beta to main November 28, 2026 11:05
Vladimir-Human pushed a commit to Vladimir-Human/klbf-lab that referenced this pull request Nov 28, 2026
…mit-diagnostic

Report Windows commit-limit failures in crashes.log
Vladimir-Human pushed a commit to Vladimir-Human/klbf-lab that referenced this pull request Nov 28, 2026
A refused XMemVirtualAlloc or XMemAllocDefault handed the title a null in
silence, and the title then writes at null plus an offset, which reads
like a title bug. In #289 the faulting write is at 0x217800, the
request's length 0x2173a0 rounded up to 2 KiB, so the base it built on
was most likely such a null.

At the commit limit, XMemVirtualAlloc now writes the same crashes.log
report the physical-page commit writes since PastiiJay#51 (the shared part is
`commit_refused`); other refusals, and a host heap out of memory, are
warnings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 65062e133c75c3b6e984ac51e904512d41f71f93)
@Vladimir-Human

Copy link
Copy Markdown
Author

Closing rollup PR: cleanly split and ported onto origin/stable-amd (75022ba) across #180 (1/4), #184 (2/4), #185 (3/4), and #190 (4/4).

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.

10 participants