From owner-freebsd-stable@FreeBSD.ORG Mon Aug 8 22:53:55 2005 Return-Path: X-Original-To: freebsd-stable@FreeBSD.org Delivered-To: freebsd-stable@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EDC8816A41F; Mon, 8 Aug 2005 22:53:55 +0000 (GMT) (envelope-from nate@root.org) Received: from www.cryptography.com (li-22.members.linode.com [64.5.53.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9ED9943D46; Mon, 8 Aug 2005 22:53:55 +0000 (GMT) (envelope-from nate@root.org) Received: from [10.0.5.50] (adsl-64-171-187-230.dsl.snfc21.pacbell.net [64.171.187.230]) by www.cryptography.com (8.12.8/8.12.8) with ESMTP id j78Mrqo5028030 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 8 Aug 2005 15:53:56 -0700 Message-ID: <42F7E27E.9090302@root.org> Date: Mon, 08 Aug 2005 15:53:50 -0700 From: Nate Lawson User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tijl Coosemans References: <200508020022.02992.tijl@ulyssis.org> In-Reply-To: <200508020022.02992.tijl@ulyssis.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Tue, 09 Aug 2005 15:31:00 +0000 Cc: acpi@FreeBSD.org Subject: Re: 5-STABLE cpufreq hotter than est from ports 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, 08 Aug 2005 22:53:56 -0000 Tijl Coosemans wrote: > A couple days ago I updated my system and was excited to see cpufreq > and powerd in 5-stable. Since then however I noticed that my laptop > temperature is about 5°C higher than with est and estctrl. I found that > cpufreq when setting 200MHz for example set the absolute frequency to > 1600MHz (max for this laptop) and the relative frequency (p4tcc) to > 12.5% instead of using a more power conserving setting like 800MHz/25%. > > The problem is that cpufreq_expand_set() (sys/kern/kern_cpu.c) > traverses freq levels from high to low when adding relative levels and > skips duplicates. When it wants to add 800MHz/25% it sees this setting > as a duplicate of 1600MHz/12.5% it has found before. This can be fixed > by letting cpufreq_expand_set() traverse freq levels in reverse order > (and still skipping duplicates). Then each frequency level has the > lowest possible absolute setting. This is a one line change in > sys/kern/kern_cpu.c (line 653). You have some valid issues but I need some time to analyze your patch to be sure it doesn't introduce new problems. There may be some issues with traversing the list backwards. > Also, somewhat related, the p4tcc driver doesn't recognise > acpi_throttle, which means that when you load the cpufreq module after > booting, the freq levels are messed up. I'm not sure what the best > solution for this is. Let p4tcc detect acpi_throttle and don't attach > if it's present (like acpi_throttle does now if it finds p4tcc) or > detach it before attaching? Or maybe p4tcc and acpi_throttle should be > merged into one driver? cpufreq is not set up for loading after boot currently. It must be loaded at boot. There are architectural issues that need to be solved to make this happen, namely real arbitration between drivers loaded that support the same feature through different mechanisms. p4tcc and acpi_throttle on some architectures is such a combo that needs special attention. > Finally, is the kernel config option CPU_ENABLE_TCC still relevant? > Because it's still listed in NOTES. The old option should be removed. I'll try to review this patch and commit it sometime soon. -- Nate