From owner-freebsd-stable@FreeBSD.ORG Mon Jun 9 05:30:35 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2E841065670; Mon, 9 Jun 2008 05:30:35 +0000 (UTC) (envelope-from jdc@parodius.com) Received: from mx01.sc1.parodius.com (mx01.sc1.parodius.com [72.20.106.3]) by mx1.freebsd.org (Postfix) with ESMTP id 9CE1D8FC0C; Mon, 9 Jun 2008 05:30:35 +0000 (UTC) (envelope-from jdc@parodius.com) Received: by mx01.sc1.parodius.com (Postfix, from userid 1000) id 624F91CC031; Sun, 8 Jun 2008 22:30:35 -0700 (PDT) Date: Sun, 8 Jun 2008 22:30:35 -0700 From: Jeremy Chadwick To: Kevin Oberman Message-ID: <20080609053035.GA6859@eos.sc1.parodius.com> References: <20080607164812.GA11072@eos.sc1.parodius.com> <20080609051343.CFD4D45010@ptavv.es.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080609051343.CFD4D45010@ptavv.es.net> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: Evren Yurtesen , freebsd-stable@freebsd.org, John Baldwin , Andrew Snow Subject: Re: cpufreq broken on core2duo X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2008 05:30:35 -0000 On Sun, Jun 08, 2008 at 10:13:43PM -0700, Kevin Oberman wrote: > > Date: Sat, 7 Jun 2008 09:48:12 -0700 > > From: Jeremy Chadwick > > Sender: owner-freebsd-stable@freebsd.org > > > > On Sat, Jun 07, 2008 at 05:51:38PM +0300, Evren Yurtesen wrote: > > > By the way, there is another thing I am wondering about. If I enable HTT > > > and Intel Enhanced SpeedStep in bios on a 3.00GHZ p4 CPU I see: > > > > > > cpu0: on acpi0 > > > acpi_perf0: on cpu0 > > > p4tcc0: on cpu0 > > > cpu1: on acpi0 > > > est1: on cpu1 > > > est: CPU supports Enhanced Speedstep, but is not recognized. > > > est: cpu_vendor GenuineIntel, msr f2700000f27 > > > device_attach: est1 attach returned 6 > > > p4tcc1: on cpu1 > > > > > > dev.cpu.0.freq_levels: 1500/27000 1312/23625 1200/13000 1050/11375 900/9750 > > > 750/8125 600/6500 450/4875 300/3250 150/1625 > > > dev.acpi_perf.0.freq_settings: 1500/27000 1200/13000 > > > dev.cpufreq.0.%driver: cpufreq > > > dev.cpufreq.0.%parent: cpu0 > > > dev.cpufreq.1.%driver: cpufreq > > > dev.cpufreq.1.%parent: cpu1 > > > dev.p4tcc.0.freq_settings: 10000/-1 8750/-1 7500/-1 6250/-1 5000/-1 3750/-1 > > > 2500/-1 1250/-1 > > > dev.p4tcc.1.freq_settings: 10000/-1 8750/-1 7500/-1 6250/-1 5000/-1 3750/-1 > > > 2500/-1 1250/-1 > > > > > > and it does not allow me to set the freq. of the cpu. > > > > How are you setting the frequency? Are you using powerd? You do not > > have to enable SpeedStep in your BIOS to achieve throttling CPU clock > > speed. In fact, I would highly recommend leaving EIST/SpeedStep in the > > BIOS *disabled*, and let powerd adjust the clock frequency via ACPI. > > I must strongly recommend against this. EST is MUCH more efficient on > its control of power use than simple throttling. So much so that on my > systems that support EST, I remove cpufreq from the kernel. (In all > cases, throttling means either simple throttling or throttling by using > TCC.) The reality of the situation is that users cannot use EIST reliably on FreeBSD. I cannot imagine removing cpufreq would solve the "runtime went backwards" issue. The EIST problem needs to be fixed. If the folks who work on it do not have present-day hardware (C2Ds, etc.), I will be more than happy to purchase them whatever they need. > I did quite a bit of testing on power management a year or so ago and > found that throttling was of value only for controlling CPU temperature. > For real power management, EST works far better as it adjust frequency > (actual clock rate) and CPU voltage while throttling just stops and > starts the clock without changing its actual frequency. (This came as a > surprise to me about 5 years ago when I first discovered it.) As far as I know, the ACPI frequency toggling does in fact adjust the CPU clock rate -- because the values in dev.cpu.0.freq_levels are defined by the ACPI configuration on the machine. I'd confirm this, but looking at the kernel code doesn't help -- I cannot find the definition of the CPUFREQ_LEVELS function or macro. > At idle, throttling does exactly nothing. EST reduces voltage on the > CPU and saves power even when idle. At full CPU load, throttling reduces > performance and power consumption equally. EST beats it by a slim > margin. I thought the power-saving modes of the CPU (C1E/C2E/C3E/C4E) could be used *without* enabling EIST. I don't think FreeBSD has kernel or userland support utilities to enable/disable CPU-level features. Something like RMClock for Windows would be quite useful. (If you have the opportunity to run it, do so; you'll see what I mean, re: all the features being toggleable individually). > The big win is at moderate load. Throttling can result is very poor > results for aps like video and music which will place a continuous load > on the system, but only 20-60% (in the case of my test system). It > tended to make the system seem sluggish. EST does a much better job in > this case as it lowers CP voltage and clock rate to maximize performance > while minimizing power. > > If your only concern is keeping the system cool, throttling will do the > job, but if you want efficient power utilization, use EST if possible. In the case est does not attach (e.g. no EIST support enabled in FreeBSD), the throttling method resorts to simply suspending the system, then yes I completely agree -- EIST is significantly better than that. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |