Repository navigation
kernel: trim what small, short-lived VMs don't need - #83
Merged
Merged
Conversation
c2vm's VMs get 512 MiB by default and live for one job, so memory and boot time count more than what these options buy a single-tenant guest: - Transparent huge pages only on madvise: "always" raises min_free_kbytes and holds memory a small VM needs. - No KSM, and so no ksmd thread: one guest has little to merge. - No crypto self-tests: they run at each boot. They go in c2vm.fragment, so update.sh keeps them across releases. The config was edited by hand: the kernel workflow's olddefconfig check confirms Kconfig agrees with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGT1ESdJ8nAumniwetwZfu
olddefconfig drops it once CRYPTO_SELFTESTS is off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGT1ESdJ8nAumniwetwZfu
Owner
Author
|
Tested 7.3.1 from the kernel workflow's run for 7bc8fd2, with
|
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.
c2vm gives a VM 512 MiB by default and keeps it for one job, so memory and boot time count more than what these options buy a single-tenant guest. The changes come from a write-up on shrinking NixOS to 512 MB, filtered down to what our config doesn't already cover (we ship no modules, and KFENCE, memory profiling and TPM are already off).
always). The author measured 52 MB freed at 2 GB with THP off, andalwaysraisesmin_free_kbytesa lot.All three go in
c2vm.fragment, soupdate.shkeeps them across releases.Testing
I edited
configs/7.3/aarch64.configby hand: this environment couldn't reach kernel.org or Debian to runupdate.sh. The kernel workflow'sbuild.shrunsolddefconfigand fails if Kconfig disagrees with the config, so a green build confirms the edit. The one to watch isCRYPTO_MANAGER, whose default depends onCRYPTO_SELFTESTS.Before merging:
kernel/test/pr.py <this PR>on a Mac. It would also help to comparefree -mat idle before and after.🤖 Generated with Claude Code