You are not logged in.

#1 2010-07-21 21:42:23

Registered: 2010-07-21
Posts: 3

cpufreq ondemand governor problem with p4-clockmod [SOLVED]

EDIT: After a search that I should have done before I wrote this post, I found this topic:  Apparently this is a problem with the kernel module (p4-clockmod).  Feel free to delete this topic... couldn't find a self-deletion option.

Hello all,

I'm trying to use the cpufreq daemon to automatically throttle my CPU frequency and save some power.  I followed most of the directions on the wiki page for [wiki]cpufrequtils[/wiki] and believe I have everything setup correctly. My problem is that the ondemand governor absolutely will not function correctly.  After double checking my settings to make sure I had the daemon and conf files setup correctly, I decided to snoop around in the kernel log, because I knew that the ondemand governor was a kernel module.  I came across this troubling error message:

Jul 21 16:05:52 folly kernel: ondemand governor failed, too long transition latency of HW, fallback to performance governor

Has anyone run across this before? I'm running a couple of Intel Pentium-4 3.4 GHz processors (several years old).

Everything I did before discovering the log message:

1. Installed cpufrequtils with pacman -S cpufrequtils

2. Added my processor's cpu-frequency driver (p4-clockmod) and the module for my desired governor (ondemand) to the MODULES array in /etc/rc.conf:

MODULES=( p4-clockmod cpufreq_ondemand !snd-pcsp !snd-hda-intel )

3. Edited /etc/conf.d/cpufreq to use the ondemand governor with no explicit limits on CPU frequency:

#configuration for cpufreq control

# valid governors:
#  ondemand, performance, powersave,
#  conservative, userspace

# limit frequency range (optional)
# valid suffixes: Hz, kHz (default), MHz, GHz, THz

# use freq to set up the exact cpu frequency using it with userspace governor

4. Added the cpufreq daemon to the DAEMONS array in /etc/rc.conf:

DAEMONS=(syslog-ng !netfs @crond @hal @net-profiles @alsa @sshd @cpufreq)

5. Rebooted to run the daemon, which runs fine, it just won't switch to ondemand (not even manually using cpufreq-set -g ondemand)

Last edited by mws (2010-07-22 20:45:02)


#2 2010-07-22 07:56:35

Registered: 2009-10-08
Posts: 158

Re: cpufreq ondemand governor problem with p4-clockmod [SOLVED]

I think the reason for this is the lack of frequency scaling support on P4 CPUs. I have one of these running in a windows box and I've never seen it clocking down. It can only slow itself down by clock modulation (idling every n-th clocktick) which is a very uneffective way powersaving and speed wise.


#3 2010-07-22 20:44:15

Registered: 2010-07-21
Posts: 3

Re: cpufreq ondemand governor problem with p4-clockmod [SOLVED]

Interesting.  I did a little bit of googling on this, and it appears you are correct.

This person ( … e-battery/) did a little bit of ad-hoc testing and found that there were no power savings using ODCM (on demand clock modulation). 

It looks like whoever patched the p4-clockmod module to bump up the latency to disable ondemand frequency scaling knew what they were doing smile

EDIT: Found another good article that compares and contrasts different power-saving/frequency modulation methods for Intel processors:

Last edited by mws (2010-07-22 20:56:54)


#4 2010-07-22 21:44:54

Registered: 2003-12-03
Posts: 1,664

Re: cpufreq ondemand governor problem with p4-clockmod [SOLVED]

P4-clockmod always had a high latency when doing its changes. It's just a recent change in the ondemand and conservative governors that bail out for modules that have way too high latency.

BTW: Some P4 CPUs will do speedstepping with acpi-cpufreq. I have some Supermicro servers with P4 prescott CPUs in them that do speedstepping using that module. Be aware that frequency detection can be extremely crappy, I disabled powersaving on some servers because acpi-cpufreq would only detect half the clock frequency due to broken BIOS.


Board footer

Powered by FluxBB