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. Intel Xeon E5-1680 v3 & E5-2687W v3 Compared To The Core i7 5960X On Linux
  2. Intel 120GB 530 Series SSD Linux Performance
  3. Btrfs/EXT4/XFS/F2FS RAID 0/1/5/6/10 Linux Benchmarks On Four SSDs
  4. AMD's Windows Catalyst Driver Remains Largely Faster Than Linux Drivers
Latest Linux Articles
  1. Mesa Git Yields Performance Improvements For Newer AMD GPUs
  2. Apple OS X 10.10 vs. Ubuntu 14.10 Performance
  3. Mesa 10.5-devel Brings Some Intel Haswell HD Graphics Changes Over Mesa 10.3
  4. NVIDIA vs. Nouveau Drivers With Linux 3.18 + Mesa 10.4-devel
Latest Linux News
  1. Qt 5.4 Planned For Release On 9 December
  2. Meizu's Ubuntu Phone Not Expected Until Early Next Year
  3. DragonFlyBSD 4.0 Drops i386 Support, Improves Graphics
  4. Expensive "Free/Libre Software Laptop" Uses A NVIDIA GPU
  5. QEMU 2.2-rc3 Released, Final Release Pushed Back By Couple Days
  6. 64-bit ARM FreeBSD Support Is Taking Shape
  7. GCW Zero Starts Seeing New Game Releases
  8. Intel's Cherry Trail Delayed To Next Year
  9. Bq Introduces More Android Devices, But Still No Ubuntu Phones
  10. Qt 5.4 Release Candidate Expected Later This Week
Latest Forum Discussions
  1. Updated and Optimized Ubuntu Free Graphics Drivers
  2. Hurrican SDL Port
  3. Roadmap to Catalyst 14.10 ?
  4. how to configure module phoromatic ?
  5. PulseAudio 6.0 Is Coming & Other Linux Audio Plans For The Future
  6. Debian Developer Resigns From The Systemd Maintainership Team
  7. Cant get working Kaveri APU - A10-7850k
  8. Script for Fan Speed Control