Handle CacULE's 2000Hz tickrate option

This commit is contained in:
Tk-Glitch
2021-05-30 20:29:53 +02:00
parent 15193f4e3d
commit 8140128777
2 changed files with 20 additions and 1 deletions

View File

@@ -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)

View File

@@ -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