Re: powerd adaptive mode latching

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Atrens
Date: Monday, January 7, 2008 - 8:32 am

-----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
@@ -300,9 +300,9 @@
                        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-----
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
powerd adaptive mode latching, Russell Jackson, (Sun Nov 4, 9:33 pm)
Re: powerd adaptive mode latching, Russell Jackson, (Mon Nov 5, 12:10 pm)
Re: powerd adaptive mode latching, Matus Harvan, (Mon Nov 5, 5:29 pm)
Re: powerd adaptive mode latching, Andrew Atrens, (Mon Nov 5, 7:36 pm)
Re: powerd adaptive mode latching, Simon Barner, (Thu Nov 8, 6:22 am)
Re: powerd adaptive mode latching, Andrew Atrens, (Thu Nov 8, 10:50 am)
Re: powerd adaptive mode latching, Simon Barner, (Thu Nov 8, 3:43 pm)
Re: powerd adaptive mode latching, Andrew Atrens, (Thu Nov 8, 3:54 pm)
Re: powerd adaptive mode latching, Benjamin Lutz, (Thu Nov 8, 4:05 pm)
Re: powerd adaptive mode latching, Stefan Lambrev, (Mon Jan 7, 5:05 am)
Re: powerd adaptive mode latching, Andrew Atrens, (Mon Jan 7, 8:32 am)
Re: powerd adaptive mode latching, Oliver Fromme, (Fri Jan 11, 2:09 am)
Re: powerd adaptive mode latching, Stefan Lambrev, (Fri Jan 11, 2:34 am)
Re: powerd adaptive mode latching, Stefan Lambrev, (Fri Jan 11, 2:51 am)
Re: powerd adaptive mode latching, Oliver Fromme, (Fri Jan 11, 3:10 am)
Re: powerd adaptive mode latching, Igor Mozolevsky, (Fri Jan 11, 3:18 am)
Re: powerd adaptive mode latching, Oliver Fromme, (Fri Jan 11, 4:15 am)
Re: powerd adaptive mode latching, Dag-Erling Smørgrav, (Fri Jan 11, 4:27 am)
Re: powerd adaptive mode latching, Igor Mozolevsky, (Fri Jan 11, 4:51 am)
Re: powerd adaptive mode latching, Stefan Lambrev, (Fri Jan 11, 5:57 am)
Re: powerd adaptive mode latching , Kevin Oberman, (Fri Jan 11, 11:13 am)
Re: powerd adaptive mode latching, Igor Mozolevsky, (Fri Jan 11, 12:19 pm)
Re: powerd adaptive mode latching, Maxim Sobolev, (Sat Jan 12, 2:27 pm)
Re: powerd adaptive mode latching , Kevin Oberman, (Sat Jan 12, 3:37 pm)
Re: powerd adaptive mode latching, Nate Lawson, (Sat Jan 12, 3:42 pm)
Re: powerd adaptive mode latching, Igor Mozolevsky, (Sat Jan 12, 4:26 pm)
Re: powerd adaptive mode latching, Nate Lawson, (Sat Jan 12, 6:03 pm)
Re: powerd adaptive mode latching, Stefan Lambrev, (Sat Jan 12, 6:13 pm)
Re: powerd adaptive mode latching, Nate Lawson, (Sat Jan 12, 6:43 pm)
Re: powerd adaptive mode latching, Nate Lawson, (Mon Jan 14, 12:44 pm)
Re: powerd adaptive mode latching, Stefan Lambrev, (Mon Jan 14, 2:51 pm)
Re: powerd adaptive mode latching, Stefan Lambrev, (Mon Jan 14, 3:46 pm)
Re: powerd adaptive mode latching, Nate Lawson, (Mon Jan 14, 5:39 pm)
Re: powerd adaptive mode latching, Stefan Lambrev, (Tue Jan 15, 12:50 am)
Re: powerd adaptive mode latching, John Baldwin, (Wed Jan 16, 8:09 am)
Re: powerd adaptive mode latching, Igor Mozolevsky, (Wed Jan 16, 8:27 am)
Re: powerd adaptive mode latching, Dag-Erling Smørgrav, (Wed Jan 16, 8:57 am)
Re: powerd adaptive mode latching, Igor Mozolevsky, (Wed Jan 16, 9:05 am)
Re: powerd adaptive mode latching, Daniel O'Connor, (Wed Jan 16, 5:45 pm)
Re: powerd adaptive mode latching, Dag-Erling Smørgrav, (Thu Jan 17, 3:15 am)
Re: powerd adaptive mode latching, Nate Lawson, (Thu Jan 17, 10:03 am)
Re: powerd adaptive mode latching, Daniel O'Connor, (Thu Jan 17, 8:37 pm)
Re: powerd adaptive mode latching, Dag-Erling Smørgrav, (Fri Jan 18, 2:36 am)
Re: powerd adaptive mode latching, Benjamin Lutz, (Sun Jan 20, 6:59 am)
Re: powerd adaptive mode latching, Stefan Lambrev, (Sun Jan 20, 8:39 am)