1. Computers
  2. Display Drivers
  3. Graphics Cards
  4. Memory
  5. Motherboards
  6. Processors
  7. Software
  8. Storage
  9. Operating Systems


Facebook RSS Twitter Twitter Google Plus


Phoronix Test Suite

OpenBenchmarking.org

CPUFreq Ondemand Could Be Faster, Use Less Power With Linux 3.17

Linux Kernel

Published on 22 July 2014 08:11 PM EDT
Written by Michael Larabel in Linux Kernel
14 Comments

Improvements to the CPUfreq ondemand governor could lead to faster performance in low to medium workloads with the Linux 3.17 kernel while also consuming less power overall.

Queued up today for merging into the Linux 3.17 kernel in a few weeks time are two patches that for the CPUfreq driver's ondemand governor will eliminate a "deadband effect" in low workloads. Stratos Karafotis -- the author of these patches -- explained, "This patchset changes slightly the calculation of target frequency to eliminate the deadband effect (explained in patch 2 changelog) that it seems to slow down the CPU in low and medium loads."

Tests were done by the developer of the patches and the benchmarks were carried out with the Phoronix Test Suite on an Intel Core i7 machine. With workloads ranging from the Linux kernel compilation to Apache to FFmpeg the energy savings were up to 4% while the performance was up to 6% faster with CPUfreq ondemand. Those details can be found in this mailing list post.

Rafael J. Wysocki, the Intel employee that serves as the ACPI/PM subsystem maintainer for the Linux kernel, queued the patches today for merging into Linux 3.17. Below is the patch message that describes this CPUfreq ondemand change for eliminating the deadband effect.
Currently, ondemand calculates the target frequency proportional to load using the formula:

Target frequency = C * load
where C = policy->cpuinfo.max_freq / 100

Though, in many cases, the minimum available frequency is pretty high and the above calculation introduces a dead band from load 0 to 100 * policy->cpuinfo.min_freq / policy->cpuinfo.max_freq where the target frequency is always calculated to less than policy->cpuinfo.min_freq and the minimum frequency is selected.

For example: on Intel i7-3770 @ 3.4GHz the policy->cpuinfo.min_freq = 1600000 and the policy->cpuinfo.max_freq = 3400000 (without turbo). Thus, the CPU starts to scale up at a load above 47. On quad core 1500MHz Krait the policy->cpuinfo.min_freq = 384000 and the policy->cpuinfo.max_freq = 1512000. Thus, the CPU starts to scale at load above 25.

Change the calculation of target frequency to eliminate the above effect using the formula:

Target frequency = A + B * load
where A = policy->cpuinfo.min_freq and
B = (policy->cpuinfo.max_freq - policy->cpuinfo->min_freq) / 100

This will map load values 0 to 100 linearly to cpuinfo.min_freq to cpuinfo.max_freq.

Also, use the CPUFREQ_RELATION_C in __cpufreq_driver_target to select the closest frequency in frequency_table. This is necessary to avoid selection of minimum frequency only when load equals to 0. It will also help for selection of frequencies using a more 'fair' criterion.

About The Author
Michael Larabel is the principal author of Phoronix.com and founded the web-site in 2004 with a focus on enriching the Linux hardware experience and being the largest web-site devoted to Linux hardware reviews, particularly for products relevant to Linux gamers and enthusiasts but also commonly reviewing servers/workstations and embedded Linux devices. Michael has written more than 10,000 articles covering the state of Linux hardware support, Linux performance, graphics hardware drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated testing software. He can be followed via and or contacted via .
Latest Linux Hardware Reviews
  1. Scythe Mugen MAX
  2. Intel Core i7 5960X Haswell-E On Linux
  3. Intel 80GB 530 Series M.2 SSD On Linux
  4. With A New Motherboard, The Core i7 5960X Haswell-E Lights Up
Latest Linux Articles
  1. A Tour Of The New Phoronix Office
  2. 7-Way Linux Desktop Gaming Comparison On Ubuntu 14.10
  3. Intel P-State vs. CPUFreq Benchmarks On The i7-5960X
  4. RadeonSI GLAMOR Benchmarks With X.Org Server 1.16
Latest Linux News
  1. Linux 3.17-rc6 Released; Linux 3.17 Final Might Come In One Week
  2. X.Org Server 1.16.1 Released
  3. Mesa Gets Closer To Having OpenGL 4.0 Tessellation Support
  4. Uselessd: A Stripped Down Version Of Systemd
  5. F2FS Tools Gain FSCK Support
  6. FreeBSD 10.1 Has The New VT Driver, Hardware Improvements
  7. AntiMicro 2.6 Yields Greater Compatibility For Gamepads On Linux
  8. OpenGL 3.3 / GLSL 3.30 Lands For Intel Sandy Bridge On Mesa
  9. AMD's RadeonSI Gallium3D Driver Sees Some Improvements
  10. Mesa 10.3 Released With The Latest Open-Source GPU Driver Improvements
Latest Forum Discussions
  1. NVIDIA GTX 770/780 -works ?
  2. Wasteland 2 Officially Launched Today, Including For Linux Gamers
  3. Trolling on the Phoronix forums
  4. X.Org Women Outreach Program Only Turns Up Two Applicants So Far
  5. New stress testing utility for GPU's
  6. ASRock AM1H-ITX: One Of The Best AM1 Mini-ITX Motherboards
  7. Can Linux kill a motherboard?
  8. Stop grabbing my keyboard :(