Repository navigation
Conversation
# Conflicts: # tests/test_run_game_wine.py
…ard bite KelboLive's review of ProjectLeonida#2845: without a systemd scope the peak is the caller cgroup's lifetime peak, so the one-line summary now says so, which keeps a comparison table from reading it as the run's own. The `[ -n "$cg_rel" ]` guard was untested: removing it still passed, because the fake root had no memory.peak to pick up. The v1 test now has one at the root, so an empty v2 path reads nothing and dropping the guard fails it (checked: mutation gives 1 failure). AI-assisted: yes
|
The red AI-assisted. |
|
The wrapper records the real kernel peak in both a fresh scope and the caller cgroup. I integrated On Linux with cgroup v2 and systemd 262, I ran the real wrapper against a synthetic Wine process. Each dedicated case used its own
AI-assisted local testing, independently checked against the raw data. Synthetic runtime and trace inputs. The cgroup files and scopes were real. |
|
Thanks — that is the measurement this path needed: the scope's own peak (102,719,488–105,156,608 bytes) and the inherited caller peak (17,839,054,848 bytes) both land in the saved value and the summary, and main writes no peak file. Your combined runs with #2966/#2968 also match the merge-tree check here. No change on my side. AI-assisted. |
Re-created from the original #2845.
aznohonza/mandy-contribwas made private at 21:41 UTC on 2026-12-01, which detached the fork and permanently closed its pull requests; GitHub refuses to reopen them (422 state cannot be changed). Same branch, same headace83ae110db8fadcb7e8d00d9e27a829cc47247. The original review thread is at #2845.Claimed in the coordination issue as: WINE-RUN-MEMORY-PEAK
What and why
scripts/run_game_wine.shruns the title in a cgroup of its own when it is started in a systemd scope, and that scope usually also carriesMemoryMax(e.g.systemd-run --user --scope -p MemoryMax=24G), but the run folder and the summary said nothing about how close the run came to that limit. The wrapper now reads the cgroup'smemory.peakonce the session has ended and writes it to<out>/memory_peak(bytes), andtools/game_run_summary.pyprintscgroup memory peak: 23.6 GiBafter the run time.docs/linux_proton.mdsays so.LEONIDA_SELF_CGROUP_PATH,LEONIDA_CGROUP_ROOT) use the names and defaults ofscripts/linux-boot/boot-inner.sh; they are also what the tests point at a fake proc file and cgroup tree.Open #2436 touches the same wrapper, so one of the two may need a rebase (a textual conflict in the environment block); this change adds no option.
Tested
CPU only, no game files, no Wine, no GPU:
python -I tests/test_game_run_summary.py— 13 tests pass, one new: 25,316,786,176 bytes prints ascgroup memory peak: 23.6 GiB, and a folder withoutmemory_peakgets no line.python -I tests/test_run_game_wine.py— 11 tests pass, two new: a stubbed run with a fake/proc/self/cgroupandmemory.peakwritesmemory_peakand prints the line; a cgroup-v1 proc file leaves both out.python -I tests/test_run_game_wine_safety.py— 3 tests pass.python -m compileall -qon the changed Python files,scripts/check_no_game_data.pyon all changed files, and the docs-only checks (tests/test_docs_*.py,tests/test_i18n_index.py,tests/test_design_contract_rows.py).GPUs tested: n/a
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)