d3d12: parallelize shadow page sync with guarded 64 KiB digests and surface Stage::Shadow #498
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/498"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from brcly/TuxBox. Originally posted by DrArroway on 2026-11-29T17:04:11Z.
Summary
Stage::Shadow(shadow) inTUXBOX_SUBMIT_PROFILE=1whenever live shadow imports exist (has_shadow_imports()), makingsync_shadow_imports()directly visible in submission profiles (fixes the blind spot reported in #472).Mutexlocking, per-pageVirtualQuerysyscalls, and single-threaded2×DRAM reads (diff_copy_chunksreading bothguestandbaseline) with:Digestcaching (tuxbox_guarded_digest/guarded_copy_read) so clean blocks do1×guarded DRAM read and zeroVirtualQuerysyscalls while preserving untouched GPU writes inshadow_base.ShadowSyncPool, 8-block / 512 KiB stripes across2..=12threads serialized underSYNC_WORK, keeping an inline fast path at<= 16blocks).Verification
GE-Proton11-14):tuxbox-d3d12(device::heap::shadow,submit_profile): 8 passed, 0 failed (including newparallel_multi_block_shadow_sync_preserves_gpu_writes_and_skips_clean_blocksandshadow_sync_survives_unaccessible_guest_page).tuxbox.py checkon RX 6900 XT (1002:73bf, Mesa RADV, GE-Proton11-14):lanes-benchmark:submit_us=112.4 roundtrip_us=160.1 copy64k_us=158.1 frame_us=258.0 frame_p99_us=378.1), all 22/22 D3D12 synthetic regression controls, and shader translator GPU checks passed.tuxbox.py checkon AMD Raphael iGPU (1002:164e, Mesa RADV, GE-Proton11-14):lanes-benchmark:submit_us=72.8 roundtrip_us=129.0 copy64k_us=95.2 frame_us=289.6 frame_p99_us=516.3), all 22/22 D3D12 synthetic regression controls, and shader translator GPU checks passed.#464mode,TUXBOX_SUBMIT_PROFILE=1):shadow = 4.3 ms/batch, scanning 174 MiB at ~40.5 GiB/s).shadow = 17.4 ms/batch, scanning 742 MiB at ~42.6 GiB/s — saturating physical DDR5 bandwidth).