powerd adaptive mode latching

Andrew Atrens atrens at nortel.com
Mon Jan 7 07:53:06 PST 2008

Hash: SHA1


As far as I know a fix has not been submitted. My brain is still a bit foggy from being off on
holiday, but it seems to me that Benjamin still had a problem with his AMD dual core system.

I'm about 99% certain that the root cause of his problem was somewhat different than what Simon and
I were experiencing. If I recall, from his investigations it seemed like his acpi frequency list
appeared to be getting corrupted - duplicate entries were getting added to the list. It almost
looked like both cpus were building the list in parallel - which doesn't make any sense at all since
only one core should be running, and in any event this code should only be executed once. It could
also be a caching issue / compiler bug on his platform, more likely the latter because it appears to
be 100% reproducable. I didn't ask Benjamin what compiler options he's using - I'm just assuming
it's the usual -O.

In my experience (and Simon's I believe) *near* duplicate entries are reported by the BIOS and
either of the submitted patches will work just fine.

I suggest be submitted to address the more common problem, and keep Ben's PR open for tracking purposes.

Here's the patch I'm using -

# cvs diff -u acpi_perf.c
Index: acpi_perf.c
RCS file: /usr/repo/freebsd/src/sys/dev/acpica/acpi_perf.c,v
retrieving revision 1.26
diff -u -r1.26 acpi_perf.c
- --- acpi_perf.c 22 Mar 2007 18:16:40 -0000      1.26
+++ acpi_perf.c 16 Nov 2007 20:11:02 -0000
@@ -300,9 +300,9 @@

                /* Check for duplicate entries */
- -               if (count > 0 &&
- -                   sc->px_states[count - 1].core_freq ==
- -                       sc->px_states[count].core_freq)
+               if (count > 0 &&
+                   CPUFREQ_CMP(sc->px_states[count - 1].core_freq,
+                               sc->px_states[count].core_freq))


It's so simple that it's kind of silly that it (or something like it) hasn't been committed yet...

Anyone out there with a commit bit interested in submitting this ?

- --Andrew

Version: GnuPG v2.0.4 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the freebsd-current mailing list