From owner-freebsd-current@FreeBSD.ORG Tue Nov 6 02:55:43 2007 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 CDB1C16A46C for ; Tue, 6 Nov 2007 02:55:43 +0000 (UTC) (envelope-from ATRENS@nortel.com) Received: from zcars04e.nortel.com (zcars04e.nortel.com [47.129.242.56]) by mx1.freebsd.org (Postfix) with ESMTP id 80A6C13C4B6 for ; Tue, 6 Nov 2007 02:55:43 +0000 (UTC) (envelope-from ATRENS@nortel.com) Received: from zcarhxm2.corp.nortel.com (zcarhxm2.corp.nortel.com [47.129.230.99]) by zcars04e.nortel.com (Switch-2.2.0/Switch-2.2.0) with ESMTP id lA62XPC01193; Tue, 6 Nov 2007 02:33:25 GMT Received: from ab-thinky.atrens.ca ([47.128.181.68] RDNS failed) by zcarhxm2.corp.nortel.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 5 Nov 2007 21:36:19 -0500 Message-ID: <472FD321.3010509@nortel.com> Date: Mon, 05 Nov 2007 21:36:17 -0500 From: "Andrew Atrens" User-Agent: Thunderbird 2.0.0.6 (X11/20071028) MIME-Version: 1.0 To: Matus Harvan References: <472E9D0B.5080409@csub.edu> <20071106002940.GB1817@styx.ethz.ch> In-Reply-To: <20071106002940.GB1817@styx.ethz.ch> X-Enigmail-Version: 0.95.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 06 Nov 2007 02:36:19.0370 (UTC) FILETIME=[CFDF08A0:01C8201D] Cc: freebsd-current@freebsd.org 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: Tue, 06 Nov 2007 02:55:43 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I see the same thing with my T7500 - dev.cpu.0.freq: 300 dev.cpu.0.freq_levels: 2201/32000 2200/31000 1925/27125 1650/23250 1600/20000 1400/17500 1200/13000 1050/11375 900/9750 800/10000 700/8750 600/7500 500/6250 400/5000 300/3750 This patch to powerd works around the problem - - --- powerd.c 2007-11-05 21:33:40.000000000 -0500 +++ /usr/src/usr.sbin/powerd/powerd.c 2007-11-05 16:48:49.000000000 -0500 @@ -182,6 +182,11 @@ free(*power); return (-1); } + /* kludge to w/around too-close cpu freqs */ + if ((i > 0 && ((*freqs)[i-1]-(*freqs)[i]) < 2)) { + (*numfreqs)--; + i--; + } p = q + 1; } - --Andrew Matus Harvan wrote: > On Sun, Nov 04, 2007 at 08:33:15PM -0800, Russell Jackson wrote: >> Powerd seems to latch at the maximum - 1 cpufreq setting while in adaptive >> mode. This is 100% reproducible for me. It never un-wedges from this state >> no matter how long I wait. > [...] >> dev.cpu.0.freq_levels: 2579/-1 2578/-1 2255/-1 1933/-1 1611/-1 1289/-1 >> 966/-1 644/-1 322/-1 > [...] >> $ sysctl dev.ichss >> dev.ichss.0.%desc: SpeedStep ICH >> dev.ichss.0.%driver: ichss >> dev.ichss.0.%parent: cpu0 >> dev.ichss.0.freq_settings: 2579/-1 2578/-1 >> >> The ichss levels looked odd to me, and trying to set cpufreq=2578 is a >> NOOP. >> >> $ sysctl dev.cpu.0.freq=2578 >> dev.cpu.0.freq: 2579 -> 2579 > > I have a similar problem on a > CPU: Intel(R) Core(TM)2 Duo CPU L7500 @ 1.60GHz (1596.01-MHz 686-class CPU) > I think I am using est. > > For me the two highest frequencies seem to be 1601 and 1600: > $ sysctl dev.cpu > [...] > dev.cpu.0.freq_levels: 1601/35000 1600/35000 1400/30625 1200/16000 1050/14000 900/12000 800/14000 700/12250 600/10500 500/8750 400/7000 300/5250 > [...] > $ sysctl dev.est > dev.est.0.%desc: Enhanced SpeedStep Frequency Control > dev.est.0.%driver: est > dev.est.0.%parent: cpu0 > dev.est.0.freq_settings: 1601/35000 1600/35000 1200/16000 800/14000 > dev.est.1.%desc: Enhanced SpeedStep Frequency Control > dev.est.1.%driver: est > dev.est.1.%parent: cpu1 > dev.est.1.freq_settings: 1601/35000 1600/35000 1200/16000 800/14000 > > However, setting the frequency to 1600 results in 1601 > $ sudo sysctl dev.cpu.0.freq=1600 > dev.cpu.0.freq: 1601 -> 1601 > > which causes the same powerd behavior as you have experienced. I am > running RELENG_7 from about three weeks ago. > > Matus -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHL9Mg8It2CaCdeMwRAgJMAJ4ngu3KjXl84oq0gvL+zL2CW+EfbACfXkTk 3SczmsbCGOOBeK0cIuYa1nI= =E/cy -----END PGP SIGNATURE-----