From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 31 01:21:36 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 6753416A41F; Tue, 31 Jul 2007 01:21:36 +0000 (UTC) (envelope-from ume@mahoroba.org) Received: from ameno.mahoroba.org (ent.mahoroba.org [IPv6:2001:2f0:104:8010::1]) by mx1.freebsd.org (Postfix) with ESMTP id 2AC3D13C494; Tue, 31 Jul 2007 01:21:36 +0000 (UTC) (envelope-from ume@mahoroba.org) Received: from localhost (IDENT:Rj5/VaKa3xTe9rXavv+HMHAffYHAeeMNXv6uO7M5nKRLb1DCakDgE5mTh6GZlmWd@localhost [IPv6:::1]) (user=ume mech=CRAM-MD5 bits=0) by ameno.mahoroba.org (8.13.8/8.13.8) with ESMTP/inet6 id l6V1LOKj077311 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 31 Jul 2007 10:21:28 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Tue, 31 Jul 2007 10:21:24 +0900 Message-ID: From: Hajimu UMEMOTO To: Pietro Cerutti In-Reply-To: <46AE58B5.3080506@gahr.ch> References: <46AA0491.5000203@gahr.ch> <46ADAF5B.6050602@gahr.ch> <20070730180355.GA7355@rot26.obsecurity.org> <46AE58B5.3080506@gahr.ch> User-Agent: xcite1.57> Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.7 Emacs/22.1 (i386-pc-freebsd) MULE/5.0 (SAKAKI) X-Operating-System: FreeBSD 6.2-RELEASE-p4 X-PGP-Key: http://www.imasy.or.jp/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE Organization: Internet Mutual Aid Society, YOKOHAMA MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (ameno.mahoroba.org [IPv6:::1]); Tue, 31 Jul 2007 10:21:28 +0900 (JST) X-Virus-Scanned: by amavisd-new X-Virus-Status: Clean X-Spam-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_00, DKIM_POLICY_SIGNSOME,DK_POLICY_SIGNSOME,HELO_LOCALHOST autolearn=no version=3.2.1 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on ameno.mahoroba.org Cc: acpi@freebsd.org, freebsd-hackers@freebsd.org 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: Tue, 31 Jul 2007 01:21:36 -0000 Hi, >>>>> On Mon, 30 Jul 2007 23:31:33 +0200 >>>>> Pietro Cerutti said: gahr> I can't test it, since I can't use passive cooling, but how do not these gahr> two systems interfere with each other wrt setting the CPU frequency? gahr> What if, for example, my CPU temperature rises above _PSV but the CPU gahr> usage drops below 65%? Do you mean that your hw.acpi.thermal.tz0._PSV has reasonable value? If so, perhaps, your ACPI BIOS is broken, and _TC1, _TC2 and _TSP are not defined correctly. Please show me the output of `sysctl hw.acpi' and `acpidump -dt'. gahr> In this case, the CPU frequency should be increased according to gahr> powerd's algorithm and should be decreased according to passive gahr> cooling's algorithm. gahr> Wouldn't it be better to have one subsystem deal with both usage and gahr> temperature in order to decide which is the best next frequency to be set? No, we have a priority to control a cpufreq in our kernel, to deal with conflict between kernel and userland. Controlling cpufreq within our kernel is considered as high proirity. So, during our kernel is controlling a cpufreq, we cannot change cpufreq from userland. And, our kernel releasing the control, a cpufreq is back to the value before our kernel changed it. gahr> My patch is really just a first draft that I wrote in order to have gahr> feedbacks on the general idea to implement a temperature controlling gahr> system inside powerd, and doesn't implement hysteresis as you noted, and gahr> your feedback is that it's not a good idea, which I respect. It is rather backward, IMHO. I did implement a passive cooling feature as an enhancement of powerd(8) like you did, during initial phases. Then, I implemented it in our kernel as a result. Sincerely, -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/