From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 30 18:03:56 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0513216A419; Mon, 30 Jul 2007 18:03:56 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id E8AFC13C459; Mon, 30 Jul 2007 18:03:55 +0000 (UTC) (envelope-from kris@obsecurity.org) Received: from rot26.obsecurity.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 435E61A4D81; Mon, 30 Jul 2007 11:03:37 -0700 (PDT) Received: by rot26.obsecurity.org (Postfix, from userid 1001) id 3A8F1BA21; Mon, 30 Jul 2007 14:03:55 -0400 (EDT) Date: Mon, 30 Jul 2007 14:03:55 -0400 From: Kris Kennaway To: Pietro Cerutti Message-ID: <20070730180355.GA7355@rot26.obsecurity.org> References: <46AA0491.5000203@gahr.ch> <46ADAF5B.6050602@gahr.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46ADAF5B.6050602@gahr.ch> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org, Hajimu UMEMOTO Subject: Re: [patch] enhance powerd(8) to handle max temperature X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2007 18:03:56 -0000 On Mon, Jul 30, 2007 at 11:28:59AM +0200, Pietro Cerutti wrote: > Hajimu UMEMOTO wrote: > > Hi, > > > >>>>>> On Fri, 27 Jul 2007 16:43:29 +0200 > >>>>>> Pietro Cerutti said: > > > > gahr> Hi list, > > gahr> here is a patch to allow powerd(8) accept a "-t tval" option to set a > > gahr> temperature limit above which performance should be decreased. > > gahr> It's a first draft, and I identified the following problems: > > > > gahr> - the CPU temperature takes some time to decrease, so powerd keeps > > gahr> decreasing the CPU frequency until the temperature is below the limit. > > gahr> The effect is a "increase to maximum, decrease to minimum, increase to > > gahr> maximum, decrease to minimum, ...." which may not be desirable. > > > > gahr> - the temperature is retrieved by the hw.acpi.thermal.tz0.temperature > > gahr> sysctl MIB. Support for other methods would be desirable. > > > > gahr> The patches to powerd.c and powerd.8 are here: > > gahr> http://www.gahr.ch/FreeBSD/patches/powerd.c.diff > > gahr> http://www.gahr.ch/FreeBSD/patches/powerd.8.diff > > > > gahr> Any comment is welcome! > > > > We have a passive cooling mechanism already in our kernel. It runs > > according to an ACPI specification. > > You are right, but the passive colling mechanism could not be available > on some systems where thermal is available, and I'm still waiting for > answers about acpi_thermal not sending notifies. > See my previous post: > http://lists.freebsd.org/pipermail/freebsd-hackers/2007-July/021361.html > > What's wrong with including this feature directly in powerd? In general duplication is undesirable. You should focus on trying to solve the problems with using the ACPI method. For example, the acpi passive cooling probably uses a better algorithm than your patches, e.g. including appropriate hysteresis. Kris