From 4ef2f7c024d2ba3e3b9e524e9cdeb83fc78225e3 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 3 Nov 2026 15:05:10 +0000 Subject: [PATCH 1/2] kernel: trim what small, short-lived VMs don't need 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 Claude-Session: https://claude.ai/code/session_01WGT1ESdJ8nAumniwetwZfu --- kernel/configs/7.3/aarch64.config | 9 ++++----- kernel/configs/c2vm.fragment | 11 +++++++++++ 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/kernel/configs/7.3/aarch64.config b/kernel/configs/7.3/aarch64.config index 640ab44..f470d21 100644 --- a/kernel/configs/7.3/aarch64.config +++ b/kernel/configs/7.3/aarch64.config @@ -1026,7 +1026,7 @@ CONFIG_ARCH_HAS_PMD_SOFTLEAVES=y CONFIG_CONTIG_ALLOC=y CONFIG_PCP_BATCH_SCALE_MAX=5 CONFIG_PHYS_ADDR_T_64BIT=y -CONFIG_KSM=y +# CONFIG_KSM is not set CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y # CONFIG_MEMORY_FAILURE is not set @@ -1034,8 +1034,8 @@ CONFIG_ARCH_WANTS_THP_SWAP=y # CONFIG_PERSISTENT_HUGE_ZERO_FOLIO is not set CONFIG_MM_ID=y CONFIG_TRANSPARENT_HUGEPAGE=y -CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y -# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set +# CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS is not set +CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y # CONFIG_TRANSPARENT_HUGEPAGE_NEVER is not set CONFIG_TRANSPARENT_HUGEPAGE_SHMEM_HUGE_NEVER=y # CONFIG_TRANSPARENT_HUGEPAGE_SHMEM_HUGE_ALWAYS is not set @@ -3229,8 +3229,7 @@ CONFIG_CRYPTO_ACOMP2=y CONFIG_CRYPTO_MANAGER=y CONFIG_CRYPTO_MANAGER2=y # CONFIG_CRYPTO_USER is not set -CONFIG_CRYPTO_SELFTESTS=y -# CONFIG_CRYPTO_SELFTESTS_FULL is not set +# CONFIG_CRYPTO_SELFTESTS is not set CONFIG_CRYPTO_NULL=y # CONFIG_CRYPTO_PCRYPT is not set # CONFIG_CRYPTO_CRYPTD is not set diff --git a/kernel/configs/c2vm.fragment b/kernel/configs/c2vm.fragment index 383ecff..cc1fabf 100644 --- a/kernel/configs/c2vm.fragment +++ b/kernel/configs/c2vm.fragment @@ -32,3 +32,14 @@ CONFIG_LOCALVERSION="-c2vm" # Firecracker's config had Amazon's, which goes in the build ID. CONFIG_BUILD_SALT="" + +# The VMs are small (512 MiB by default) and short-lived: memory and boot +# time matter more than what these buy a single-tenant guest. +# Huge pages only where a program asks for them: "always" raises +# min_free_kbytes and holds memory a small VM needs. +# CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS is not set +CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y +# No page merging, and no ksmd thread: one guest has little to merge. +# CONFIG_KSM is not set +# The crypto self-tests run at each boot. +# CONFIG_CRYPTO_SELFTESTS is not set From 7bc8fd2b56774dd38917aaf91ea79a2217c33c9f Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 3 Nov 2026 15:06:30 +0000 Subject: [PATCH 2/2] kernel: drop CRYPTO_KPP2, which only the self-tests selected olddefconfig drops it once CRYPTO_SELFTESTS is off. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01WGT1ESdJ8nAumniwetwZfu --- kernel/configs/7.3/aarch64.config | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/configs/7.3/aarch64.config b/kernel/configs/7.3/aarch64.config index f470d21..0e3976a 100644 --- a/kernel/configs/7.3/aarch64.config +++ b/kernel/configs/7.3/aarch64.config @@ -3224,7 +3224,6 @@ CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_AKCIPHER2=y CONFIG_CRYPTO_AKCIPHER=y -CONFIG_CRYPTO_KPP2=y CONFIG_CRYPTO_ACOMP2=y CONFIG_CRYPTO_MANAGER=y CONFIG_CRYPTO_MANAGER2=y