[elrepo] No ondemand cpuspeed with 3.18.2-1.el6 kernel
Robert Nichols
rnicholsNOSPAM at comcast.net
Thu Jan 15 23:35:44 EST 2015
On 01/15/2015 07:23 PM, Akemi Yagi wrote:
> On Wed, Jan 14, 2015 at 11:59 PM, Robert Nichols
> <rnicholsNOSPAM at comcast.net> wrote:
>
>> With my patch, the script does load the cpufreq_ondemand module, and
>> that succeeds (it shows up in lsmod), but only "performance" and "powersave"
>> show up in /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
>
> From what I've read so far, the intel_pstate driver only supports the
> performance and the powersave governors. In newer kernels, this driver
> is used for newer processors such as sandy bridge and ivy bridge.
>
> I found this article informative:
>
> https://wiki.archlinux.org/index.php/CPU_frequency_scaling
Thanks for the link. It confirms what I've seen. The intel_pstate governor
is built into the kernel, and therefore the "cpuspeed" service does not
even need to be run at all. I've put a patch (attached) in the
/etc/sysconfig/cpuspeed config file to bail out (successfully) if anything
tries to start that service in a kernel version 3.17 or newer. (Of course
I've taken out the patch I had made to the init.d/cpuspeed file.)
The governor that they are calling "powersave" actually behaves like the
old "ondemand" governor. The frequency will be adjusted up and down as
needed.
--
Bob Nichols "NOSPAM" is really part of my email address.
Do NOT delete it.
-------------- next part --------------
--- /etc/sysconfig/cpuspeed.orig 2013-08-13 07:48:16.000000000 -0500
+++ /etc/sysconfig/cpuspeed 2015-01-15 19:39:13.569121045 -0600
@@ -25,7 +25,27 @@
# which provides said user-space frequency scaling.
# default value: empty (defaults to ondemand on centrino, powernow-k8,
# and acpi-cpufreq systems, userspace on others)
-GOVERNOR=
+Kern=$(uname -r)
+Kmajor=${Kern%%.*}
+Kminor=${Kern#$Kmajor.}
+Kminor=${Kminor%%.*}
+case $Kmajor in
+2)
+ ;;
+3) if [[ $Kminor -ge 17 && $1 != status ]]; then # Service is not needed
+ Cmd=${0##*/}
+ Cmd=${Cmd#[SK][0-9][0-9]}
+ echo -n "Ignoring $Cmd $1 in kernel ${Kmajor}.${Kminor}"
+ success; echo
+ exit 0
+# GOVERNOR=powersave
+ fi
+ ;;
+*)
+ echo "$0: Unknown kernel version: $Kernel" >&2
+ exit 1
+ ;;
+esac
### FREQUENCIES ###
# NOTE: valid max/min frequencies for your cpu(s) can be found in
More information about the elrepo
mailing list