Skip to content

Commit

Permalink
x86: switch config to a tickless kernel
Browse files Browse the repository at this point in the history
This commit fixes and closes openwrt#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 <[email protected]>
  • Loading branch information
graysky2 authored and vincejv committed Oct 3, 2024
1 parent b0b93b4 commit f7c778a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion target/linux/x86/config-6.6
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,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
Expand All @@ -60,7 +61,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
Expand Down Expand Up @@ -183,7 +187,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
Expand Down Expand Up @@ -281,6 +284,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
Expand Down Expand Up @@ -336,6 +342,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_RD_ZSTD=y
Expand Down

0 comments on commit f7c778a

Please sign in to comment.