Re: powerd adaptive mode latching

From: Andrew Atrens <atrens_at_nortel.com>
Date: Mon, 07 Jan 2008 10:32:55 -0500
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

All,

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
_at__at_ -300,9 +300,9 _at__at_
                        continue;

                /* 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))
                        continue;

                count++;


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

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

iD8DBQFHgkYn8It2CaCdeMwRAqKzAJ0eai9FJpnqozuVfhJG8FK5nSRYGQCfeaNH
wlkT+eMWYUqQC7zyrdAk/oc=
=BRD0
-----END PGP SIGNATURE-----
Received on Mon Jan 07 2008 - 14:53:06 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:25 UTC