From owner-freebsd-bugs@FreeBSD.ORG Thu Jul 19 05:10:02 2007 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7442E16A405 for ; Thu, 19 Jul 2007 05:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 55E8C13C4A8 for ; Thu, 19 Jul 2007 05:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l6J5A2Vp026799 for ; Thu, 19 Jul 2007 05:10:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l6J5A20O026798; Thu, 19 Jul 2007 05:10:02 GMT (envelope-from gnats) Resent-Date: Thu, 19 Jul 2007 05:10:02 GMT Resent-Message-Id: <200707190510.l6J5A20O026798@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Bryan Venteicher Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 739AB16A405 for ; Thu, 19 Jul 2007 05:03:46 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (groups.freebsd.org [69.147.83.33]) by mx1.freebsd.org (Postfix) with ESMTP id 2387C13C467 for ; Thu, 19 Jul 2007 05:03:46 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l6J53jSp068147 for ; Thu, 19 Jul 2007 05:03:45 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.1/8.14.1/Submit) id l6J53jwH068146; Thu, 19 Jul 2007 05:03:45 GMT (envelope-from nobody) Message-Id: <200707190503.l6J53jwH068146@www.freebsd.org> Date: Thu, 19 Jul 2007 05:03:45 GMT From: Bryan Venteicher To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: kern/114722: [acpi] Nearly duplicate p-state entries reported X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2007 05:10:02 -0000 >Number: 114722 >Category: kern >Synopsis: [acpi] Nearly duplicate p-state entries reported >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: Thu Jul 19 05:10:01 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Bryan Venteicher >Release: 7.0-Current >Organization: >Environment: FreeBSD agonize.daemoninthecloset.org 7.0-CURRENT FreeBSD 7.0-CURRENT #1: Tue Jul 17 23:52:52 CDT 2007 bryanv@agonize.daemoninthecloset.org:/usr/obj/usr/src/sys/AGONIZE amd64 >Description: I recently purchased a Lenovo T16 laptop with a 2.0GHz Core2Duo (T7300) processor. ACPI reports nearly identical Px states: dev.est.0.freq_settings: 2001/35000 2000/35000 1600/25000 1200/16000 800/14000 cpufreq then turns the states into the following frequencies: dev.cpu.0.freq_levels: 2001/35000 2000/35000 1750/30625 1600/25000 1400/21875 1200/16000 1050/14000 900/12000 800/14000 700/12250 600/10500 500/8750 400/7000 300/5250 If powerd attempts to lower the processor frequency when it at the maximum, the change is rejected since the frequencies are so close: idle time > 90%, decreasing clock speed from 2001 MHz to 2000 MHz idle time > 90%, decreasing clock speed from 2001 MHz to 2000 MHz idle time > 90%, decreasing clock speed from 2001 MHz to 2000 MHz idle time > 90%, decreasing clock speed from 2001 MHz to 2000 MHz ^Z Suspended Manually changing the frequency to a lower value allows powerd to do its thing: agonize# sysctl dev.cpu.0.freq=1600 dev.cpu.0.freq: 2001 -> 1600 agonize# fg powerd -v idle time > 90%, decreasing clock speed from 1600 MHz to 1400 MHz idle time > 90%, decreasing clock speed from 1400 MHz to 1200 MHz idle time > 90%, decreasing clock speed from 1200 MHz to 1050 MHz idle time > 90%, decreasing clock speed from 1050 MHz to 900 MHz idle time > 90%, decreasing clock speed from 900 MHz to 800 MHz idle time > 90%, decreasing clock speed from 800 MHz to 700 MHz idle time > 90%, decreasing clock speed from 700 MHz to 600 MHz idle time > 90%, decreasing clock speed from 600 MHz to 500 MHz idle time > 90%, decreasing clock speed from 500 MHz to 400 MHz idle time > 90%, decreasing clock speed from 400 MHz to 300 MHz >How-To-Repeat: >Fix: --- acpi_perf.c.old 2007-07-18 23:49:28.659122750 -0500 +++ acpi_perf.c 2007-07-18 23:48:45.651093335 -0500 @@ -301,8 +301,8 @@ /* Check for duplicate entries */ if (count > 0 && - sc->px_states[count - 1].core_freq == - sc->px_states[count].core_freq) + CPUFREQ_CMP(sc->px_states[count - 1].core_freq, + sc->px_states[count].core_freq)) continue; count++; @@ -593,4 +593,3 @@ *type |= CPUFREQ_FLAG_INFO_ONLY; return (0); } >Release-Note: >Audit-Trail: >Unformatted: