From owner-freebsd-stable@FreeBSD.ORG Wed Sep 9 13:08:33 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AA7B106568F; Wed, 9 Sep 2009 13:08:33 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from gizmo.2hip.net (gizmo.2hip.net [64.74.207.195]) by mx1.freebsd.org (Postfix) with ESMTP id 7348E8FC0C; Wed, 9 Sep 2009 13:08:33 +0000 (UTC) Received: from [192.168.1.4] (adsl-146-128-114.bna.bellsouth.net [70.146.128.114]) (authenticated bits=0) by gizmo.2hip.net (8.14.3/8.14.3) with ESMTP id n89D8TcL051388 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 9 Sep 2009 09:08:31 -0400 (EDT) (envelope-from rnoland@FreeBSD.org) From: Robert Noland To: "Daniel O'Connor" In-Reply-To: <200909091747.19696.doconnor@gsoft.com.au> References: <1252426982.00160755.1252414203@10.7.7.3> <200909091018.10509.doconnor@gsoft.com.au> <4AA72D4D.9080505@FreeBSD.org> <200909091747.19696.doconnor@gsoft.com.au> Content-Type: text/plain Organization: FreeBSD Date: Wed, 09 Sep 2009 08:08:23 -0500 Message-Id: <1252501703.85394.3473.camel@balrog.2hip.net> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_PBL, RDNS_DYNAMIC,SPF_SOFTFAIL autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gizmo.2hip.net Cc: Alexander Motin , FreeBSD Stable Subject: Re: Detecting CPU throttling on over temperature 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: Wed, 09 Sep 2009 13:08:33 -0000 On Wed, 2009-09-09 at 17:47 +0930, Daniel O'Connor wrote: > On Wed, 9 Sep 2009, Alexander Motin wrote: > > Daniel O'Connor wrote: > > > On Wed, 9 Sep 2009, Alexander Motin wrote: > > >> Daniel O'Connor wrote: > > >>> I recently discovered a system where the floppy drive cable was > > >>> intermittently fouling the CPU fan - I believe this caused the > > >>> CPU to overheat and then get throttled by the BIOS. > > >>> > > >>> Does anyone know if it is possible to determine if this is the > > >>> case? ie is there a way to be informed if throttling has > > >>> occurred? > > >> > > >> Theoretically it is possible. I know off-topic tool reporting > > >> this. Also you can just monitor CPU temperature, depending on CPU > > >> type. > > > > > > Monitoring CPU temperature is a bit difficult, there are a lack of > > > tools (although I have some code it's not complete). > > > > There indeed problems with MB monitoring, as it is non-standard. But > > modern CPUs also include on-chip thermal sensors. For Core2Duo family > > coretemp module works fine and precisely. > > Ahh coretemp, I had forgotten about that. > > I did a test on the bench (on a 7.2 system) here and realised that I > can't actually detect throttling. coretemp reported 72 & 78C but the > frequency was still 2933MHz. > > I am pretty sure it would be throttling but I think that works by > maintaining the frequency but stalling the CPU some percentage of the > time. I have p4tcc loaded (in GENERIC) but it doesn't show up, I only > get.. Is this a core2duo? IIRC, they generally don't go into TCC until around 100C. I did pull the c2d cpu docs at one point trying to look at cpufreq. If you are bored, you can grab the docs from intel and double check. robert. > dev.cpu.0.%desc: ACPI CPU > dev.cpu.0.%driver: cpu > dev.cpu.0.%location: handle=\_PR_.CPU0 > dev.cpu.0.%pnpinfo: _HID=none _UID=0 > dev.cpu.0.%parent: acpi0 > dev.cpu.0.freq: 2933 > dev.cpu.0.freq_levels: 2933/35000 2566/30625 2199/26250 1833/21875 > 1466/17500 1099/13125 733/8750 366/4375 > dev.cpu.0.cx_supported: C1/0 C2/85 > dev.cpu.0.cx_lowest: C1 > dev.cpu.0.cx_usage: 100.00% 0.00% > dev.cpu.0.temperature: 44 > dev.cpu.1.%desc: ACPI CPU > dev.cpu.1.%driver: cpu > dev.cpu.1.%location: handle=\_PR_.CPU1 > dev.cpu.1.%pnpinfo: _HID=none _UID=0 > dev.cpu.1.%parent: acpi0 > dev.cpu.1.cx_supported: C1/0 C2/85 > dev.cpu.1.cx_lowest: C1 > dev.cpu.1.cx_usage: 100.00% 0.00% > dev.cpu.1.temperature: 36 > > I see some odd results if I disable the fan while running 'dd > if=/dev/zero bs=128k count=5000 | md5' in a loop. The throughput seems > to remain the same (odd) but the CPU idle time goes up when it gets > hot. > > > > The problem is that the CPU temperature is only a proxy > > > measurement, I would much prefer to be told directly the BIOS is > > > throttling rather than guess :) > > > > While ACPI could implement thermal throttling, AFAIK TM1/TM2 > > technologies of P4 and above families are working just in CPU > > hardware. BIOS only initializes them. > > OK. -- Robert Noland FreeBSD