Bug 6103

Summary: Using cpufreq userspace governor, ACPI events can reduce speed but not restore it
Product: ACPI Reporter: Peter Wainwright (peter.wainwright)
Component: Power-ProcessorAssignee: acpi_power-processor
Status: CLOSED PATCH_ALREADY_AVAILABLE    
Severity: normal    
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.15 Subsystem:
Regression: --- Bisected commit-id:
Attachments: Kernel configuration
Adds debugging spew to kernel to show frequency reduction

Description Peter Wainwright 2006-02-19 04:54:13 UTC
Most recent kernel where this bug did not occur: Unknown
Distribution: Fedora Core 4
Hardware Environment: HP nx6125 laptop - Turion 64, ATI chipset, AMD powernow-k8
Software Environment: Fedora Core 4 with vanilla kernel.org kernel
Problem Description:

CPU frequency keeps dropping back to lowest setting.


(1) Using the cpufreq "userspace" governor with the CPU frequency monitor
Gnome Applet but WITHOUT the cpuspeed service on, it is possible to
increase the CPU frequency to its maximum setting (2200MHz) (this is
presumably just a GUI wrapper around a write to scaling_setspeed).  However,
with a typical busy system (compililing), the monitor applet shows the
speed soon drops back to 800MHz and never recovers.  Some kernel debugging
(using the patch attached) has shown that an ACPI processor "PPC changed"
notify event is received which causes the cpufreq policy to be updated,
and the maximum frequency reduced.  A second ACPI event is received
a few seconds later as the PPC value is reset to its original (fastest)
value, but the cpufreq policy is not updated by this and the max frequency stays
low.

(2) Running the cpuspeed daemon can improve this slightly.  However,
cpuspeed v1.2.1 will only change the CPU speed if the newly calculated
speed (based on processor idle time) is DIFFERENT from the value calculated
last time.  This means that when ACPI changes the speed "behind its back"
it causes great confusion.

Steps to reproduce:

Install a kernel with cpufreq, ACPI and the userspace governor (see
attached CONFIG).  Run a long compilation or other realistic load.
Try to set speed to max (2200MHz?) using scaling_setspeed or
Gnome applet.



Peter Wainwright
Comment 1 Peter Wainwright 2006-02-19 04:55:36 UTC
Created attachment 7411 [details]
Kernel configuration
Comment 2 Peter Wainwright 2006-02-19 04:57:40 UTC
Created attachment 7412 [details]
Adds debugging spew to kernel to show frequency reduction
Comment 3 Peter Wainwright 2006-02-19 05:19:25 UTC
Further information about my configuration:

The BIOS version is F.0D - the latest available from HP.

My kernel options are

ro root=LABEL=/ no_timer_check=0 rhgb quiet enforcing=0 noapic nolapic

(no_timer_check, noapic, nolapic are there to work around various other -
apparently independent - bugs relating to the HP NX6125).
Comment 4 Alexey Starikovskiy 2007-06-04 12:42:10 UTC
Peter, do you still have this problem with 2.6.21?
Comment 5 Peter Wainwright 2007-06-07 10:49:22 UTC
I haven't seen this problem for some time, so I would say it is fixed
in 2.6.21.
Comment 6 Alexey Starikovskiy 2007-06-08 04:29:36 UTC
Thanks for reporting. Closing.