Feature request: opt-in host-RAM budget with loading backpressure and reclaim #3012

Open
opened 2026-11-26 05:20:04 +00:00 by github-bot · 4 comments
Owner

@⁠pickles976 on GitHub · 2026-11-26 03:25 UTC · original

Problem

On a 16 GiB Linux/Wine laptop (RTX 4060 Laptop 8 GiB), a guarded Series S title load on VIctory #2972 head 7e769e07e274 reached the account picker and loading art but not controllable gameplay. A 130 s scheduled trial stopped at 86.25 s when system MemAvailable fell 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=9G and MemorySwapMax=512M prevent 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_size is not limited. Those mechanisms are natural integration points, not alternative duplicate proposals.

Verification criteria

  • Deterministic tests with simultaneous producers: bound accounted peak bytes, wake promptly after release, preserve ordered requests and data, and prove that an oversized/no-progress request fails clearly rather than deadlocking; default-off behavior unchanged.
  • On the same exact head/config/title/caches, compare guarded loads with and without the budget on a 16 GiB host: peak scope and global RAM, per-owner live/in-flight bytes, stalls and errors, visible frame/controllability. Do not lower the 2 GiB free-RAM or GPU/disk safety floors to manufacture a pass. A 720p or 1080p controllable world is the next gate, then 30 FPS for 15 min without crash/error.

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.

**@⁠pickles976** on GitHub · 2026-11-26 03:25 UTC · [original](https://github.com/Marvisak/VIctory/issues/3012) ## Problem On a 16 GiB Linux/Wine laptop (RTX 4060 Laptop 8 GiB), a guarded Series S title load on VIctory #2972 head `7e769e07e274` reached the account picker and loading art but not controllable gameplay. A 130 s scheduled trial stopped at 86.25 s when system `MemAvailable` fell 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=9G` and `MemorySwapMax=512M` prevent 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_size` is not limited. Those mechanisms are natural integration points, not alternative duplicate proposals. ## Verification criteria - Deterministic tests with simultaneous producers: bound accounted peak bytes, wake promptly after release, preserve ordered requests and data, and prove that an oversized/no-progress request fails clearly rather than deadlocking; default-off behavior unchanged. - On the same exact head/config/title/caches, compare guarded loads with and without the budget on a 16 GiB host: peak scope and global RAM, per-owner live/in-flight bytes, stalls and errors, visible frame/controllability. Do not lower the 2 GiB free-RAM or GPU/disk safety floors to manufacture a pass. A 720p **or** 1080p controllable world is the next gate, then 30 FPS for 15 min without crash/error. 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:20:04 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-26 03:45 UTC · original · edited 2026-11-26 06:45 UTC

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). main has no host RAM budget setting today. The related open work is the GPU-HOST-MEMORY task 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 main 63bcca4 (RTX 4060 Laptop, Wine, a log-only probe) found the copies of title memory outside buffers (LOOSE in crates/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 to LOOSE in shadow.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

**@⁠Marvisak** on GitHub · 2026-11-26 03:45 UTC · [original](https://github.com/Marvisak/VIctory/issues/3012#issuecomment-7182004024) · edited 2026-11-26 06:45 UTC <!-- victory-issue-triage v1 verdict=tracked seen=2026-11-26T04:21:26Z at=2026-11-26T07:10:00Z --> 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). `main` has no host RAM budget setting today. The related open work is the `GPU-HOST-MEMORY` task 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 `main` `63bcca4` (RTX 4060 Laptop, Wine, a log-only probe) found the copies of title memory outside buffers (`LOOSE` in `crates/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 to `LOOSE` in `shadow.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](https://claude.ai/code)_
Author
Owner

@⁠pickles976 on GitHub · 2026-11-26 04:14 UTC · original · edited 2026-11-26 07:02 UTC

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

  • main 63bcca43c6 + 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.
  • Linux, Wine 11.0, vkd3d-proton 3.2.0, NVIDIA driver 590.48.01, RTX 4060 Laptop GPU 8 GiB, 15,693 MiB OS-reported system RAM. DXVK NVIDIA masking disabled. Series S, reported output 1920x1080, window limited to 1280x720. Existing shared caches retained, not a controlled cold-cache comparison.
  • First a 20 s startup check, no input: visible account picker. Then the same binary with VICTORY_KEYS=20:Enter: picker followed by loading artwork; screenshot at ~70 s still artwork, no controllable world.
  • Scope limits stayed 9 GiB RAM / 512 MiB swap; global safety floor 2,048 MiB MemAvailable, GPU 6,000 MiB and disk 10 GiB limits unchanged. Planned 110 s load stopped at 73.90 s: available RAM 2,032.4 MiB, scope 6,545.6 MiB (anonymous 2,448.9 MiB), global GPU used 3,095 MiB. Exit 137 is the external guard, not a title crash. At launch available RAM was 11,517.5 MiB; this is not a matched performance comparison with the earlier #2972 run.

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.

Owner Menu Late loading
shadow::LOOSE backing, sum of keyed window lengths 256 2,012
shadow::BUFFERS registered copies, size rounded to 64 KiB 880.75 895
shadow::ARENA backing 32 32
Free subranges inside that arena (included above) 14.00 2.35
texture::CHUNKS backing 32 32
Standalone texture staging, idle / used 0 / 0 0 / 0
Idle shadow snapshot pool capacity 0 0
Diagnostics Rust live allocations (overlaps Rust-owned pools) 572 765
Existing list-upload byte counter 0 0

DirectStorage's existing scheduler meter, with staged / staging added to its 5 s line: 1.33 MiB maximum observed staged, 32 MiB configured staging, zero staging_waits on the sampled lines. This meter covers staging_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_lock calls, skipping unavailable owners rather than blocking or nesting owner locks. It sums POOL Vec capacities, registered shadow lengths, LOOSE key lengths, arena buffer GetDesc().Width and free runs, staging chunk count × CHUNK, and standalone staging sizes. Existing HEAP_BYTES and 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.rs describes LOOSE as 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 control 20261126T041119Z-*. 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 #2112 29decb3719142296cad124453a3b8651068f22f6 GPU-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, explicit VICTORY_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.

Elapsed s Scope MiB Anon MiB File MiB Of file: shmem MiB Kernel MiB
19.52 3814.8 2211.1 1572.9 787.3 29.4
40.05 4634.9 2403.1 2196.6 1113.2 33.7
59.59 7149.7 2867.1 4231.9 3081.3 48.9
80.08 7491.4 2964.3 4464.0 4029.7 61.2
98.53 7548.5 3048.1 4431.8 4226.7 66.6

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} and menu-20261126T064634382643Z.png. Same Wine11.0 / NVIDIA590.48.1 / RTX4060 Laptop8GiB /16GiB RAM and diagnostic relaxed vkd3d-proton3.2.0 2576c0b4adfae4a+ (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 smaps by 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 /tmp is 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.

Snapshot Cgroup shmem MiB Allocated blocks across Wine tmpmap objects MiB Largest section allocated MiB
20s 787.3 783.55 722.56
80s 3979.6 3976.32 3533.61

At80s the host process also had1928.34MiB PSS in /dev/nvidiactl mappings and2561.30MiB in anonymous rw-p mappings. The largest Wine section had17529 mapped segments across rw-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 XMemAllocatePhysicalPages creates a pagefile-backed section (xmem.rs:494, SEC_COMMIT on Wine); map installs its slices through MapViewOfFile3 (: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-*, notably maps-20s.json / maps-80s.json; screenshot menu-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.

**@⁠pickles976** on GitHub · 2026-11-26 04:14 UTC · [original](https://github.com/Marvisak/VIctory/issues/3012#issuecomment-7182422880) · edited 2026-11-26 07:02 UTC 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 - `main` **63bcca43c6a00a758510398fa43096ce7e4f7df0 + 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. - Linux, Wine 11.0, vkd3d-proton 3.2.0, NVIDIA driver 590.48.01, **RTX 4060 Laptop GPU 8 GiB**, 15,693 MiB OS-reported system RAM. DXVK NVIDIA masking disabled. Series S, reported output 1920x1080, window limited to 1280x720. Existing shared caches retained, not a controlled cold-cache comparison. - First a 20 s startup check, no input: visible account picker. Then the same binary with `VICTORY_KEYS=20:Enter`: picker followed by loading artwork; screenshot at ~70 s still artwork, **no controllable world**. - Scope limits stayed **9 GiB RAM / 512 MiB swap**; global safety floor **2,048 MiB MemAvailable**, GPU 6,000 MiB and disk 10 GiB limits unchanged. Planned 110 s load stopped at **73.90 s**: available RAM **2,032.4 MiB**, scope **6,545.6 MiB** (anonymous **2,448.9 MiB**), global GPU used **3,095 MiB**. Exit 137 is the external guard, not a title crash. At launch available RAM was 11,517.5 MiB; this is not a matched performance comparison with the earlier #2972 run. ### 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. | Owner | Menu | Late loading | |---|---:|---:| | `shadow::LOOSE` backing, sum of keyed window lengths | 256 | 2,012 | | `shadow::BUFFERS` registered copies, size rounded to 64 KiB | 880.75 | 895 | | `shadow::ARENA` backing | 32 | 32 | | Free subranges inside that arena (included above) | 14.00 | 2.35 | | `texture::CHUNKS` backing | 32 | 32 | | Standalone texture staging, idle / used | 0 / 0 | 0 / 0 | | Idle shadow snapshot pool capacity | 0 | 0 | | Diagnostics Rust live allocations (overlaps Rust-owned pools) | 572 | 765 | | Existing list-upload byte counter | 0 | 0 | DirectStorage's existing scheduler meter, with `staged` / `staging` added to its 5 s line: **1.33 MiB maximum observed staged**, **32 MiB configured staging**, zero `staging_waits` on the sampled lines. This meter covers `staging_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_lock` calls**, skipping unavailable owners rather than blocking or nesting owner locks. It sums `POOL` Vec capacities, registered shadow lengths, `LOOSE` key lengths, arena buffer `GetDesc().Width` and free runs, staging chunk count × CHUNK, and standalone staging sizes. Existing `HEAP_BYTES` and 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.rs` describes `LOOSE` as 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 control `20261126T041119Z-*`. 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 #2112 `29decb3719142296cad124453a3b8651068f22f6` GPU-write notification logic and local read-only ownership probes. Exact pin/alias tests and mixed-stack provenance are in [#2945](https://git.gtahub.st/github/Marvisak--VIctory/pulls/2945). Fixed256KiB loose windows, default1MiB in-place floor, explicit `VICTORY_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. | Elapsed s | Scope MiB | Anon MiB | File MiB | Of file: shmem MiB | Kernel MiB | |---|---:|---:|---:|---:|---:| | 19.52 | 3814.8 | 2211.1 | 1572.9 | 787.3 | 29.4 | | 40.05 | 4634.9 | 2403.1 | 2196.6 | 1113.2 | 33.7 | | 59.59 | 7149.7 | 2867.1 | 4231.9 | 3081.3 | 48.9 | | 80.08 | 7491.4 | 2964.3 | 4464.0 | 4029.7 | 61.2 | | 98.53 | 7548.5 | 3048.1 | 4431.8 | 4226.7 | 66.6 | 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}` and `menu-20261126T064634382643Z.png`. Same Wine11.0 / NVIDIA590.48.1 / RTX4060 Laptop8GiB /16GiB RAM and **diagnostic relaxed vkd3d-proton3.2.0 `2576c0b4adfae4a+`** (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 `smaps` by 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 `/tmp` is 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. | Snapshot | Cgroup shmem MiB | Allocated blocks across Wine tmpmap objects MiB | Largest section allocated MiB | |---|---:|---:|---:| | 20s | 787.3 | 783.55 | 722.56 | | 80s | 3979.6 | 3976.32 | 3533.61 | At80s the host process also had1928.34MiB PSS in `/dev/nvidiactl` mappings and2561.30MiB in anonymous `rw-p` mappings. The largest Wine section had17529 mapped segments across `rw-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 `XMemAllocatePhysicalPages` creates a pagefile-backed section (`xmem.rs:494`, SEC_COMMIT on Wine); `map` installs its slices through `MapViewOfFile3` (`: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-*`, notably `maps-20s.json` / `maps-80s.json`; screenshot `menu-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.
Author
Owner

@⁠pickles976 on GitHub · 2026-11-26 04:17 UTC · original

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: #2856 . 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).

**@⁠pickles976** on GitHub · 2026-11-26 04:17 UTC · [original](https://github.com/Marvisak/VIctory/issues/3012#issuecomment-7182463455) 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://git.gtahub.st/github/Marvisak--VIctory/pulls/2856 . 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).
Author
Owner

@⁠pickles976 on GitHub · 2026-11-26 04:21 UTC · original

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: #2856 . 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).

**@⁠pickles976** on GitHub · 2026-11-26 04:21 UTC · [original](https://github.com/Marvisak/VIctory/issues/3012#issuecomment-7182523313) 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://git.gtahub.st/github/Marvisak--VIctory/pulls/2856 . 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).
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory#3012
No description provided.