From owner-freebsd-ppc@FreeBSD.ORG Fri Jan 16 07:11:35 2015 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3033AE1 for ; Fri, 16 Jan 2015 07:11:35 +0000 (UTC) Received: from mail-ob0-x231.google.com (mail-ob0-x231.google.com [IPv6:2607:f8b0:4003:c01::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8CF8B336 for ; Fri, 16 Jan 2015 07:11:35 +0000 (UTC) Received: by mail-ob0-f177.google.com with SMTP id uy5so17103546obc.8 for ; Thu, 15 Jan 2015 23:11:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type; bh=fiOvTAa08tSG82VVD9pR+gq6pBjIzmxH/v2B09WCYzI=; b=B1w5naVzYEUn5dxBNcVSvu/K4ZkCCT3rTln1sCnPXuMEYx+iR4RIyrSDfH1UG7kAYQ BdYTbH2NRO2/Xk/XGmxWgyS+l8RjdiG0ukrR8MTOOLBEgAPvKXG8t0zbUlEarpXIwYpP 5uYl9mxRAQ/Y8JLLCaVfVsZzn/KieTiUeiT0XnWjP5bFV0CszzirU4bDw8QL/MeNWstd spLomRf0BIM2tYavoSx/8HfksEFqL03gu1yR9u5iPsD4KLQ9ln78qyzlhv1eeKweKAd5 e8xfNm3A11VPlpFzRLZ1OQ/2N+fhFjT1E1uApAbz5fHQ76BiSJJJlNhP4FlgoBJ2Px6b eV2A== X-Received: by 10.202.213.144 with SMTP id m138mr7904640oig.87.1421392294864; Thu, 15 Jan 2015 23:11:34 -0800 (PST) Received: from zhabar.attlocal.net (107-222-186-3.lightspeed.sntcca.sbcglobal.net. [107.222.186.3]) by mx.google.com with ESMTPSA id ck6sm1221499oeb.0.2015.01.15.23.11.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Jan 2015 23:11:34 -0800 (PST) Date: Thu, 15 Jan 2015 23:11:29 -0800 From: Justin Hibbits To: Mark Millard Subject: Re: PowerMac G5 quad-core, CPU A1 DIODE TEMP: 90.8 C (for example): How to handle? [more data] Message-ID: <20150115231129.1b28c8d0@zhabar.attlocal.net> In-Reply-To: <15A6D627-9DC7-48AF-B133-94980AFCE46A@dsl-only.net> References: <42CF1E40-5BD5-4B00-86E9-C62AEB9B8B93@dsl-only.net> <15A6D627-9DC7-48AF-B133-94980AFCE46A@dsl-only.net> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; powerpc64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/0TFZNBK/e+.jhnGKvTzDJe7" Cc: FreeBSD PowerPC ML X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 07:11:35 -0000 --MP_/0TFZNBK/e+.jhnGKvTzDJe7 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline On Thu, 15 Jan 2015 14:33:22 -0800 Mark Millard wrote: > For a well-operating PowerMac G5 quad-core for recording over 30 > minutes, sampling about once a second, starting idle and doing "make > -j 8 buildworld buildkernel": > > Low value to high value (for type of value to get idea of range > expected)... > > dev.smusat.0.cpu_a0_diode_temp: 38.8C to > dev.smusat.1.cpu_b1_diode_temp: 68.7C > > dev.smu.0.fans.cpu_a_intake.rpm: 484 to > dev.smu.0.fans.cpu_a_intake.rpm: 1549 > > dev.smu.0.fans.cpu_a_pump.rpm: 1235 to dev.smu.0.fans.cpu_a_pump.rpm: > 2214 > > > I put the problem PowerMac G5 quad-core in a about 56degF room in > order to try to have it run longer so I could collect more > information. This seems to have been enough to keep it somewhat below > 90degC generally for the CPU diodes over the initial 30 minutes of > "make -j 8 buildworld buildkernel". > > Low value to high value (for type of value to get idea of range > happening, limited to the first 30 minutes or so)... > > dev.smusat.0.cpu_a0_diode_temp: 38.2C to > dev.smusat.0.cpu_a1_diode_temp: 90.2C (Just one 90.2C at that point > and one dev.smusat.0.cpu_a1_diode_temp: 90.1C but a bunch of > 89.[5-9]C's.) > > dev.smu.0.fans.cpu_a_intake.rpm: 485 to > dev.smu.0.fans.cpu_a_intake.rpm: 3184 > > dev.smu.0.fans.cpu_a_pump.rpm: 1254 to dev.smu.0.fans.cpu_a_pump.rpm: > 3636 > > Letting it run longer, however, has lead to more 90.[0-9]C's and > messages like (all but the 1st two are from after the 30 minutes): > > WARNING: Current temperature (CPU A1 DIODE TEMP: 90.2 C) exceeds > critical temperature (90.0 C); count=1 WARNING: Current temperature > (CPU A1 DIODE TEMP: 90.1 C) exceeds critical temperature (90.0 C); > count=1 WARNING: Current temperature (CPU A1 DIODE TEMP: 90.1 C) > exceeds critical temperature (90.0 C); count=1 WARNING: Current > temperature (CPU A1 DIODE TEMP: 90.2 C) exceeds critical temperature > (90.0 C); count=2 WARNING: Current temperature (CPU A1 DIODE TEMP: > 90.4 C) exceeds critical temperature (90.0 C); count=3 WARNING: > Current temperature (CPU A1 DIODE TEMP: 90.6 C) exceeds critical > temperature (90.0 C); count=4 WARNING: Current temperature (CPU A1 > DIODE TEMP: 90.4 C) exceeds critical temperature (90.0 C); count=1 > WARNING: Current temperature (CPU A1 DIODE TEMP: 90.4 C) exceeds > critical temperature (90.0 C); count=2 WARNING: Current temperature > (CPU A1 DIODE TEMP: 90.1 C) exceeds critical temperature (90.0 C); > count=3 WARNING: Current temperature (CPU A1 DIODE TEMP: 90.1 C) > exceeds critical temperature (90.0 C); count=2 WARNING: Current > temperature (CPU A1 DIODE TEMP: 90.1 C) exceeds critical temperature > (90.0 C); count=3 WARNING: Current temperature (CPU A1 DIODE TEMP: > 90.1 C) exceeds critical temperature (90.0 C); count=1 WARNING: > Current temperature (CPU A1 DIODE TEMP: 90.1 C) exceeds critical > temperature (90.0 C); count=1 WARNING: Current temperature (CPU A1 > DIODE TEMP: 90.6 C) exceeds critical temperature (90.0 C); count=2 > > It did automatically shut down after about 50 min. The other 3 CPU > diodes were in the range 68C to 74C or so. A1 just seems to register > hotter. It ended with the recorded sequence for a1: > > dev.smusat.0.cpu_a1_diode_temp: 89.2C > dev.smusat.0.cpu_a1_diode_temp: 90.6C > dev.smusat.0.cpu_a1_diode_temp: 90.6C > dev.smusat.0.cpu_a1_diode_temp: 90.1C > dev.smusat.0.cpu_a1_diode_temp: 89.9C > dev.smusat.0.cpu_a1_diode_temp: 90.1C > dev.smusat.0.cpu_a1_diode_temp: 90.9C > dev.smusat.0.cpu_a1_diode_temp: 91.3C > dev.smusat.0.cpu_a1_diode_temp: 91.1C > dev.smusat.0.cpu_a1_diode_temp: 91.4C > dev.smusat.0.cpu_a1_diode_temp: 91.8C > dev.smusat.0.cpu_a1_diode_temp: 92.0C > > > The high fan/pump figures recorded were: > > dev.smu.0.fans.cpu_b_intake.rpm: 3199 > dev.smu.0.fans.cpu_a_intake.rpm: 3200 > dev.smu.0.fans.cpu_b_exhaust.rpm: 3198 > dev.smu.0.fans.cpu_a_exhaust.rpm: 3199 > dev.smu.0.fans.cpu_a_pump.rpm: 3637 > > These are all well above those recorded for the well-operating > PowerMac G5 quad-core. > > === > Mark Millard > markmi at dsl-only.net Could you try the attached patch? (Untested here, my quad isn't up). It scales more exponentially, hitting full blast around the thermal midpoint. This can obviously be adjusted up or down, but should be a good starting point. We should probably also have a backoff algorithm, to keep the fans going longer after it cools, like OS X does. - Justin --MP_/0TFZNBK/e+.jhnGKvTzDJe7 Content-Type: text/x-patch Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=pmac_therm.diff Index: sys/powerpc/powermac/powermac_thermal.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/powerpc/powermac/powermac_thermal.c (revision 277043) +++ sys/powerpc/powermac/powermac_thermal.c (working copy) @@ -137,10 +137,11 @@ nsens =3D nsens_zone =3D 0; average_excess =3D max_excess_zone =3D 0; SLIST_FOREACH(sensor, &sensors, entries) { - frac_excess =3D (sensor->last_val - + temp =3D imin(sensor->last_val, sensor->sensor->max_temp); + frac_excess =3D (temp - sensor->sensor->target_temp)*100 / (sensor->sensor->max_temp - - sensor->sensor->target_temp); + temp + 1); if (frac_excess < 0) frac_excess =3D 0; if (sensor->sensor->zone =3D=3D fan->fan->zone) { @@ -166,6 +167,7 @@ * Scale the fan linearly in the max temperature in its * thermal zone. */ + max_excess_zone =3D imin(max_excess_zone, 100); fan->fan->set(fan->fan, max_excess_zone * (fan->fan->max_rpm - fan->fan->min_rpm)/100 + fan->fan->min_rpm); --MP_/0TFZNBK/e+.jhnGKvTzDJe7--