From owner-freebsd-current@FreeBSD.ORG Mon Jan 7 15:53:06 2008 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C22216A421; Mon, 7 Jan 2008 15:53:06 +0000 (UTC) (envelope-from ATRENS@nortel.com) Received: from zrtps0kn.nortel.com (zrtps0kn.nortel.com [47.140.192.55]) by mx1.freebsd.org (Postfix) with ESMTP id 1E08C13C4F9; Mon, 7 Jan 2008 15:53:05 +0000 (UTC) (envelope-from ATRENS@nortel.com) Received: from zcarhxm2.corp.nortel.com (zcarhxm2.corp.nortel.com [47.129.230.99]) by zrtps0kn.nortel.com (Switch-2.2.6/Switch-2.2.0) with ESMTP id m07FXvv04325; Mon, 7 Jan 2008 15:33:57 GMT Received: from ab-thinky.atrens.ca ([47.128.181.148] RDNS failed) by zcarhxm2.corp.nortel.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 7 Jan 2008 10:33:50 -0500 Message-ID: <47824627.40701@nortel.com> Date: Mon, 07 Jan 2008 10:32:55 -0500 From: "Andrew Atrens" User-Agent: Thunderbird 2.0.0.6 (X11/20071028) MIME-Version: 1.0 To: Stefan Lambrev References: <472E9D0B.5080409@csub.edu> <20071106002940.GB1817@styx.ethz.ch> <472FD321.3010509@nortel.com> <20071108132222.GC1674@dose.local.invalid> <47334C71.1010102@nortel.com> <20071108224313.GA1927@dose.local.invalid> <47821585.10804@moneybookers.com> In-Reply-To: <47821585.10804@moneybookers.com> X-Enigmail-Version: 0.95.4 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 07 Jan 2008 15:33:50.0824 (UTC) FILETIME=[B3EA7E80:01C85142] Cc: Benjamin Lutz , freebsd-current@FreeBSD.org, Simon Barner , Matus Harvan Subject: Re: powerd adaptive mode latching X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2008 15:53:06 -0000 -----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-----