1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only 2bb0a56ecSDave Jonesmenu "CPU Frequency scaling" 3bb0a56ecSDave Jones 41da177e4SLinus Torvaldsconfig CPU_FREQ 51da177e4SLinus Torvalds bool "CPU Frequency scaling" 61da177e4SLinus Torvalds help 71da177e4SLinus Torvalds CPU Frequency scaling allows you to change the clock speed of 81da177e4SLinus Torvalds CPUs on the fly. This is a nice method to save power, because 91da177e4SLinus Torvalds the lower the CPU clock speed, the less power the CPU consumes. 101da177e4SLinus Torvalds 111da177e4SLinus Torvalds Note that this driver doesn't automatically change the CPU 121da177e4SLinus Torvalds clock speed, you need to either enable a dynamic cpufreq governor 131da177e4SLinus Torvalds (see below) after boot, or use a userspace tool. 141da177e4SLinus Torvalds 15733dda9cSAlexander Monakov For details, take a look at 16733dda9cSAlexander Monakov <file:Documentation/admin-guide/pm/cpufreq.rst>. 171da177e4SLinus Torvalds 181da177e4SLinus Torvalds If in doubt, say N. 191da177e4SLinus Torvalds 201da177e4SLinus Torvaldsif CPU_FREQ 211da177e4SLinus Torvalds 222d0c58adSRafael J. Wysockiconfig CPU_FREQ_GOV_ATTR_SET 232d0c58adSRafael J. Wysocki bool 242d0c58adSRafael J. Wysocki 251e15f295SLarry Fingerconfig CPU_FREQ_GOV_COMMON 262d0c58adSRafael J. Wysocki select CPU_FREQ_GOV_ATTR_SET 27e6f03657SRafael J. Wysocki select IRQ_WORK 281e15f295SLarry Finger bool 291e15f295SLarry Finger 301da177e4SLinus Torvaldsconfig CPU_FREQ_STAT 311aefc75bSRafael J. Wysocki bool "CPU frequency transition statistics" 321da177e4SLinus Torvalds help 331aefc75bSRafael J. Wysocki Export CPU frequency statistics information through sysfs. 349101be53SMike Frysinger 359101be53SMike Frysinger If in doubt, say N. 361da177e4SLinus Torvalds 371da177e4SLinus Torvaldschoice 381da177e4SLinus Torvalds prompt "Default CPUFreq governor" 39349619f0SArnd Bergmann default CPU_FREQ_DEFAULT_GOV_USERSPACE if ARM_SA1110_CPUFREQ 40f259eab3SValentin Schneider default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if ARM64 || ARM 41a4ba10bfSMario Limonciello default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if (X86_INTEL_PSTATE || X86_AMD_PSTATE) && SMP 421da177e4SLinus Torvalds default CPU_FREQ_DEFAULT_GOV_PERFORMANCE 431da177e4SLinus Torvalds help 441da177e4SLinus Torvalds This option sets which CPUFreq governor shall be loaded at 45a00ec387SRafael J. Wysocki startup. If in doubt, use the default setting. 461da177e4SLinus Torvalds 471da177e4SLinus Torvaldsconfig CPU_FREQ_DEFAULT_GOV_PERFORMANCE 481da177e4SLinus Torvalds bool "performance" 491da177e4SLinus Torvalds select CPU_FREQ_GOV_PERFORMANCE 501da177e4SLinus Torvalds help 511da177e4SLinus Torvalds Use the CPUFreq governor 'performance' as default. This sets 521da177e4SLinus Torvalds the frequency statically to the highest frequency supported by 531da177e4SLinus Torvalds the CPU. 541da177e4SLinus Torvalds 5530d221dbSAlessandro Guidoconfig CPU_FREQ_DEFAULT_GOV_POWERSAVE 5630d221dbSAlessandro Guido bool "powersave" 5730d221dbSAlessandro Guido select CPU_FREQ_GOV_POWERSAVE 5830d221dbSAlessandro Guido help 5930d221dbSAlessandro Guido Use the CPUFreq governor 'powersave' as default. This sets 6030d221dbSAlessandro Guido the frequency statically to the lowest frequency supported by 6130d221dbSAlessandro Guido the CPU. 6230d221dbSAlessandro Guido 631da177e4SLinus Torvaldsconfig CPU_FREQ_DEFAULT_GOV_USERSPACE 641da177e4SLinus Torvalds bool "userspace" 651da177e4SLinus Torvalds select CPU_FREQ_GOV_USERSPACE 661da177e4SLinus Torvalds help 671da177e4SLinus Torvalds Use the CPUFreq governor 'userspace' as default. This allows 680211a9c8SFrederik Schwarzer you to set the CPU frequency manually or when a userspace 691da177e4SLinus Torvalds program shall be able to set the CPU dynamically without having 701da177e4SLinus Torvalds to enable the userspace governor manually. 711da177e4SLinus Torvalds 721c256245SThomas Renningerconfig CPU_FREQ_DEFAULT_GOV_ONDEMAND 731c256245SThomas Renninger bool "ondemand" 74db865272SRafael J. Wysocki depends on !(X86_INTEL_PSTATE && SMP) 751c256245SThomas Renninger select CPU_FREQ_GOV_ONDEMAND 761c256245SThomas Renninger select CPU_FREQ_GOV_PERFORMANCE 771c256245SThomas Renninger help 781c256245SThomas Renninger Use the CPUFreq governor 'ondemand' as default. This allows 791c256245SThomas Renninger you to get a full dynamic frequency capable system by simply 801c256245SThomas Renninger loading your cpufreq low-level hardware driver. 811c256245SThomas Renninger Be aware that not all cpufreq drivers support the ondemand 821c256245SThomas Renninger governor. If unsure have a look at the help section of the 831c256245SThomas Renninger driver. Fallback governor will be the performance governor. 841c256245SThomas Renninger 851c256245SThomas Renningerconfig CPU_FREQ_DEFAULT_GOV_CONSERVATIVE 861c256245SThomas Renninger bool "conservative" 87db865272SRafael J. Wysocki depends on !(X86_INTEL_PSTATE && SMP) 881c256245SThomas Renninger select CPU_FREQ_GOV_CONSERVATIVE 891c256245SThomas Renninger select CPU_FREQ_GOV_PERFORMANCE 901c256245SThomas Renninger help 911c256245SThomas Renninger Use the CPUFreq governor 'conservative' as default. This allows 921c256245SThomas Renninger you to get a full dynamic frequency capable system by simply 931c256245SThomas Renninger loading your cpufreq low-level hardware driver. 941c256245SThomas Renninger Be aware that not all cpufreq drivers support the conservative 951c256245SThomas Renninger governor. If unsure have a look at the help section of the 961c256245SThomas Renninger driver. Fallback governor will be the performance governor. 979bdcb44eSRafael J. Wysocki 989bdcb44eSRafael J. Wysockiconfig CPU_FREQ_DEFAULT_GOV_SCHEDUTIL 999bdcb44eSRafael J. Wysocki bool "schedutil" 100cfe9492fSArnd Bergmann depends on SMP 1019bdcb44eSRafael J. Wysocki select CPU_FREQ_GOV_SCHEDUTIL 1029bdcb44eSRafael J. Wysocki select CPU_FREQ_GOV_PERFORMANCE 1039bdcb44eSRafael J. Wysocki help 1049bdcb44eSRafael J. Wysocki Use the 'schedutil' CPUFreq governor by default. If unsure, 1059bdcb44eSRafael J. Wysocki have a look at the help section of that governor. The fallback 1069bdcb44eSRafael J. Wysocki governor will be 'performance'. 1079bdcb44eSRafael J. Wysocki 1081da177e4SLinus Torvaldsendchoice 1091da177e4SLinus Torvalds 1101da177e4SLinus Torvaldsconfig CPU_FREQ_GOV_PERFORMANCE 1111da177e4SLinus Torvalds tristate "'performance' governor" 1121da177e4SLinus Torvalds help 1131da177e4SLinus Torvalds This cpufreq governor sets the frequency statically to the 1141da177e4SLinus Torvalds highest available CPU frequency. 1151da177e4SLinus Torvalds 1169101be53SMike Frysinger To compile this driver as a module, choose M here: the 1179101be53SMike Frysinger module will be called cpufreq_performance. 1189101be53SMike Frysinger 1191da177e4SLinus Torvalds If in doubt, say Y. 1201da177e4SLinus Torvalds 1211da177e4SLinus Torvaldsconfig CPU_FREQ_GOV_POWERSAVE 1221da177e4SLinus Torvalds tristate "'powersave' governor" 1231da177e4SLinus Torvalds help 1241da177e4SLinus Torvalds This cpufreq governor sets the frequency statically to the 1251da177e4SLinus Torvalds lowest available CPU frequency. 1261da177e4SLinus Torvalds 1279101be53SMike Frysinger To compile this driver as a module, choose M here: the 1289101be53SMike Frysinger module will be called cpufreq_powersave. 1299101be53SMike Frysinger 1301da177e4SLinus Torvalds If in doubt, say Y. 1311da177e4SLinus Torvalds 1321da177e4SLinus Torvaldsconfig CPU_FREQ_GOV_USERSPACE 1331da177e4SLinus Torvalds tristate "'userspace' governor for userspace frequency scaling" 1341da177e4SLinus Torvalds help 1351da177e4SLinus Torvalds Enable this cpufreq governor when you either want to set the 1360211a9c8SFrederik Schwarzer CPU frequency manually or when a userspace program shall 1371da177e4SLinus Torvalds be able to set the CPU dynamically, like on LART 1384c41251eSErik Mouw <http://www.lartmaker.nl/>. 1391da177e4SLinus Torvalds 1409101be53SMike Frysinger To compile this driver as a module, choose M here: the 1419101be53SMike Frysinger module will be called cpufreq_userspace. 1429101be53SMike Frysinger 1431da177e4SLinus Torvalds If in doubt, say Y. 1441da177e4SLinus Torvalds 1451da177e4SLinus Torvaldsconfig CPU_FREQ_GOV_ONDEMAND 1461da177e4SLinus Torvalds tristate "'ondemand' cpufreq policy governor" 1471e15f295SLarry Finger select CPU_FREQ_GOV_COMMON 1481da177e4SLinus Torvalds help 1491da177e4SLinus Torvalds 'ondemand' - This driver adds a dynamic cpufreq policy governor. 1501da177e4SLinus Torvalds The governor does a periodic polling and 1511da177e4SLinus Torvalds changes frequency based on the CPU utilization. 1521da177e4SLinus Torvalds The support for this governor depends on CPU capability to 1531da177e4SLinus Torvalds do fast frequency switching (i.e, very low latency frequency 1541da177e4SLinus Torvalds transitions). 1551da177e4SLinus Torvalds 1569101be53SMike Frysinger To compile this driver as a module, choose M here: the 1579101be53SMike Frysinger module will be called cpufreq_ondemand. 1589101be53SMike Frysinger 159733dda9cSAlexander Monakov For details, take a look at 160733dda9cSAlexander Monakov <file:Documentation/admin-guide/pm/cpufreq.rst>. 1611da177e4SLinus Torvalds 1621da177e4SLinus Torvalds If in doubt, say N. 1631da177e4SLinus Torvalds 164b9170836SDave Jonesconfig CPU_FREQ_GOV_CONSERVATIVE 165b9170836SDave Jones tristate "'conservative' cpufreq governor" 1661e15f295SLarry Finger select CPU_FREQ_GOV_COMMON 167b9170836SDave Jones help 168b9170836SDave Jones 'conservative' - this driver is rather similar to the 'ondemand' 169b9170836SDave Jones governor both in its source code and its purpose, the difference is 170b9170836SDave Jones its optimisation for better suitability in a battery powered 171b9170836SDave Jones environment. The frequency is gracefully increased and decreased 172b9170836SDave Jones rather than jumping to 100% when speed is required. 173b9170836SDave Jones 174b9170836SDave Jones If you have a desktop machine then you should really be considering 175b9170836SDave Jones the 'ondemand' governor instead, however if you are using a laptop, 176b9170836SDave Jones PDA or even an AMD64 based computer (due to the unacceptable 177b9170836SDave Jones step-by-step latency issues between the minimum and maximum frequency 178b9170836SDave Jones transitions in the CPU) you will probably want to use this governor. 179b9170836SDave Jones 1809101be53SMike Frysinger To compile this driver as a module, choose M here: the 1819101be53SMike Frysinger module will be called cpufreq_conservative. 1829101be53SMike Frysinger 183733dda9cSAlexander Monakov For details, take a look at 184733dda9cSAlexander Monakov <file:Documentation/admin-guide/pm/cpufreq.rst>. 185b9170836SDave Jones 186b9170836SDave Jones If in doubt, say N. 187b9170836SDave Jones 1889bdcb44eSRafael J. Wysockiconfig CPU_FREQ_GOV_SCHEDUTIL 18958919e83SRafael J. Wysocki bool "'schedutil' cpufreq policy governor" 190*2e00c2dcSJulian Braha depends on SMP 1919bdcb44eSRafael J. Wysocki select CPU_FREQ_GOV_ATTR_SET 1929bdcb44eSRafael J. Wysocki select IRQ_WORK 1939bdcb44eSRafael J. Wysocki help 1949bdcb44eSRafael J. Wysocki This governor makes decisions based on the utilization data provided 1959bdcb44eSRafael J. Wysocki by the scheduler. It sets the CPU frequency to be proportional to 1969bdcb44eSRafael J. Wysocki the utilization/capacity ratio coming from the scheduler. If the 1979bdcb44eSRafael J. Wysocki utilization is frequency-invariant, the new frequency is also 1989bdcb44eSRafael J. Wysocki proportional to the maximum available frequency. If that is not the 1999bdcb44eSRafael J. Wysocki case, it is proportional to the current frequency of the CPU. The 2009bdcb44eSRafael J. Wysocki frequency tipping point is at utilization/capacity equal to 80% in 2019bdcb44eSRafael J. Wysocki both cases. 2029bdcb44eSRafael J. Wysocki 2039bdcb44eSRafael J. Wysocki If in doubt, say N. 2049bdcb44eSRafael J. Wysocki 205f41f4815SViresh Kumarcomment "CPU frequency scaling drivers" 206f41f4815SViresh Kumar 207bbcf0719SViresh Kumarconfig CPUFREQ_DT 208bbcf0719SViresh Kumar tristate "Generic DT based cpufreq driver" 2095fbfbcd3SViresh Kumar depends on HAVE_CLK && OF 210f56aad1dSViresh Kumar select CPUFREQ_DT_PLATDEV 211109df086SMark Brown select PM_OPP 21295ceafd4SShawn Guo help 213bbcf0719SViresh Kumar This adds a generic DT based cpufreq driver for frequency management. 21495ceafd4SShawn Guo It supports both uniprocessor (UP) and symmetric multiprocessor (SMP) 21533cc4fc1SViresh Kumar systems. 21695ceafd4SShawn Guo 21795ceafd4SShawn Guo If in doubt, say N. 21895ceafd4SShawn Guo 21906149d8fSViresh Kumarconfig CPUFREQ_DT_RUST 22006149d8fSViresh Kumar tristate "Rust based Generic DT based cpufreq driver" 22106149d8fSViresh Kumar depends on HAVE_CLK && OF && RUST 22206149d8fSViresh Kumar select CPUFREQ_DT_PLATDEV 22306149d8fSViresh Kumar select PM_OPP 22406149d8fSViresh Kumar help 22506149d8fSViresh Kumar This adds a Rust based generic DT based cpufreq driver for frequency 22606149d8fSViresh Kumar management. It supports both uniprocessor (UP) and symmetric 22706149d8fSViresh Kumar multiprocessor (SMP) systems. 22806149d8fSViresh Kumar 22906149d8fSViresh Kumar If in doubt, say N. 23006149d8fSViresh Kumar 2314fd06a53SDavid Daiconfig CPUFREQ_VIRT 2324fd06a53SDavid Dai tristate "Virtual cpufreq driver" 2334fd06a53SDavid Dai depends on GENERIC_ARCH_TOPOLOGY 2344fd06a53SDavid Dai help 2354fd06a53SDavid Dai This adds a virtualized cpufreq driver for guest kernels that 2364fd06a53SDavid Dai read/writes to a MMIO region for a virtualized cpufreq device to 2374fd06a53SDavid Dai communicate with the host. It sends performance requests to the host 2384fd06a53SDavid Dai which gets used as a hint to schedule vCPU threads and select CPU 2394fd06a53SDavid Dai frequency. If a VM does not support a virtualized FIE such as AMUs, 2404fd06a53SDavid Dai it updates the frequency scaling factor by polling host CPU frequency 2414fd06a53SDavid Dai to enable accurate Per-Entity Load Tracking for tasks running in the guest. 2424fd06a53SDavid Dai 2434fd06a53SDavid Dai If in doubt, say N. 2444fd06a53SDavid Dai 245f56aad1dSViresh Kumarconfig CPUFREQ_DT_PLATDEV 246f1f010c9SAndreas Kemnade bool "Generic DT based cpufreq platdev driver" 2470b76cc3eSViresh Kumar depends on OF 248f56aad1dSViresh Kumar help 249f56aad1dSViresh Kumar This adds a generic DT based cpufreq platdev driver for frequency 250f56aad1dSViresh Kumar management. This creates a 'cpufreq-dt' platform device, on the 251f56aad1dSViresh Kumar supported platforms. 252f56aad1dSViresh Kumar 253f56aad1dSViresh Kumar If in doubt, say N. 254f56aad1dSViresh Kumar 255f41f4815SViresh Kumarif X86 256bb0a56ecSDave Jonessource "drivers/cpufreq/Kconfig.x86" 257f41f4815SViresh Kumarendif 258bb0a56ecSDave Jones 259f7d77079SKukjin Kimsource "drivers/cpufreq/Kconfig.arm" 260f7d77079SKukjin Kim 261f41f4815SViresh Kumarif PPC32 || PPC64 262f41f4815SViresh Kumarsource "drivers/cpufreq/Kconfig.powerpc" 263f41f4815SViresh Kumarendif 26481c720c9SViresh Kumar 265f41f4815SViresh Kumarif MIPS 266cdb56cbfSMarkus Mayerconfig BMIPS_CPUFREQ 267cdb56cbfSMarkus Mayer tristate "BMIPS CPUfreq Driver" 268cdb56cbfSMarkus Mayer help 269cdb56cbfSMarkus Mayer This option adds a CPUfreq driver for BMIPS processors with 270cdb56cbfSMarkus Mayer support for configurable CPU frequency. 271cdb56cbfSMarkus Mayer 272cdb56cbfSMarkus Mayer For now, BMIPS5 chips are supported (such as the Broadcom 7425). 273cdb56cbfSMarkus Mayer 274cdb56cbfSMarkus Mayer If in doubt, say N. 275cdb56cbfSMarkus Mayer 2767a998935SViresh Kumarconfig LOONGSON2_CPUFREQ 2777a998935SViresh Kumar tristate "Loongson2 CPUFreq Driver" 2780d307935SJames Hogan depends on LEMOTE_MACH2F 2797a998935SViresh Kumar help 2807a998935SViresh Kumar This option adds a CPUFreq driver for loongson processors which 2817a998935SViresh Kumar support software configurable cpu frequency. 2827a998935SViresh Kumar 2839d822ccfSRandy Dunlap Loongson2F and its successors support this feature. 2847a998935SViresh Kumar 2857a998935SViresh Kumar If in doubt, say N. 286f41f4815SViresh Kumarendif 287a0a22cf1SKelvin Cheung 288ccf51454SHuacai Chenif LOONGARCH 289ccf51454SHuacai Chenconfig LOONGSON3_CPUFREQ 290ccf51454SHuacai Chen tristate "Loongson3 CPUFreq Driver" 291ccf51454SHuacai Chen help 292ccf51454SHuacai Chen This option adds a CPUFreq driver for Loongson processors which 293ccf51454SHuacai Chen support software configurable cpu frequency. 294ccf51454SHuacai Chen 295ccf51454SHuacai Chen Loongson-3 family processors support this feature. 296ccf51454SHuacai Chen 297ccf51454SHuacai Chen If in doubt, say N. 298ccf51454SHuacai Chenendif 299ccf51454SHuacai Chen 300f41f4815SViresh Kumarif SPARC64 301764295aeSViresh Kumarconfig SPARC_US3_CPUFREQ 302764295aeSViresh Kumar tristate "UltraSPARC-III CPU Frequency driver" 303764295aeSViresh Kumar help 304764295aeSViresh Kumar This adds the CPUFreq driver for UltraSPARC-III processors. 305764295aeSViresh Kumar 306764295aeSViresh Kumar If in doubt, say N. 307764295aeSViresh Kumar 308764295aeSViresh Kumarconfig SPARC_US2E_CPUFREQ 309764295aeSViresh Kumar tristate "UltraSPARC-IIe CPU Frequency driver" 310764295aeSViresh Kumar help 311764295aeSViresh Kumar This adds the CPUFreq driver for UltraSPARC-IIe processors. 312764295aeSViresh Kumar 313764295aeSViresh Kumar If in doubt, say N. 314f41f4815SViresh Kumarendif 315764295aeSViresh Kumar 316f41f4815SViresh Kumarif SUPERH 3177258267eSViresh Kumarconfig SH_CPU_FREQ 3187258267eSViresh Kumar tristate "SuperH CPU Frequency driver" 3197258267eSViresh Kumar help 3207258267eSViresh Kumar This adds the cpufreq driver for SuperH. Any CPU that supports 3217258267eSViresh Kumar clock rate rounding through the clock framework can use this 3227258267eSViresh Kumar driver. While it will make the kernel slightly larger, this is 3237258267eSViresh Kumar harmless for CPUs that don't support rate rounding. The driver 3247258267eSViresh Kumar will also generate a notice in the boot log before disabling 3257258267eSViresh Kumar itself if the CPU in question is not capable of rate rounding. 3267258267eSViresh Kumar 3277258267eSViresh Kumar If unsure, say N. 328f41f4815SViresh Kumarendif 3297258267eSViresh Kumar 3302f249358STang Yuantianconfig QORIQ_CPUFREQ 3312f249358STang Yuantian tristate "CPU frequency scaling driver for Freescale QorIQ SoCs" 3321f1755afSGeert Uytterhoeven depends on OF && COMMON_CLK 3331f1755afSGeert Uytterhoeven depends on PPC_E500MC || SOC_LS1021A || ARCH_LAYERSCAPE || COMPILE_TEST 3342f249358STang Yuantian select CLK_QORIQ 3352f249358STang Yuantian help 3362f249358STang Yuantian This adds the CPUFreq driver support for Freescale QorIQ SoCs 3372f249358STang Yuantian which are capable of changing the CPU's frequency dynamically. 3382f249358STang Yuantian 3397ee13787SSunil V Lconfig ACPI_CPPC_CPUFREQ 3407ee13787SSunil V L tristate "CPUFreq driver based on the ACPI CPPC spec" 3417ee13787SSunil V L depends on ACPI_PROCESSOR 3427ee13787SSunil V L depends on ARM || ARM64 || RISCV 3437ee13787SSunil V L select ACPI_CPPC_LIB 3447ee13787SSunil V L help 3457ee13787SSunil V L This adds a CPUFreq driver which uses CPPC methods 3467ee13787SSunil V L as described in the ACPIv5.1 spec. CPPC stands for 3477ee13787SSunil V L Collaborative Processor Performance Controls. It 3487ee13787SSunil V L is based on an abstract continuous scale of CPU 3497ee13787SSunil V L performance values which allows the remote power 3507ee13787SSunil V L processor to flexibly optimize for power and 3517ee13787SSunil V L performance. CPPC relies on power management firmware 3527ee13787SSunil V L support for its operation. 3537ee13787SSunil V L 3547ee13787SSunil V L If in doubt, say N. 3557ee13787SSunil V L 3567ee13787SSunil V Lconfig ACPI_CPPC_CPUFREQ_FIE 3577ee13787SSunil V L bool "Frequency Invariance support for CPPC cpufreq driver" 3587ee13787SSunil V L depends on ACPI_CPPC_CPUFREQ && GENERIC_ARCH_TOPOLOGY 3597ee13787SSunil V L depends on ARM || ARM64 || RISCV 3607ee13787SSunil V L default y 3617ee13787SSunil V L help 3627ee13787SSunil V L This extends frequency invariance support in the CPPC cpufreq driver, 3637ee13787SSunil V L by using CPPC delivered and reference performance counters. 3647ee13787SSunil V L 3657ee13787SSunil V L If in doubt, say N. 3667ee13787SSunil V L 367*2e00c2dcSJulian Brahaendif # CPU_FREQ 3687e265fc0SViresh Kumar 369bb0a56ecSDave Jonesendmenu 370