misc/97198: powerd unable to reduce CPU frequency

Julian Stecklina der_julian at web.de
Sat May 13 12:20:13 UTC 2006


>Number:         97198
>Category:       misc
>Synopsis:       powerd unable to reduce CPU frequency
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 13 12:20:10 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Julian Stecklina
>Release:        6.1-RELEASE
>Organization:
>Environment:
FreeBSD dellbeast.localhost 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Tue May  9 12:41:09 CEST 2006     blitz at dellbeast.localhost:/usr/obj/usr/src/sys/DELLBEAST  i386
>Description:
When I run powerd -v I get:

# powerd -v
idle time > 90%, decreasing clock speed from 1400 MHz to 1400 MHz
idle time > 90%, decreasing clock speed from 1400 MHz to 1400 MHz
idle time > 90%, decreasing clock speed from 1400 MHz to 1400 MHz
..

This is caused by:
> sysctl dev.cpu.0.freq_levels
dev.cpu.0.freq_levels: 1400/21000 1400/21000 1400/21000 1400/21000 1225/18375 1200/17500 1050/15312 1000/14000 875/12250 800/10900 700/9537 600/7500 525/6562 450/5625 375/4687 300/3750 225/2812 150/1875 75/937

Here you see that the first frequency level is repeated multiple times. And because of the way powerd handles "downclocking" it will never reach any frequency level below 1400 MHz.

This is on an Dell Inspiron 510m with Pentium-M 1,4GHz.
>How-To-Repeat:
powerd -v
>Fix:
More like a workaround:

--- /usr/src/usr.sbin/powerd/powerd.c   Sun Jan 15 18:50:37 2006
+++ powerd.c    Sat May 13 14:00:06 2006
@@ -483,7 +483,7 @@
                                    freqs[i]);
                } else if (idle > (total * cpu_idle_mark) / 100 &&
                    curfreq > freqs[numfreqs - 1]) {
-                       i++;
+                       while (curfreq == freqs[++i]) {};
                        if (vflag) {
                                printf("idle time > %d%%, decreasing clock"
                                    " speed from %d MHz to %d MHz\n",

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list