[openwrt/openwrt] x86: switch config to a tickless kernel

LEDE Commits lede-commits at lists.infradead.org
Thu Nov 28 10:57:47 PST 2024


ynezz pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/4c22224bcc08c9bd18e6e9921280c73e2abcd7c3

commit 4c22224bcc08c9bd18e6e9921280c73e2abcd7c3
Author: John Audia <therealgraysky at proton.me>
AuthorDate: Mon Sep 2 19:53:47 2024 -0400

    x86: switch config to a tickless kernel
    
    This commit fixes and closes #16313.
    
    Switch the x86 kernel's timer to tickless operation which is
    more power efficient since it is not woken up by periodic timer
    interrupts when idle.  Also add several other options for CPU
    idle governors particularly the upstream default for tickless
    kernels, CONFIG_CPU_IDLE_GOV_MENU. Without this commit, my AMD
    Ryzen 7 5800U can only achieve a minimum core frequency of 1,384
    MHz which is over 3x higher than the processor's minimum
    frequency of 400 MHz which is accessible with this modification.
    In addition to the lower clock rate, I have seen a concomitant
    reduction in both idle temps and at-the-wall power consumption.
    
    Summary:
    * Idle CPU freqs dropped from 1,384 MHz to 400 Mhz.
    * Idle power consumption dropped from 7 W avg to 5 W.
    * Idle temps have dropped from 50C on avg to 43C.
    
    There are other well known reasons to switch to a tickless
    timer including: reduced interrupt overhead, better use of CPU
    resources, and reduced latency to name a few.
    
    Build system: x86/64
    Build-tested: x86/64/AMD Cezanne
    Run-tested: x86/64/AMD Cezanne
    
    Signed-off-by: John Audia <therealgraysky at proton.me>
    Link: https://github.com/openwrt/openwrt/pull/16317
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
    (cherry picked from commit 31111680f6fc5f17201b02b8ce656b955be56d7a)
    Link: https://github.com/openwrt/openwrt/pull/17097
    Signed-off-by: Petr Štetiar <ynezz at true.cz>
---
 target/linux/x86/config-6.6 | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/target/linux/x86/config-6.6 b/target/linux/x86/config-6.6
index b8d38e60fa..3d1c005138 100644
--- a/target/linux/x86/config-6.6
+++ b/target/linux/x86/config-6.6
@@ -48,6 +48,7 @@ CONFIG_COMPAT_32=y
 CONFIG_COMPAT_32BIT_TIME=y
 # CONFIG_COMPAT_VDSO is not set
 CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_CONTEXT_TRACKING_USER_FORCE=y
 # CONFIG_CPU5_WDT is not set
 CONFIG_CPU_FREQ=y
 CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
@@ -61,7 +62,10 @@ CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
 # CONFIG_CPU_FREQ_GOV_USERSPACE is not set
 CONFIG_CPU_FREQ_STAT=y
 CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_HALTPOLL=y
 CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_IDLE_GOV_MENU=y
+CONFIG_CPU_IDLE_GOV_TEO=y
 CONFIG_CPU_MITIGATIONS=y
 CONFIG_CPU_SUP_AMD=y
 CONFIG_CPU_SUP_CENTAUR=y
@@ -180,7 +184,6 @@ CONFIG_HW_RANDOM=y
 CONFIG_HW_RANDOM_GEODE=y
 CONFIG_HW_RANDOM_VIA=y
 # CONFIG_HYPERVISOR_GUEST is not set
-CONFIG_HZ_PERIODIC=y
 CONFIG_I8253_LOCK=y
 CONFIG_IA32_FEAT_CTL=y
 # CONFIG_IB700_WDT is not set
@@ -275,6 +278,9 @@ CONFIG_NET_XGRESS=y
 CONFIG_NLS=y
 # CONFIG_NMI_CHECK_CPU is not set
 # CONFIG_NOHIGHMEM is not set
+CONFIG_NO_HZ=y
+CONFIG_NO_HZ_COMMON=y
+CONFIG_NO_HZ_FULL=y
 CONFIG_NR_CPUS=1
 CONFIG_NR_CPUS_DEFAULT=1
 CONFIG_NR_CPUS_RANGE_BEGIN=1
@@ -330,6 +336,8 @@ CONFIG_PTP_1588_CLOCK_OPTIONAL=y
 # CONFIG_PUNIT_ATOM_DEBUG is not set
 CONFIG_RANDSTRUCT_NONE=y
 CONFIG_RATIONAL=y
+CONFIG_RCU_LAZY=y
+CONFIG_RCU_NOCB_CPU_DEFAULT_ALL=y
 CONFIG_RD_BZIP2=y
 CONFIG_RD_GZIP=y
 CONFIG_RETHUNK=y




More information about the lede-commits mailing list