From owner-freebsd-mobile@FreeBSD.ORG Mon Jan 2 15:57:29 2012 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57FF4106564A for ; Mon, 2 Jan 2012 15:57:29 +0000 (UTC) (envelope-from tino.engel@porno-muenchen.de) Received: from ms16-1.1blu.de (ms16-1.1blu.de [89.202.0.34]) by mx1.freebsd.org (Postfix) with ESMTP id 1CD8F8FC0C for ; Mon, 2 Jan 2012 15:57:29 +0000 (UTC) Received: from [93.104.84.120] (helo=localhost.localnet) by ms16-1.1blu.de with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1RhjDW-0003is-UQ for freebsd-mobile@freebsd.org; Mon, 02 Jan 2012 15:50:27 +0100 From: Tino Engel Organization: Porno =?iso-8859-1?q?M=FCnchen?= To: freebsd-mobile@freebsd.org Date: Mon, 2 Jan 2012 15:48:46 +0100 User-Agent: KMail/1.13.7 (FreeBSD/9.0-RC3; KDE/4.7.3; amd64; ; ) References: <201201020313.q023DdG2051231@fire.js.berklix.net> In-Reply-To: <201201020313.q023DdG2051231@fire.js.berklix.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201201021548.46620.tino.engel@porno-muenchen.de> X-Con-Id: 150583 X-Originating-IP: 93.104.84.120 Subject: Re: powerd to use sysctl to import temps to drop freq to avoid heat crash X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2012 15:57:29 -0000 On Montag, 2. Januar 2012 04:13:38 Julian H. Stacey wrote: > Hi mobile@freebsd.org, CC a few others. > > I propose to hack src/usr.sbin/powerd/powerd.c > To import temperatures via sysctl, & if too high, to forcibly > reduce CPU frequency, even if CPU load is high, > because my new HP Pavillion notebook keeps over heating & crashing. > > dmesg & sysctl etc diagnostics at > http://berklix.com/~jhs/hardware/hp/pavilion/dm3-1155ea/ > CPU: AMD Athlon(tm) Neo X2 Dual Core Processor L335 (1595.96-MHz K8-class > CPU) Origin = "AuthenticAMD" Id = 0x60fb2 Family = f Model = 6b > Stepping = 2 > > Is this re-inventing the wheel ? > Anyone else out there working on or know of similar code ? > > mgdiff 8.2-RELEASE/src/usr.sbin/powerd/powerd.c \ > /pub/FreeBSD/branches/-current/src/usr.sbin/powerd/powerd.c > does not show a lot of difference. > > >From > > http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/powerd/powerd.c > I added a few people to CC particularly mav@ has an interesting comment > Wed Jun 16 15:09:45 2010 UTC ( > Freq sysctls are quite heavy due to set of malloc()/free() > calls. Avoid reading current frequency on every period. > Instead do it only after changing and periodically from > time to time if somebody else change it. > > Also dynamically decrease sampling frequency up to 4 times > on inactivity, > > Gary J: there's a comment at Fri Jan 9 22:10:07 2009 re. more then 2 > CPUs > > I added Clive who may have some URL to CPU temps. > > To > /boot/loader.conf > I just added > acpi_hp_load="YES" > (after reboot) does not produce /dev/hpcmi > > Running 80% idle (just a fsck_ufs) I see: > hw.acpi.thermal.tz0.temperature: 67.0C > dev.acpi_hp.0.hdd_temperature: 4 > > Cheers, > Julian Gr33z Julian, I have put my laptop on a poer-set-box, so the ventilators are lying free. That also help sometimes. Regards, Tino