Skip to content

Commit

Permalink
x86: Tickless kernel and add missing CPU idle govs
Browse files Browse the repository at this point in the history
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.  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 smal, concomitant reduction in both
idle temps and at-the-wall power consumption.

This commit fixes and closes openwrt#16313.

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.

This commit also builds in several other options for CPU idle
governors.

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 Sep 7, 2024
1 parent dc26019 commit bd7a2d8
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 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,12 @@ 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_HZ_100=y
CONFIG_HZ=100
# CONFIG_HZ_PERIODIC is not set
CONFIG_NO_HZ=y
CONFIG_NO_HZ_COMMON=y
CONFIG_NO_HZ_FULL=y
CONFIG_I8253_LOCK=y
CONFIG_IA32_FEAT_CTL=y
# CONFIG_IB700_WDT is not set
Expand Down Expand Up @@ -336,6 +345,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 bd7a2d8

Please sign in to comment.