Memory by address: no arena storm when the low range is full; reserve its room at the start
With the structure builder on (VICTORY_BVH_BUILDER=1), memory::ready asks for another arena at every build dispatch while the spares are low. Once upload::reserve could find no 64 MiB gap in [4 GiB, 2^37), nothing remembered it: every one of thousands of dispatches a frame searched the address range again under the MEMORY lock (the recording threads ~70 % in the kernel under VirtualAlloc2), frames took 7 to 32 s, and the title's own hang watchdog (the store to 0 at +0x23cf683) ended the run. - Memory::another: after a failure, none is tried again before the next frame; the reason is logged (no room, or its copy could not be made), and a reservation whose copy could not be made is given back. - upload::reserve_early, at host creation: 50 reservations of 64 MiB in the low range, with write watch, when the builder is on (VICTORY_LOW_EARLY_MB, 3200; 0 off). An arena commits one of them before looking for room. Separate pieces, not one 3.2 GB reservation: as one, the submissions' write-watch askings walked across all arenas in single runs, about 2 ms a frame more. RTX 4090, prison area, ray tracing on, frame generation off: - before: stuck at 19 arenas, ~280-650 pages a frame read as zeros, watchdog crash 1-3 minutes in; - after: 28 arenas, ~18 pages a frame once settled, no watchdog crash, 22-28 fps (30 cap) after the first minute. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
29d8dbf7d9
commit
30b979ee48
3 files changed
+118
-1
No files matched your search
@@ -984,6 +984,7 @@ fn create() -> windows::core::Result<Host> {
|
||||
.and_then(|factory| factory.EnumAdapterByLuid::<IDXGIAdapter3>(device.GetAdapterLuid()))
|
||||
.ok();
|
||||
tracing::info!("host D3D12 device ready");
|
||||
crate::upload::reserve_early();
|
||||
Ok(Host {
|
||||
device,
|
||||
queue,
|
||||
|
||||
Reference in new issue
Block a user