Repository navigation
Conversation
Native GPU submission probes every page at both ends of each host copy. That makes repeated copies of streaming pages expensive and leaves a gap between the probes and the actual read. With VICTORY_COPY_PLAIN=1, copy disjoint ranges of 256 bytes to 1 MiB straight into writable host buffers. Recover at the exact copy instruction so the existing page fallback still restores the readable bytes around a hole. Limit the size because the existing memmove path measured faster for 16 MiB copies. A native GPU-layer test exercises a protected source page between two readable pages with the option enabled and disabled. Based-on: fxceless/victory-fork#1032 Tested-on: RX 6800, Xeon E5-2670 v3, Fedora Linux 45 x86_64 Assisted-by: gpt-6.2 sol xhigh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Native GPU submission currently uses
process_vm_writevto probe both ends of a host copy one page at a time. For repeated streaming-page reads that work can cost more than the copy and still leaves an interval in which the source can be unmapped.VICTORY_COPY_PLAIN=1lets native Linux copy disjoint ranges from 256 bytes through 1 MiB directly into host buffers. The existing signal handler recognizes faults at the copy instruction after giving write watching its normal chance to handle a fault. It returns to the caller's per-page fallback, which still zero-fills the unavailable pages. The size cap keeps large transfers on the existing nativememmovepath.On the test PC, each synthetic sample copied 128 MiB, alternating the two paths. The median times across five timed samples were 22.63 ms versus 11.02 ms at 64 KiB and 11.41 ms versus 10.22 ms at 1 MiB. At 16 MiB, the existing path took 25.14 ms versus 31.61 ms with the guarded instruction. These measurements cover CPU copies between ordinary host buffers.
The protected-page regression passed with the option off and on against this PR’s base branch. All 14 native VM tests also passed. An integration build using the same patch also bound all title imports and reached the story loading sequence on the native Wayland and RADV backend. That run ended at its 170-second timeout with no GPU reset. Open-world performance still needs a paired run.
A longer run on the same RX 6800 reached a report with 2,841 draws per frame, then ended at about 171 seconds with D3D12 device removed (
0x887a0005). The kernel logged an AMDGPU graphics-ring timeout and a successful ring reset. During its diagnostic dump it logged a failed PCIe read into the card’s BAR5 register range. The machine also recorded graphics resets and PCIe errors in an earlier native run before this patch. The latest result leaves the trigger and open-world performance unresolved.Based-on: fxceless/victory-fork#1032
Tested-on: RX 6800, Xeon E5-2670 v3, Fedora Linux 45 x86_64
Assisted-by: gpt-6.2 sol xhigh