Feature request: opt-in host-RAM budget with loading backpressure and reclaim #3010
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 Marvisak/VIctory. Originally posted by pickles976 on 2026-11-26T03:25:29Z.
Problem
On a 16 GiB Linux/Wine laptop (RTX 4060 Laptop 8 GiB), a guarded Series S title load on VIctory #2972 head
7e769e07e274reached the account picker and loading art but not controllable gameplay. A 130 s scheduled trial stopped at 86.25 s when systemMemAvailablefell to 1,979 MiB, below a 2,048 MiB safety floor; it started at 13,297 MiB available. The Wine scope was using 7,450 MiB (anon 2,787 MiB), GPU usage peaked at 3,113 MiB; the external guard deliberately killed the process (137), so this is not a title crash. An earlier 95 s trial had a different starting available RAM and is not a matched improvement claim.A hard per-scope
MemoryMax=9GandMemorySwapMax=512Mprevent an unbounded host OOM but do not turn required allocations into longer loading: when reclaim fails they deny allocations/kill the scope. XCL has a separate opt-in Windows Job Object commit-cap proposal (#1831 over there) that, in Wine 11.0 on this machine, reports successful job assignment while allowing a 128 MiB committed allocation under a 64 MiB cap. Neither guest-visible console memory budgets nor an OS hard cap implement loading backpressure.Distinct request
Please consider an opt-in, configurable budget for host-owned reclaimable/in-flight RAM (for example
VICTORY_HOST_RAM_BUDGET_MIB, disabled unless set), not a promise of an exact total-process RSS limit. Before admitting staging, shadow snapshots/host copies, DirectStorage intermediate buffers and concurrent decompression/compile work: account live and in-flight bytes; trim idle pools/caches; allow queued work to wait for released capacity and wake on completion. Keep title-required pinned/live allocations intact. If a required request cannot fit (or no release can make progress), return a specific diagnostic/failure rather than wait forever, discard content, or silently claim the process stays under the cap. Do not hold queue/graphics locks while waiting. Track/counter host-owned bytes separately from unaccounted title, Wine and driver memory; report both process/scope and global available memory so the config’s guarantee is explicit. Keep OS guard as the outer safety fuse.This is not a duplicate of #471 (commit-limit crash attribution), #407/#880 (in-place memory design), or #2764 (settings/profile recommendation). Existing PR #2972 trims idle staging/scratch and evicts host textures on DXGI non-local pressure, but its texture eviction is per presented frame and its 64-submission trim need not run during a stalled load; #2981 reuses bounded decompressor scratch; neither implements an app-wide admission budget. #471 notes DirectStorage
intermediate_sizeis not limited. Those mechanisms are natural integration points, not alternative duplicate proposals.Verification criteria
No title assets or unredacted logs attached; local measurements are from the user-owned machine. AI assistance: OpenAI Codex (GPT-6 Sol) reviewed the local test evidence and drafted this request; the user explicitly asked for the issue.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-26T03:45:56Z.
Automated triage for the maintainers.
Labelled as a request. Bounding the host memory VIctory itself holds fits the project's scope (it applies to Windows hosts as much as to the Wine run measured here).
mainhas no host RAM budget setting today. The related open work is theGPU-HOST-MEMORYtask in the #1633 table, PR #2972 (trims idle staging and evicts host textures under pressure) and PR #2981 (bounded decompressor scratch), with #471 for the unbounded DirectStorage intermediate size.New since the last triage: a per-owner measurement on
main63bcca4(RTX 4060 Laptop, Wine, a log-only probe) found the copies of title memory outside buffers (LOOSEincrates/victory-gpu/src/shadow.rs) the largest growing owner, from 256 to 2,012 MiB during loading, while texture staging stayed at 32 MiB. That matches the documented shortcut next toLOOSEinshadow.rs: copies of windows are never freed, and keying them to the title's allocations is left to do. Open PR #2856 (reuse an already-covering window) was measured on top and still reached 2,604 MiB of retained windows before the same memory guard stopped the run, so reuse alone does not bound it; retiring stale windows safely is the open part.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by pickles976 on 2026-11-26T04:14:39Z.
Measurements in response to the triage request: loose shadow windows are the largest growing owner among the CPU-backed pools sampled in this run; idle texture staging/snapshot pools are not. This narrows a first target, not a complete RAM census or a demonstrated reclamation fix.
Provenance and guard
main63bcca43c6+ local log-only probe, no contributor PRs integrated. Windows-MSVC release,--features diagnostics, Rust 1.98.1; fresh compilation from this checkout confirmed. The probe does not change allocation, scheduling, reclamation or inputs; its sampling/logging has overhead.VICTORY_KEYS=20:Enter: picker followed by loading artwork; screenshot at ~70 s still artwork, no controllable world.Owner snapshots from the same load
All figures below MiB, capacities rather than physical residency. Menu sample UTC 04:12:17; late-loading sample 04:13:15 on 2026-11-26, shortly before guard stop.
shadow::LOOSEbacking, sum of keyed window lengthsshadow::BUFFERSregistered copies, size rounded to 64 KiBshadow::ARENAbackingtexture::CHUNKSbackingDirectStorage's existing scheduler meter, with
staged/stagingadded to its 5 s line: 1.33 MiB maximum observed staged, 32 MiB configured staging, zerostaging_waitson the sampled lines. This meter coversstaging_bytes()(buffered file source bytes), not decompressor output/scratch or every intermediate allocation, and periodic samples can miss transient peaks.The last existing texture diagnostic (04:13:16) reported 2,537 decimal MB host textures, 318 MB used by lists. Its texture census split GPU-written bytes as 297 / 1,977 / 0 MB (used by lists / only viewed by heap slots / neither); title-memory textures 20 / 44 / 0 MB. DXGI reported 3,053 MB local and 3,232 MB non-local usage. These are separate accounting views, not additive with the table or scope memory; heap-slot-only does not mean safe to destroy. The logged working set was 8,820 MB, while Wine's process-commit field was 2,790 MB: do not equate either with the Linux scope meter.
Method and limits
A local diagnostics-only thread, started once at host-device creation, samples every 2 s independently of presentation. It uses separate
try_lockcalls, skipping unavailable owners rather than blocking or nesting owner locks. It sumsPOOLVec capacities, registered shadow lengths,LOOSEkey lengths, arena bufferGetDesc().Widthand free runs, staging chunk count × CHUNK, and standalone staging sizes. ExistingHEAP_BYTESand list-upload counters are also logged. No title data is read by this probe.37 periodic samples; 35 successful loose-map samples, with the last loose sample at 04:13:15 (later lock contention is missing data, not zero). The registry census excludes unregistered copies still held by lists. Active snapshot capacity, decompressor scratch, compiler caches by owner, guest backing and Wine/driver allocation attribution remain unmeasured. An additional external file/shmem breakdown sampler produced no rows; only the working guard's scope-total/anon columns are claimed. This is neither a complete process ledger nor proof that 2,012 MiB is immediately reclaimable.
Suggested first owner work
On this main revision,
shadow.rsdescribesLOOSEas copies of windows that are never freed and suggests keying them to title allocations. The measured rise here is 1,756 MiB between the two snapshots, whereas texture staging stays at 32 MiB. Please prioritize checking loose-window overlap/reuse and tying cached window ownership to guest allocation generations/lifetimes; retirement must preserve views, pending GPU writes and command-list/fence references. A cap that waits without a path to retire those strong references would just turn memory pressure into a stuck load. Do not simply evict all windows or enable unsafe in-place memory on this discrete GPU.A focused regression should stream/reuse/release guest ranges while a list retains an older generation, verify its data through completion, then show backing stops growing after safe retirement. Repeat these same counters for the guarded title comparison; distinguish a reduced shadow peak from actually reaching gameplay.
Local evidence:
main-63bcca4-memory-probe-build.log,20261126T041203Z-console.log,20261126T041203Z-resources.csv; startup control20261126T041119Z-*. Logs/screenshots remain local; no title assets attached. AI assistance: OpenAI Codex instrumented, ran and summarized the measurements on the user's machine.Physical-accounting follow-through: mixed in-place stack (2026-11-26)
This is not another main-only measurement:
3ed7d725f6895fe1a235eb6fa8ff2485261ca151(#2945 stack) plus #211229decb3719142296cad124453a3b8651068f22f6GPU-write notification logic and local read-only ownership probes. Exact pin/alias tests and mixed-stack provenance are in #2945. Fixed256KiB loose windows, default1MiB in-place floor, explicitVICTORY_IN_PLACE=1.Extended the local guard's cgroup sampler with
memory.stat file/shmem/kernel, retaining all old columns and safety cutoffs. A real16MiB private +32MiB shared touched-mapping CLI check produced21.0MiB anon/32.1MiB file including32.0MiB shmem/0.3MiB kernel. Shmem is a subset of file, not another additive bucket.Fresh29.45s diagnostics release; account input20s; actual84s screenshot still loading artwork. Run stopped at100s wall limit, exit137, not the RAM threshold. Minimum available RAM2265.7MiB, GPU peak3369MiB, scope peak7684.1MiB, available disk minimum19.762GiB. No gameplay/FPS claim. Three compute PSOs still refused0x80070057.
The largest measured category late in loading is shared-memory-backed file pages, not anonymous memory alone. This is cgroup accounting, not attribution to a particular allocator, guest/Wine/driver owner, or proof of reclaimability. Samples are not atomic and totals need not exactly reconcile. Logical shadow spans cannot be subtracted from these figures as unique physical allocations. Next useful attribution is scope-process mappings/backing objects, rather than assuming all4.2GiB shmem belongs to loose copies.
Artifacts
.compat-runtime/logs/20261126T064510Z-{console.log,resources.csv,guard-events.jsonl}andmenu-20261126T064634382643Z.png. Same Wine11.0 / NVIDIA590.48.1 / RTX4060 Laptop8GiB /16GiB RAM and diagnostic relaxed vkd3d-proton3.2.02576c0b4adfae4a+(assertions disabled; allocator/list vtable identity checks removed, null checks retained), not stock-runtime certification. Unchanged GPU6000MiB / available-RAM2048MiB / available-disk10GiB guards,9GiB cgroup/512MiB swap caps. No code PR/push.Backing-object attribution follow-through (2026-11-26)
Same verified mixed-stack diagnostics executable as above, no title-code change/source switch, now with read-only external scope-process snapshots at20/80s. The helper groups
smapsby pathname/permissions, records proportional PSS, and deduplicates regular backing objects by device/inode across all file descriptors. Real fixture proof: two resident aliases of one32MiB memfd give64MiB RSS but32MiB PSS; four handles identify one32MiB backing object. It never suspends or writes target processes.Both title snapshots covered13 processes with zero read errors, taking0.152s/0.479s. Raw paths remain local. The large objects are unlinked Wine
tmpmap-*section backings; this launcher's/tmpis a private tmpfs, not disk storage. The largest object's handles are held by wineserver and the title-host process. File size stayed3977MiB while allocated blocks grew722.56→3533.61MiB.At80s the host process also had1928.34MiB PSS in
/dev/nvidiactlmappings and2561.30MiB in anonymousrw-pmappings. The largest Wine section had17529 mapped segments acrossrw-s/r--s, with overlapping views; its mapped PSS was1484.20MiB, not its3533.61MiB allocated backing. This is why summed RSS or mapped PSS alone cannot be used as a census of the backing object's charge. Non-atomic accounting and allocated-block metadata are not, by themselves, a guarantee of residency or reclaimability.Source mechanism: this tree's production
XMemAllocatePhysicalPagescreates a pagefile-backed section (xmem.rs:494, SEC_COMMIT on Wine);mapinstalls its slices throughMapViewOfFile3(:814). That is consistent with these section backings. The exact FD→XMem allocation association has not been traced, and I am not claiming that every committed guest page is disposable host cache. Do not delete Wine temporary paths or indiscriminately reclaim these pages; they are already unlinked and may be live/pinned/aliased.The100s run ended on the wall guard/137. Verified80s loading artwork, no world/gameplay. Minimum available RAM2297.1MiB, GPU peak3369MiB, scope peak8349.2MiB, available disk minimum19.680GiB; same three compute PSO refusals remain. Logs
.compat-runtime/logs/20261126T065607Z-*, notablymaps-20s.json/maps-80s.json; screenshotmenu-20261126T065728250015Z.png. Same diagnostic-relaxed-vkd3d caveat and unchanged resource limits as above. This is new ownership evidence, not a successful load or a memory-saving claim.Imported from Marvisak/VIctory. Originally posted by pickles976 on 2026-11-26T04:17:23Z.
Existing candidate for the measured loose-window owner: #2856 reuses an already-covering window. Its isolated lookup fixture passed on this RTX 4060 Laptop/Wine host with local test-only changes requiring all three allocations/lookups to succeed: https://github.com/Marvisak/VIctory/pull/2856#issuecomment-7182457101 . This verifies covering-window identity and the noncovered case, not shader execution or reduced retail RAM. The main owner measurement above did not include #2856; keep this distinct from reclamation/admission, since retained windows are still not freed. AI-assisted verification (OpenAI Codex).
Imported from Marvisak/VIctory. Originally posted by pickles976 on 2026-11-26T04:21:26Z.
Measured follow-up: main + #2856 covering-window reuse still hits the unchanged free-RAM guard before gameplay on this RTX 4060 Laptop / 16 GiB Wine host. 7,707 covering hits, but retained loose backing reached 2,604 MiB; stop at 90.14 s / 1,960.5 MiB MemAvailable. At ~72 s, loose backing was 1,940 MiB vs baseline 2,012 MiB. Cache/background conditions differ, so later termination is not a proven speed/memory benefit. Full provenance and comparison: https://github.com/Marvisak/VIctory/pull/2856#issuecomment-7182516879 . This strengthens the need to distinguish required/live shadows from stale retained windows before specifying reclamation/admission policy; reuse alone did not satisfy the loading gate. AI-assisted local verification (OpenAI Codex).
Imported from Marvisak/VIctory. Originally posted by pickles976 on 2026-11-26T13:05:38Z.
RAM-focused verifier update: the latest standalone #2971, #2972 and #2974 heads pass the focused checks below, but none eliminated this machine's early-loading RAM-floor stop. These are individual candidates, not a combined stack.
ba430844050e8ab54d4fabbecaaa3c8b01d76a515c0ad8e109ba0ed96e09eaa83832b50ac6b92f26e1630fb4eea1889a32c1a7c337e8680d230378ba#2971/#2972 have local test-only edits replacing silent no-device returns with failures in the lazy-metadata/arena probes. Their production code is unchanged; both initialized the physical RTX 4060. #2974 is clean; its selected ownership checks are CPU tests, not GPU shader execution proof. No ignored selected tests.
Each title run rebuilt victory-gpu from its named checkout, restored the same cache/data/vkd3d-cache seed, used Series S (reported 1920×1080, window cap1280×720), the same 15/25/35s input sequence, and unchanged guards: 2048MiB minimum available RAM, 6000MiB GPU ceiling, 10GiB disk floor, 9GiB cgroup plus512MiB swap, 95s cap. All ended by the RAM guard, not a diagnosed OOM crash; screenshots show loading artwork/transitions, not gameplay. The main-based heads do not include the separate Wave64 fix; compute pipeline refusals remain.
#2971 menu Rust heap was586MB versus602MB in the #3078-disabled reference. This is a small observed reduction, not a claim of equivalent total resident savings. #2972/#2974 did not establish meaningful RAM-floor relief here. Final scope anonymous memory was2520/2698/2524MiB; shmem4068/3984/4042MiB respectively (shmem is included in file accounting, not additive to it). Starting available RAM varied11756/12109/12344MiB; do not interpret stop-time differences or endpoint subtraction as causal savings.
#3078's separately controlled disabled-vs-default comparison and passing eviction regression are reported at https://github.com/Marvisak/VIctory/pull/3078#issuecomment-7192726897 . It removed12 idle windows accounting for67MB in the default-threshold run, but both legs still hit the RAM floor. This does not test or refute its reported multi-GB savings in a longer world run.
Environment: RTX4060 Laptop8GiB,16GiB system RAM, NVIDIA590.48.1, Wine11.0, DXVK3.1.1, diagnostic-relaxed vkd3d-proton3.2.0
2576c0b4adfae4a+(assertions and allocator/list vtable identity checks disabled; null checks retained). Not stock-vkd3d certification. Local resource/console logs:20261126T125823Z,20261126T130048Z,20261126T130313Z; focused test logsram297{1-descriptor,2-reclamation,4-retention}-tests.log. No title assets attached.Next RAM investigation should attribute the multi-GB backing/shadow populations and their lifetimes, rather than assume these smaller retention changes resolve the loading floor. Earlier Wine tmpmap attribution in this issue remains suggestive, not a proven FD→XMem association.
AI-assisted verification using omp/OpenAI Codex.
Imported from Marvisak/VIctory. Originally posted by pickles976 on 2026-11-26T19:41:27Z.
XMem → Wine backing identity verified; section-wide retention reproduced
Follow-up to the earlier FD-attribution uncertainty in https://github.com/Marvisak/VIctory/issues/3012#issuecomment-7182422880. A new bounded startup now directly joins XMem allocation ownership to Wine backing objects. This is attribution, not a loading-memory fix or a new main measurement.
Provenance / method
Local
3ed7d725f6895fe1a235eb6fa8ff2485261ca151(#2945) mixed stack, retaining the previously tested #2112 GPU-write-notification subset and #1893e39e34037915da6d0f10b58b2872799bd9f3ca8Wave64 integration. New local diagnostics-only XMem probe; existing memory/shader behavior unchanged. Fresh relevant dependencies and release executable compiled from this checkout (44.52 s). Not an exact PR-head test.Linux / Wine11.0 / Rust1.98.1 / RTX4060 Laptop8GiB / 16GiB system RAM / NVIDIA590.48.1 / DXVK3.1.1. Same diagnostic-relaxed vkd3d-proton3.2.0
2576c0b4adfae4a+, not stock-runtime certification.VICTORY_IN_PLACE=1, Series S, requested reported mode1920×1080/window cap1280×720; actual host swapchain log says3840×2160, so this is not a 1080p rendering/performance proof.The probe logs each
XMemAllocatePhysicalPagessection identity, handle, original opaque first-page number and capacity. ThreePHYSICAL.try_lock()censuses at2/10/18 seconds after first allocation copy only integer metadata: surviving page tokens, unique mapped section-page keys, views, Arc counts and one representative view address/section offset. No owner clones, guest-page reads/writes, suspension, eviction or allocation-policy changes. File I/O occurs after unlocking. Observed registry hold times2.102–4.682 ms: not zero-overhead profiling.External read-only snapshots retain per-VMA addresses, file offsets, device and inode. The join requires the representative VA and matching section offset, then joins device/inode to deduplicated FD
fstatrecords. No size-only matches. Snapshot capture began63–80 ms after each census and took111–131 ms; all three had zero reported read errors. Non-atomic snapshots remain a limitation. Raw paths, pointers and captures remain local.Observed owner census, final startup sample
All four directly matched Wine section backings held by wineserver/main at the10/18-second censuses. The large3977MiB object is specifically a single
XMemAllocatePhysicalPages(count=63632)allocation, not a shadow-window cache allocation. Its allocated blocks grew505.406→722.559MiB between the first two censuses while every original page token remained live. At the later snapshots its Arc count70869 exactly matches63632 page records +7237 view owners; those view spans include aliases and must not be summed as physical memory.The earlier loading experiment's3977MiB backing grew722.56→3533.61MiB, but those historical aggregate snapshots lacked VAs/offsets. This new run establishes the mechanism/owner directly; it does not retroactively identify an ended process's FD, prove that its late-loading pages were freed, or measure a loading-stage saving. Logical section capacity, mapped aliases, backing blocks, RSS/PSS and cgroup charge are distinct accounting views. In particular, the297MiB section has many mappings but zero allocated backing blocks here.
Reproducible partial-release lifetime result
A separate local fixture used the real XMem allocation/map/free/unmap functions under Wine with the same private-tmpfs
/tmparrangement and9GiB/512MiB scope. Allocate256×64KiB (16MiB), map/touch the full range, map a second alias of the last page, then:The remaining alias retains the original byte after physical-token release. Final unmap drops the last section owner (
Weak::upgradefails), the exact backing device/inode disappears from captured FDs, and scope shmem drops16MiB. Fixture passed1/1 in1.74s after fresh15.86s compile. The GPU adapter initializes through existing notifications, but this is an XMem/Win32 lifetime fixture, not shader execution.This demonstrates that freeing page records plus unmapping their ranges does not discard their touched backing while another part of the section survives. It is not evidence that the title has performed that partial release during loading: every original token was still live in the short startup census. Existing source closes the section only when its final Arc drops; it has no per-range backing discard in
XMemFreePhysicalPages.Implications / suggested next check
Do not budget the multi-GB XMem backing as disposable host cache, delete its already-unlinked files, or discard bytes merely because one alias disappears. Any range-level reclamation needs proof that no page token, surviving alias, DirectStorage operation or GPU pin still requires the bytes, plus concurrent alias/release/data-preservation tests.
A separate local host-policy lead is now concrete: the launcher's private
/tmpis tmpfs, so these sparse Wine section files consume shmem as they are touched. A bounded synthetic comparison with an isolated disk-backed temporary directory could establish what is actually reclaimable without discarding live guest bytes. That is only a proposed experiment: disk availability, writeback cost and GPU-import pinning still matter; no title fix, safe new default or performance benefit is established.The new title run was24 seconds, no input, visible account picker, deliberate wall stop/137. Minimum available RAM7230.9MiB, GPU peak3325MiB, scope peak3749.4MiB, available disk minimum17.351GiB. All original guards remain: available RAM2048MiB, GPU6000MiB, disk10GiB, scope9GiB/512MiB swap. No loading attempt, gameplay or FPS claim.
Local artifacts:
build-xmem-attribution-provenance.log;xmem-fixture-20261126T193249Z/{test.log,fixture-*-joined.json};xmem-startup-20261126T193653Z/{provenance.txt,startup-*-joined.json};20261126T193653Z-{console.log,resources.csv,guard-events.jsonl}. No game assets or screenshots attached. AI-assisted instrumentation/verification using omp/OpenAI Codex.Imported from Marvisak/VIctory. Originally posted by pickles976 on 2026-11-26T20:06:31Z.
Follow-up to the XMem/Wine backing attribution in https://github.com/Marvisak/VIctory/issues/3012#issuecomment-7201859333: regular-file backing is reclaimable in a small offscreen CPU test, but it fails the imported-memory GPU data-integrity gate on this setup. This is not a safe in-place RAM workaround yet.
Provenance and method
Linux 6.17.0-40-generic, 16 GiB RAM, RTX 4060 Laptop 8 GiB, NVIDIA 590.48.1, Wine 11.0, Rust 1.98.1, Windows MSVC target, NVIDIA vendor masking off. Same diagnostic-relaxed vkd3d-proton
2576c0b4adfae4a+/ 3.2.0 as previous reports; not stock/current-upstream certification.Same locally modified
3ed7d725f6895fe1a235eb6fa8ff2485261ca151production integration (#2945 plus the previously disclosed #2112 notification subset/#189 shader integration/probes), with a new local ignored diagnostics fixture, not an upstream test or exact PR-head result. FreshCompiling victory-hle (.../VIctory-pr2945-fixed/crates/victory-hle)completed in 3.11 s. All three cases ran that same test binary; no Rust-source/worktree change between cases. The Python observer gained an explicit--observe-onlycontrol before the third case.The fixture allocates and maps 64 MiB through the real XMem physical-page APIs, writes an index-dependent pattern to every u32, and checks every word after observation. Each run has its own sandbox and scope, differing in whether Wine's private
/tmpis tmpfs or a private directory on ext4. The observer joins XMem VA/section offsets to VMAs and backing device/inode/FD metadata. A read-only mmap plusmincoremeasures the selected file's cached residency without reading/faulting its contents. It explicitlyfsyncs that backing, then requests reclamation only from its own scope, withswappiness=0. No global drop-caches or pressure on other applications.Results
In the reclaiming ext4 case, scope
memory.currentfell 300.6→233.5 MiB and file 65.2→0 MiB (shmem 0); the selected backing'smincoreresult establishes its own 64 MiB residency drop independently of other scope changes. Its fsync took 24.4 ms in this one run, not a throughput benchmark. The reclaim syscall returned EAGAIN in both storage cases because the whole requested scope size could not be reclaimed; EAGAIN alone is not the verdict.The GPU path selects the physical NVIDIA adapter, opens the XMem address with
ID3D12Device13::OpenExistingHeapFromAddress1, retains that heap, creates a placed buffer, copies all 64 MiB to a separate native CPU-readable buffer on a COPY queue, waits on its fence, and checks device removal before readback. In both disk cases those API/fence checks succeeded but the first readback word failed. Therefore neither disk case reached the later GPU-written-data or post-heap-release reclamation checks. They are not imported-heap pinning/reclamation passes.The tmpfs case completed both CPU→GPU and GPU→CPU full-pattern checks, including a GPU-first read after the imported-stage reclaim request. Its backing stayed at 64 MiB residency while imported and after all test-owned GPU objects were dropped; final token/view release removed the backing. With swap excluded from this reclaim request, tmpfs did not provide the intended residency relief.
Additional failure evidence and action
Both disk runs produced five kernel
Cannot map memory with base addr ... and size of 0x4000 pagesentries; none appeared during the tmpfs control in the queried interval. The exact diagnostic exists in the installed NVIDIA 590.48.01 source atnvidia/os-mlock.c:136–145, inos_lookup_user_io_memory: its single-VMA /VM_IO|VM_PFNMAPvalidation returnsNV_ERR_INVALID_ADDRESS. This identifies the logged rejection path, not the preceding import/pinning failure or why the higher-level API still succeeded. No driver-reset/OOM entry appeared in the queried interval.Suggested gate for any disk-backed Wine RAM proposal: verify the actual section-backed alias path, not only
VirtualAllocprivate-memory self-tests or a successful heap-creation HRESULT. Reject an invalid alias rather than silently using it. The no-reclaim control shows that proactive eviction is not required for this failure. Do not switch the in-place title stack to disk backing on this evidence. A copy-only production-path test with in-place disabled is the next candidate; that path and title loading savings remain unverified.All scopes retained 9 GiB RAM/512 MiB swap caps, 180 s deadlines and the original GPU/RAM/disk safety cutoffs. Sampled across these short runs: maximum GPU 218 MiB, minimum available RAM 11097 MiB, minimum user-available disk 17.274 GiB; these are sampled bounds, not continuous peaks. No title, assets, screenshots, shader dispatch, frame-time or gameplay claim. Launcher defaults unchanged.
Local evidence under
.compat-runtime/logs/:build-xmem-reclaim-provenance.logxmem-reclaim-tmpfs-20261126T195257Z/xmem-reclaim-disk-20261126T195434Z/xmem-reclaim-disk-observe-20261126T195740Z/xmem-reclaim-kernel.logEach case retains the test output, exact command/provenance, XMem census, before/after scope mappings, joined identity records, mincore/reclaim results and resource samples. Raw pointers/paths remain local; no game data is needed to reproduce this fixture.
Imported from Marvisak/VIctory. Originally posted by pickles976 on 2026-11-26T21:00:13Z.
Wine XMem follow-up: disk-backed copy-only GPU coherence passes; title RAM relief still unverified
Following the disk-backed native-import failure, I tested the alternative with in-place explicitly disabled and asserted off. This is a local experiment, not an upstream fix or a recommendation to change defaults.
Provenance and reproduction
3ed7d725f6895fe1a235eb6fa8ff2485261ca151, retaining the previously disclosed #2112 GPU-write-notification subset and #189 integration. Added diagnostics-only test instrumentation; no production shadow algorithm changed. Not clean main or an exact PR-head result.2576c0b4adfae4a+remains the local relaxed-vtable diagnostic build, not stock-stack certification.modules::xmem::tests::lab_xmem_copy_only_reclaim, diagnostics feature, explicitly selected with--ignored --nocapture --test-threads=1. The local observer commands were.compat-tools/xmem-reclaim.py tmpfs --copy-onlyand then... disk --copy-only./tmp. FreshCompiling victory-gpuandCompiling victory-hlefrom the intended checkout in the first leg (7.45 s); no intervening rebuild/worktree switch. Compilation/cache conditions differ between legs, so total scope usage and run times are not a matched performance comparison.VICTORY_IN_PLACE=0and removeVICTORY_COPIES_IN_VIDEO_MEMORY; assertions require a tracked, non-imported production shadow and the actual NVIDIA host adapter. No absent-host skip.What actually executed
Real XMem allocation/mapping, plus a second virtual mapping of the last 64 KiB page. A local diagnostics bridge invokes production
shadow::register/find, trackedrefresh,gpu_writes(..., false), andHost::executepreparation/snapshot/fence/copy-back handling. Real GPUCopyBufferRegiontransfers, not CPU edits pretending to be GPU writes.Every 32-bit word across 64 MiB was checked for: initial CPU data reaching the GPU after reclaim; GPU data returning through production copy-back; returned guest data surviving reclaim/refault; subsequent CPU writes refreshing the GPU; writes through the second mapping refreshing the original view's GPU copy; and final guest integrity after shadow retirement/reclaim. Completed-batch release is asynchronous, so the probe waits at most five seconds for its shadow owner to disappear before the retirement checkpoint. Both final physical-token free and view unmaps are required; the observer then confirms no XMem section/backing remains.
Results: tmpfs 1/1 pass (4.55 s); disk 1/1 pass (5.66 s), neither ignored or skipped.
Reclamation evidence
At each stopped fixture checkpoint the observer joins section identity to the Wine backing's device/inode, fsyncs that object, requests reclaim only from its own cgroup (
swappiness=0), and measures that object's page-cache residency withmincore. The observer does not read/refault its contents before releasing the fixture.Reclaim writes returned
EAGAINin both cases: this reports incomplete whole-cgroup reclamation, not failure to reclaim the selected file. The identity-specific residency measurement and subsequent complete data checks are the evidence. This does not discard live guest contents or rely on the section being freed. It also does not reclaim the independent GPU shadow/copy/snapshot buffers: for example, disk-leg anonymous cgroup memory stayed 288.7 MiB across the post-GPU-write reclaim while the selected file's 64 MiB became nonresident.Limits / suggested next verification
The proposed short startup-only gate was subsequently exercised; results follow below. This remains an opt-in verification experiment, not a shipping default.
Local evidence directories (synthetic data; raw mapping metadata kept local):
.compat-runtime/logs/xmem-reclaim-tmpfs-copy-20261126T205301Z/.compat-runtime/logs/xmem-reclaim-disk-copy-20261126T205313Z/.compat-runtime/logs/xmem-copy-kernel.logFollow-up: actual title startup on disk backing, 2026-11-26 22:10 UTC
Same dirty integration and diagnostic DLL provenance above. Fresh diagnostics release compiled the intended GPU/HLE/application paths in 29.20 s (
build-disk-copy-startup-20261126T220748Z.log). The lab launcher now has an opt-inVICTORY_LAB_TMP_STORAGE=disk: a fresh private directory on the existing ext4 filesystem is bound over sandbox/tmp, then removed on launcher exit. Default remains tmpfs. Root/assets stay read-only; PID/network isolation and all guards remain. It rejects disk mode unlessVICTORY_IN_PLACE=0; that rejection and invalid-mode rejection were exercised without launching Wine.Run command:
env -u VICTORY_COPIES_IN_VIDEO_MEMORY .compat-tools/menu.py run victory --source VIctory-pr2945-fixed --seconds 30 --env VICTORY_LAB_TMP_STORAGE=disk --env VICTORY_IN_PLACE=0 --env VICTORY_MODE=1920x1080 --env VICTORY_GPU_LIMIT_MIB=6000 --env VICTORY_LAB_XMEM=Z:/<local-evidence-directory>/census. No scheduled/live input, forced fsync or proactive reclamation.Observed account picker at 12 and 24 seconds; planned time stop at 30.82 s, exit 137. No resource cutoff or observed title exception; kernel journal had no entries in the trial interval. Private temporary-directory removal was verified. Sampled global GPU peak 3323 MiB, available RAM minimum 8094.7 MiB, user-available disk minimum 16.451 GiB, scope peak 2833.3 MiB. These are startup conditions, not a matched RAM-saving comparison.
The read-only census-to-mapping/device/inode joins succeeded: all four XMem sections matched at the later checkpoints, with zero snapshot read errors. The 3977 MiB section / 63632 live 64-KiB tokens mapped to a regular backing on the ext4 runtime filesystem, not tmpfs; its allocated blocks grew 505.50 → 723.26 MiB between the first and later snapshots. At the final census, scope accounting was 1988.5 MiB anonymous / 792.9 MiB file including 3.8 MiB shmem / 48.9 MiB kernel. Allocated file blocks are not residency; file and shmem must not be added.
Measurement gap: the auxiliary collector incorrectly required
io.statin a user cgroup tree without the I/O controller (cgroup.controllers: cpu memory pids, subtree controlmemory pids). It raisedFileNotFoundErrorafter saving the valid census/mapping joins but before saving dirty/writeback counters or performingmincore. Thus there is no per-file residency, automatic reclamation or writeback-latency result from this title trial. The guards and screenshots were independent and completed. Do not infer those missing measurements from file allocation or the much smaller shmem category.Other limits: this is still only the account picker, not loading/gameplay. The log retains 310720 descriptor-overflow warnings, texture-format refusals and unavailable pipeline-library caching.
VICTORY_MODE=1920x1080is only the requested/reported mode here: the log creates a 3840×2160 swapchain, and the captured client is 1272×686 under the 1280×720 window cap. This is not proof of the target 720p/1080p internal render resolution or FPS.Next useful experiment: a short bounded loading trial with the same copy-only disk configuration and unchanged guards, making memory/residency collection independent of unavailable cgroup I/O telemetry. Observe natural dirty-page writeback/refault behavior; no synchronous per-frame flushing and no OOM-fix claim before loading is actually measured. Do not repeat this no-input startup merely to reconfirm the picker.
Local title evidence, kept private:
.compat-runtime/logs/20261126T221048Z-{console.log,resources.csv,guard-events.jsonl}.compat-runtime/logs/disk-copy-startup-20261126T221047Z/(plan, source provenance, three census/mapping joins, explicit observer errors, kernel interval)menu-20261126T221100105140Z.pngandmenu-20261126T221112182774Z.png(account picker only; images not published).Bounded loading follow-through (2026-11-26, 22:55 UTC)
Same dirty mixed
3ed7d725f6895fe1a235eb6fa8ff2485261ca151integration, copy-only disk-backed configuration and diagnostic-relaxed vkd3d caveats above. Only the local census schedule changed in engine source: 2/10/18/35/50/55 seconds after first XMem allocation. Fresh intended-worktree HLE/app diagnostics release: 12.77 s,build-disk-copy-loading-20261126T225511Z.log. The preceding startup command was changed to--seconds 60 --keys '20:A', with a new census output directory. All RAM/GPU/disk/scope limits stayed unchanged; no observer-forced fsync, reclaim, process suspension or native in-place import.Visible result: account picker at 12 s; scheduled single confirmation advanced to illustrated loading at 30/45 s, with the same loading artwork fading at 55 s. No controllable world. Guard time stop at 60.502 s, scope kill completed in 7.8 ms, exit137. Global available RAM started11589.2MiB and reached a minimum6963.7MiB; GPU peak3350MiB, user-available disk minimum14.199GiB, scope peak6186.4MiB. Final resource sample59.50s: anon2623.8MiB, file3439.6MiB including shmem3.8MiB, kernel121.1MiB. No resource cutoff, observed title exception or kernel entries in the recorded interval. Scope inactive/private-directory cleanup verified; bounded idle GPU query returned257MiB/36C.
Independent memory/residency observations now succeeded. Missing cgroup
io.statis explicitly recorded without abortingmemory.stat, read-only mincore or per-process/proc/PID/io. Five snapshots completed with zero mapping/read errors (111–275ms); the 50-second census returnedOk(false)and supplied no sample, rather than blocking the title. Four owners matched ext4 backing after their views appeared. The main3977MiB section retained63632 live/mapped64KiB tokens; its allocated blocks reached2726.78MiB at the last census, separately from residency below.These are non-atomic snapshots; scope accounting and mincore are separate observations. Reclamation/file refaults occurred within the scope, but are not attributed to a particular inode: other title assets and caches are included. At the last census, scope major faults were9973 and the main process's cumulative
read_byteswas1176.56MiB; neither identifies XMem-only disk reads or measures latency. All sampledfile_writebackvalues were0, which does not imply no writeback between samples. The falling dirty count while residency remained stable is not a direct writeback-latency measurement. No synchronous flush was added to the frame path.Existing blockers persist:310720 descriptor-overflow warnings, three host-texture refusals, unavailable host pipeline library; actual swapchain3840x2160 despite reported1080p/client1272x686. Zero
no host pipeline:refusals during this short trial is not world-rendering proof. This is not a matched tmpfs comparison, loading completion, an OOM fix or an FPS result.Next local gate: one bounded90-second loading measurement on this configuration, sampling later residency/refault behavior and visible progress with the same guards. Native disk-backed imports remain disabled. Before recommending this upstream, distinguish useful backing reclamation from costly file-cache churn and establish safe loading completion; do not add a per-frame fsync workaround.
Evidence:
.compat-runtime/logs/20261126T225545Z-{console.log,resources.csv,guard-events.jsonl}anddisk-copy-loading-20261126T225544Z/(command, plan, source provenance, census/mapping joins, memory/mincore/process-I/O observations, kernel interval). Local-only captures:menu-20261126T225557228312Z.png,menu-20261126T225615234363Z.png,menu-20261126T225630270999Z.png,menu-20261126T225640316520Z.png.Imported from Marvisak/VIctory. Originally posted by pickles976 on 2026-11-27T03:43:12Z.
Linux/Wine progress: past the prologue intro, opening-cinematic audio — picture still black
On this 16 GiB system-RAM laptop with an NVIDIA RTX 4060 Laptop/Mobile GPU (8 GiB VRAM), we have now progressed beyond the earlier loading RAM stop and past the prologue intro into audible first-cinematic playback. The user directly heard the opening cinematic during the latest run. The screen remains black: this is not visible world rendering, controllable gameplay, or a frame-rate success.
Environment: Linux 6.17, Wine 11.0, NVIDIA 590.48.01. The vkd3d-proton build remains our disclosed diagnostic-relaxed
2576c0b4adfae4a+, not stock certification.Reproducible local configuration: dirty
VIctory-pr2945-fixedat base3ed7d725f6895fe1a235eb6fa8ff2485261ca151, with the previously documented Wave64/paging/copy-lifetime integration, scoped file-backed XMem #2519 (VICTORY_FILE_BACKED_PAGES=1,VICTORY_IN_PLACE=0, private tmpfs Wine/tmp), and newly verified #1722 library bootstrap plus #2723 typed-handle correction. Reported mode 1920×1080, window limit 1280×720; not an internal-resolution certification. Fresh diagnostics release compiled in 42.51 s. Account input at 20 s, 180 s maximum.Latest trial
20261127T032946Z:We also isolated and corrected a real native shader defect: a float texture handle was reused for an integer atomic. The selected failed compute PSO now builds in the title; all four previously refused compute PSOs now create. Details and limits: https://github.com/Marvisak/VIctory/pull/2723#issuecomment-7209148722 . Unsupported Wave64 translations, dropped root-view bindings and compilation backlog remain.
Important remaining distinction: we have not yet established whether the audible opening sequence uses Bink video playback or a real-time cinematic. Bink DLL/media archive loading and concurrent 3D work alone do not answer that. We are checking this before attributing the black picture solely to the 3D pipeline. #2703's root-constant correction also has documented NVIDIA partial-BVH hang risks, so it will not be title-trialed alone.
Evidence:
.compat-runtime/logs/20261127T032946Z-{console.log,resources.csv,rendering-causality.json},typed-atomic-trial-20261127T032946Z/, andverify-pr2723-rendering-release-20261127T032812Z/. Four identified stale XMem backing files were removed after the scope ended, verifying device/inode identity and no open handles; ~15.9 GiB user-available disk restored. No assets, shader binaries, saves or imagery attached.This is progress past our previous RAM-blocked loading point on 16 GiB Linux/Wine, not a general OOM fix or a claim that gameplay is working.
Media-path distinction: the early startup Bink movie documented in XCL #280 is not the same sequence as the post-title-card prologue. VIctory #841 documents an actual rendered street/depth scene in intermediate targets during that black prologue on another NVIDIA machine. That favors an in-engine rendering investigation, not an automatic Bink diagnosis. It is comparative evidence, not direct classification of our black frame. Our later 150-second bounded target-capture attempt (
20261127T034916Z) stayed on loading artwork and never reached its 500-draw capture trigger; it adds no local scene-rendering proof. The earlier user-confirmed cinematic audio milestone remains valid.Imported from Marvisak/VIctory. Originally posted by pickles976 on 2026-11-27T20:46:59Z.
Owner-scoped RAM follow-through on Linux/Wine, not a loading claim.
I adapted only the unused-snapshot-tail mechanism from TuxBox 07db0df onto canonical
63bcca43c6a00a758510398fa43096ce7e4f7df0, in a separate dirty local checkout.Shadow::writingassembles the real snapshot segment as before, thenMEM_RESETs only complete spare pages betweenVec::len()and capacity, with a 64 KiB minimum. No live snapshot bytes, partial boundary pages, guest allocations, aliases, GPU staging or pending GPU work are discarded. Pointer, capacity and committed address space remain.Offscreen results: 2/2 pass, zero ignored, 0.06 s after a fresh intended-dependency 8.20 s build. A touched 16 MiB allocation truncated to 4,113 live bytes had all queried full spare pages resident before and none resident after on this Wine host. Every live byte/sentinel survived, and growing back to capacity reused the same pointer while initializing and verifying every new byte. Unaligned boundaries, below-threshold and overflow cases were also checked. Evidence:
verify-snapshot-tail-reclamation-20261127T203450Z/.Machine: Linux 6.17, Wine 11, i7-13620H, 16 GiB; CPU/Win32 fixture only, no GPU execution. Immediate residency removal is an observed Wine result, not a Windows MEM_RESET guarantee. This does not reduce commit or impose a process budget. The external RADV memory numbers are not reproduced here, and no title peak-RAM/stutter or RAM-floor improvement is claimed.
Next useful owner measurement: retained snapshot live length versus spare capacity/residency, then matched loading runs on a shader-cleared stack. Keep the existing resource guards. No title run or upstream code contribution was made.