Repository navigation
Conversation
A manual dispatch gains a linux_arch choice (both, x86_64 or aarch64) that narrows the base Linux legs and the Nix linux systems, and a build_nix tick that skips the Nix job entirely. Defaults keep pushes, dailies, PR builds and untouched manual runs building both architectures with Nix on. Cherry-picked verbatim onto nx2 and nx2-experimental so a rebase of nx2-experimental onto nx2 drops it as already applied.
`no` keeps the skip the boolean could express. `only` runs the Nix job for the systems the Linux/macOS ticks (and linux_arch) select, and skips the Linux, Windows and macOS jobs -- plus the release job, whose assets all come from those legs, so publishing there would only fail on an empty artifact set. Default stays `yes`: pushes, dailies, PR builds and untouched manual runs are unchanged.
…nel page backing On hosts with 18 GiB of RAM or less, glibc's per-thread arenas and its dynamic mmap threshold kept freed memory resident across the process. - Add Common::ConfigureLowMemoryAllocator(): cap glibc arenas at 4 and pin the mmap/trim thresholds at 128 KiB. Called at startup from both frontends. EDEN_NX2_LOW_RAM=0|1 forces it off or on. - Add Common::TrimHostHeap() (malloc_trim) and call it after the shader precache build. - Default cold_hint_mode to WhenRamIsLow and raise the "memory is low" floor to max(2 GiB, total / 7). - Back KDynamicPageManager with lazily committed zero pages (AllocateZeroedVirtualPages) instead of a std::vector plus a memset of every page. Assisted-by: Antigravity (RAM profiling, implementation, and verification)
|
Retargeted to |
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tunes the host allocator for machines with 18 GiB of RAM or less and makes the kernel's dynamic page pool commit lazily. Standalone; no dependency on the other PRs in this series (part 2 of 4).
src/common/host_memory.{h,cpp}:ConfigureLowMemoryAllocator()(glibc only:M_ARENA_MAX=4, mmap/trim thresholds 128 KiB;EDEN_NX2_LOW_RAM=0|1overrides),TrimHostHeap()(malloc_trim),AllocateZeroedVirtualPages()/FreeVirtualPages(), and the "memory is low" floor raised tomax(2 GiB, total/7).src/common/settings.h:cold_hint_modedefaults toWhenRamIsLow.src/yuzu/main.cpp,src/yuzu_cmd/yuzu.cpp: callConfigureLowMemoryAllocator()at startup.src/core/hle/kernel/k_dynamic_page_manager.h: lazy zero-page backing instead ofstd::vector+ per-pagememset(~72 MiB no longer touched at boot).src/video_core/shader_warm/shader_warm_builder.cpp: trim the heap after the precache build.The allocator tuning is a no-op on non-glibc platforms and on hosts above 18 GiB unless
EDEN_NX2_LOW_RAM=1.Assisted-by: Antigravity (RAM profiling, implementation, and verification)
Type of change
Related issues
N/A
Testing
Standalone branch:
ninja -C build -j10 yuzu eden-cli testsbuilds;./build/bin/tests "[common],[game_presets]"passes (5,814,822 assertions in 73 test cases). Not built or run on Windows or macOS (the Windows branch ofAllocateZeroedVirtualPagesis untested).Games tested:
Ocarina of Time and Mario Kart World on Linux (Ryzen 5, Vega iGPU, 15.4 GiB RAM), with all 4 PRs of the series applied together.
Checklist
Screenshots / logs
Measured with the full series applied, Ocarina of Time, 240 s in game: system swap growth +5,570 MiB before, +525 MiB after. Process swap at the end 1,469 MiB before, 104 MiB after. These numbers are for the whole series, not this PR alone.
Summary by CodeRabbit