From 5c3621fc6a409da96cfed7a104e5996f8171a72b Mon Sep 17 00:00:00 2001 From: Tk-Glitch Date: Thu, 22 Dec 2022 15:37:24 +0100 Subject: [PATCH] Remove NR_CPUS prompt and use defconfig's default if the value is empty instead of an enforced 128. --- customization.cfg | 4 ++-- linux-tkg-config/prepare | 13 ------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/customization.cfg b/customization.cfg index 23351af..d23ae26 100644 --- a/customization.cfg +++ b/customization.cfg @@ -264,10 +264,10 @@ _kernel_localversion="" # Set to "true" to add back missing symbol for AES-NI/AVX support on ZFS - This is a legacy option that can be ignored on 5.10+ kernels - https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/kernel/export_kernel_fpu_functions.patch _zfsfix="true" -# Set to your maximum number of CPUs (physical + logical cores) - Lower means less overhead - You can set it to "$(nproc)" to use the current host's CPU(s) core count, or leave empty to get a prompt +# Set to your maximum number of CPUs (physical + logical cores) - Lower means less overhead - You can set it to "$(nproc)" to use the current host's CPU(s) core count, or leave empty to use default # If you set this to a lower value than you have cores, some cores will be disabled # Default Arch kernel value is 320 -_NR_CPUS_value="128" +_NR_CPUS_value="" #### USER PATCHES #### diff --git a/linux-tkg-config/prepare b/linux-tkg-config/prepare index 1b053b5..99c2ccd 100644 --- a/linux-tkg-config/prepare +++ b/linux-tkg-config/prepare @@ -1606,22 +1606,9 @@ CONFIG_DEBUG_INFO_BTF_MODULES=y\r fi # NR_CPUS - if [ -z "$_NR_CPUS_value" ]; then - plain "" - plain "Set NR_CPUS value to the current host's threads count?" - plain "For best results, it should be equal to the maximum number of threads the target machine has." - plain "If you want to use the resulting kernel on a machine with more threads, you can hit enter or answer N to use a default of 128." - read -rp "`echo $' > N/y : '`" CONDITION_nrcpus; - fi - if [[ "$CONDITION_nrcpus" =~ [yY] ]]; then - _NR_CPUS_value="$(nproc)" - fi if [ -n "$_NR_CPUS_value" ]; then scripts/config --set-val "NR_CPUS" "$_NR_CPUS_value" _enable "FORCE_NR_CPUS" - else - scripts/config --set-val "NR_CPUS" "128" - _disable "FORCE_NR_CPUS" fi fi