Repository navigation
kernelx: commit a mapping call's sparse pages once per run, not per page - #1792
gavinnolan wants to merge 1 commit into
Conversation
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Linux (Wine + vkd3d-proton) + NVIDIA test of Setup: Fedora 44 (kernel 7.2.9), Wine 11.21 Staging (Wayland driver), vkd3d-proton v3.1-90-g30b0eb9b with the relaxed-vtable patch from #175 and a local dxil-spirv patch. RTX 4070 12 GB (driver 615.71.09), Ryzen 9 9950X3D, 62 GB RAM. Release, cross-compiled to Tested
Every 30th frame was dumped and all were black in all four runs (0 of 129,600 samples not black), with and without the change. In Series X mode the same dump has picture from frame 140. From XCL's "UMA opened" line to "textures in title memory" took 6.2 s and 3.3 s without the change and 1.8 s and 1.7 s with it. Without it the pools grew by 1,152 to 2,496 MB per 2 s line once the growth was under way, against the 256 MB per 2 s in the description. At that rate the growth is over in 3 to 6 s, which I take to be why the 24 s stall does not appear here. The breakpoint at In the default Series X profile ( Read
Not tested: the length of the title's one call (the memory lines show only the pools' growth); why every dumped frame is black in Series S mode; Series S past 60 s; the rest of the suite; AMD and Intel. AI use: Claude Code (Claude Fable 5.2) read the diff, built the trees, ran the test and the eight runs and wrote this report. Posted without review by a person: the account owner was away and reads replies later. |
# Conflicts: # crates/xcl/src/hle/kernelx.rs
A
MapTitlePhysicalPagescall toldsparseabout every 64 KiB page it mapped in a sparse window on its own: oneUpdateTileMappingsand one fenceSignalper page, about 0.5 ms a page on NVIDIA. In Series S mode (device_type = "lockhart") the retail title maps about 3.6 GB in one call at boot. Its main thread stayed in that call for 24 s, and the title's stall check ended it with the null write at+0x2215c35at 34 s, before the first frame.map_pagesnow gathers neighbouring sparse pages into runs and commits each run with onesparse::committedcall. A run is committed early whenever the same call is about to decommit one of its pages: a page moving away from an address still in the run, or homes being given back. Part of #232.What is in it
crates/xcl/src/hle/kernelx.rs:SparseRun(add / holds / flush) used bymap_pages, flushed beforemove_away/move_home_awaycan decommit a page in the run, on both error returns and at the end of the call.GIVE_BACK_PAGESnames the existing 4096. Unit testsparse_pages_are_committed_once_per_run.Tested
cargo test --workspace -- --test-threads=4with DXC 1.9.2609 (XCL_DXC_DIR): 892 passed, 0 failed, 42 ignored.SKIPPED:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows),pso_measurement_compiles_an_exact_synthetic_record(needs Developer Mode).scripts/smoke.ps1 -Seconds 120, sparse pools from theXCL_ACTIVITYmemory lines:main4178e88: sparse pools grow 256 MB every 2 s from 10 s to 34 s (3648 MB), no present, then0xc0000005at+0x2215c35at 34.3 s.0x80000003at+0xcc2834), which this PR does not touch (D3D12.X: R9G9B9E5 render targets / UAVs are half floats where the device refuses them (retail title, Series S) #242 / D3D12.X: promote R9G9B9E5_SHAREDEXP render/UAV targets to R11G11B10_FLOAT #605 address it).Regression run
main (
4178e88):this PR (
f03d411):Both runs loaded DXC 1.6 from the Windows SDK: the DXC 1.9 folder is on
D:, which the defaultD:console mount hides onmain(#833).Not tested
UpdateTileMappingscost per call is as high.AI use