diff --git a/customization.cfg b/customization.cfg index 694b3f4..5221abf 100644 --- a/customization.cfg +++ b/customization.cfg @@ -177,7 +177,7 @@ _random_trust_cpu="false" # Valid values are "none", "smt", "mc", "mc-llc"(for zen), "smp", "all" - Kernel default is "smt" _runqueue_sharing="" -# Timer frequency - "100" "500", "750" or "1000" - More options available in kernel config prompt when left empty depending on selected cpusched - Kernel default is "500" - For MuQSS, 100Hz is recommended +# Timer frequency - "100" "500", "750" or "1000" ("2000" can be set for cacule cpu sched, and will fallback to 1000 for other schedulers) - More options available in kernel config prompt when left empty depending on selected cpusched - Kernel default is "500" - For MuQSS, 100Hz is recommended _timer_freq="" # Default CPU governor - "performance", "ondemand", "schedutil" or leave empty for default (schedutil) diff --git a/linux-tkg-config/prepare b/linux-tkg-config/prepare index 382d429..b148c0f 100644 --- a/linux-tkg-config/prepare +++ b/linux-tkg-config/prepare @@ -1015,6 +1015,20 @@ CONFIG_DEBUG_INFO_BTF_MODULES=y\n if [ -n "$_timer_freq" ] && [ "$_timer_freq" != "300" ]; then sed -i -e 's/CONFIG_HZ_300=y/# CONFIG_HZ_300 is not set/' ./.config sed -i -e 's/CONFIG_HZ_300_NODEF=y/# CONFIG_HZ_300_NODEF is not set/' ./.config + if [ "$_timer_freq" = "2000" ] && [ "${_cpusched}" != "cacule" ]; then + _timer_freq="1000" + elif [ "$_timer_freq" = "2000" ] && [ "${_cpusched}" = "cacule" ]; then + sed -i -e 's/CONFIG_HZ=300/CONFIG_HZ=2000/' ./.config + echo "CONFIG_HZ_2000=y" >> ./.config + echo "# CONFIG_HZ_500 is not set" >> ./.config + echo "# CONFIG_HZ_500_NODEF is not set" >> ./.config + echo "# CONFIG_HZ_750 is not set" >> ./.config + echo "# CONFIG_HZ_750_NODEF is not set" >> ./.config + echo "# CONFIG_HZ_1000 is not set" >> ./.config + echo "# CONFIG_HZ_1000_NODEF is not set" >> ./.config + echo "# CONFIG_HZ_250_NODEF is not set" >> ./.config + echo "# CONFIG_HZ_300_NODEF is not set" >> ./.config + fi if [ "$_timer_freq" = "1000" ]; then sed -i -e 's/# CONFIG_HZ_1000 is not set/CONFIG_HZ_1000=y/' ./.config sed -i -e 's/CONFIG_HZ=300/CONFIG_HZ=1000/' ./.config @@ -1025,6 +1039,7 @@ CONFIG_DEBUG_INFO_BTF_MODULES=y\n echo "CONFIG_HZ_1000_NODEF=y" >> ./.config echo "# CONFIG_HZ_250_NODEF is not set" >> ./.config echo "# CONFIG_HZ_300_NODEF is not set" >> ./.config + echo "# CONFIG_HZ_2000 is not set" >> ./.config elif [ "$_timer_freq" = "750" ]; then sed -i -e 's/CONFIG_HZ=300/CONFIG_HZ=750/' ./.config echo "# CONFIG_HZ_500 is not set" >> ./.config @@ -1034,6 +1049,7 @@ CONFIG_DEBUG_INFO_BTF_MODULES=y\n echo "# CONFIG_HZ_1000_NODEF is not set" >> ./.config echo "# CONFIG_HZ_250_NODEF is not set" >> ./.config echo "# CONFIG_HZ_300_NODEF is not set" >> ./.config + echo "# CONFIG_HZ_2000 is not set" >> ./.config elif [ "$_timer_freq" = "500" ]; then sed -i -e 's/CONFIG_HZ=300/CONFIG_HZ=500/' ./.config echo "CONFIG_HZ_500=y" >> ./.config @@ -1043,6 +1059,7 @@ CONFIG_DEBUG_INFO_BTF_MODULES=y\n echo "# CONFIG_HZ_1000_NODEF is not set" >> ./.config echo "# CONFIG_HZ_250_NODEF is not set" >> ./.config echo "# CONFIG_HZ_300_NODEF is not set" >> ./.config + echo "# CONFIG_HZ_2000 is not set" >> ./.config elif [ "$_timer_freq" = "100" ]; then sed -i -e 's/CONFIG_HZ=300/CONFIG_HZ=100/' ./.config echo "# CONFIG_HZ_500 is not set" >> ./.config @@ -1054,6 +1071,7 @@ CONFIG_DEBUG_INFO_BTF_MODULES=y\n echo "# CONFIG_HZ_300_NODEF is not set" >> ./.config echo "CONFIG_HZ_100=y" >> ./.config echo "CONFIG_HZ_100_NODEF=y" >> ./.config + echo "# CONFIG_HZ_2000 is not set" >> ./.config fi elif [ "${_cpusched}" = "MuQSS" ] && [ -z "$_timer_freq" ]; then sed -i -e 's/CONFIG_HZ=300/CONFIG_HZ=100/' ./.config @@ -1066,6 +1084,7 @@ CONFIG_DEBUG_INFO_BTF_MODULES=y\n echo "# CONFIG_HZ_300_NODEF is not set" >> ./.config echo "CONFIG_HZ_100=y" >> ./.config echo "CONFIG_HZ_100_NODEF=y" >> ./.config + echo "# CONFIG_HZ_2000 is not set" >> ./.config else sed -i -e 's/CONFIG_HZ_300=y/# CONFIG_HZ_300 is not set/' ./.config sed -i -e 's/CONFIG_HZ_300_NODEF=y/# CONFIG_HZ_300_NODEF is not set/' ./.config