linux/Documentation/cpu-freq/boost.txt
<<
>>
Prefs
   1Processor boosting control
   2
   3        - information for users -
   4
   5Quick guide for the impatient:
   6--------------------
   7/sys/devices/system/cpu/cpufreq/boost
   8controls the boost setting for the whole system. You can read and write
   9that file with either "0" (boosting disabled) or "1" (boosting allowed).
  10Reading or writing 1 does not mean that the system is boosting at this
  11very moment, but only that the CPU _may_ raise the frequency at it's
  12discretion.
  13--------------------
  14
  15Introduction
  16-------------
  17Some CPUs support a functionality to raise the operating frequency of
  18some cores in a multi-core package if certain conditions apply, mostly
  19if the whole chip is not fully utilized and below it's intended thermal
  20budget. This is done without operating system control by a combination
  21of hardware and firmware.
  22On Intel CPUs this is called "Turbo Boost", AMD calls it "Turbo-Core",
  23in technical documentation "Core performance boost". In Linux we use
  24the term "boost" for convenience.
  25
  26Rationale for disable switch
  27----------------------------
  28
  29Though the idea is to just give better performance without any user
  30intervention, sometimes the need arises to disable this functionality.
  31Most systems offer a switch in the (BIOS) firmware to disable the
  32functionality at all, but a more fine-grained and dynamic control would
  33be desirable:
  341. While running benchmarks, reproducible results are important. Since
  35   the boosting functionality depends on the load of the whole package,
  36   single thread performance can vary. By explicitly disabling the boost
  37   functionality at least for the benchmark's run-time the system will run
  38   at a fixed frequency and results are reproducible again.
  392. To examine the impact of the boosting functionality it is helpful
  40   to do tests with and without boosting.
  413. Boosting means overclocking the processor, though under controlled
  42   conditions. By raising the frequency and the voltage the processor
  43   will consume more power than without the boosting, which may be
  44   undesirable for instance for mobile users. Disabling boosting may
  45   save power here, though this depends on the workload.
  46
  47
  48User controlled switch
  49----------------------
  50
  51To allow the user to toggle the boosting functionality, the acpi-cpufreq
  52driver exports a sysfs knob to disable it. There is a file:
  53/sys/devices/system/cpu/cpufreq/boost
  54which can either read "0" (boosting disabled) or "1" (boosting enabled).
  55Reading the file is always supported, even if the processor does not
  56support boosting. In this case the file will be read-only and always
  57reads as "0". Explicitly changing the permissions and writing to that
  58file anyway will return EINVAL.
  59
  60On supported CPUs one can write either a "0" or a "1" into this file.
  61This will either disable the boost functionality on all cores in the
  62whole system (0) or will allow the hardware to boost at will (1).
  63
  64Writing a "1" does not explicitly boost the system, but just allows the
  65CPU (and the firmware) to boost at their discretion. Some implementations
  66take external factors like the chip's temperature into account, so
  67boosting once does not necessarily mean that it will occur every time
  68even using the exact same software setup.
  69
  70
  71AMD legacy cpb switch
  72---------------------
  73The AMD powernow-k8 driver used to support a very similar switch to
  74disable or enable the "Core Performance Boost" feature of some AMD CPUs.
  75This switch was instantiated in each CPU's cpufreq directory
  76(/sys/devices/system/cpu[0-9]*/cpufreq) and was called "cpb".
  77Though the per CPU existence hints at a more fine grained control, the
  78actual implementation only supported a system-global switch semantics,
  79which was simply reflected into each CPU's file. Writing a 0 or 1 into it
  80would pull the other CPUs to the same state.
  81For compatibility reasons this file and its behavior is still supported
  82on AMD CPUs, though it is now protected by a config switch
  83(X86_ACPI_CPUFREQ_CPB). On Intel CPUs this file will never be created,
  84even with the config option set.
  85This functionality is considered legacy and will be removed in some future
  86kernel version.
  87
  88More fine grained boosting control
  89----------------------------------
  90
  91Technically it is possible to switch the boosting functionality at least
  92on a per package basis, for some CPUs even per core. Currently the driver
  93does not support it, but this may be implemented in the future.
  94
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.