From 16919b3ce0983b2856f7b5ab17726ae85cb1a62a Mon Sep 17 00:00:00 2001 From: Tk-Glitch Date: Fri, 12 Aug 2022 18:39:00 +0200 Subject: [PATCH] Switch default governor to schedutil on >32 threads machines when it's set to ondemand Ondemand doesn't scale well with that many cores --- linux-tkg-config/prepare | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/linux-tkg-config/prepare b/linux-tkg-config/prepare index 07e7ec7..b20868d 100644 --- a/linux-tkg-config/prepare +++ b/linux-tkg-config/prepare @@ -1092,6 +1092,12 @@ _tkg_srcprep() { fi done + # Use schedutil instead of ondemand on >32 threads machines + if [[ $(nproc) -gt 32 ]] && [ "$_default_cpu_gov" = "ondemand" ]; then + warning "The current default governor selected (ondemand) doesn't perform well on >32 threads. Schedutil will be used instead." + _default_cpu_gov="schedutil" + fi + # default cpu gov if [ "$_default_cpu_gov" = "performance" ]; then _disable "CPU_FREQ_DEFAULT_GOV_SCHEDUTIL"