Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 02 Mar 2005 15:56:23 -0800
From:      "Kevin Oberman" <oberman@es.net>
To:        Nate Lawson <nate@root.org>
Cc:        current@FreeBSD.ORG
Subject:   Re: patch: p4tcc and speedstep cpufreq drivers 
Message-ID:  <20050302235623.BA3925D07@ptavv.es.net>
In-Reply-To: Your message of "Wed, 02 Mar 2005 15:28:52 PST." <42264C34.90701@root.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
> Date: Wed, 02 Mar 2005 15:28:52 -0800
> From: Nate Lawson <nate@root.org>
> 
> Kevin Oberman wrote:
> >>Date: Thu, 24 Feb 2005 13:11:14 -0800
> >>From: Nate Lawson <nate@root.org>
> >>
> >>Maxim Sobolev wrote:
> >>
> >>>Kevin Oberman wrote:
> >>>>
> >>>>I'm also concerned that taking TCC out of automatic mode might not be a
> >>>>great idea, at least until things like _PSV are supported. When I do a
> >>>>buildkernel, buildworld or any big compile job, I need to slow down the
> >>>>CPU to keep the CPU form frying. It quickly jumps to 185 F. or higher if
> >>>>I don't. If I understand automatic TCC, it should throttle the CPU all
> >>>>by itself to prevent this.
> >>>
> >>>Taking TCC out of automatic mode doesn't disable thermal controlling 
> >>>circuitry completely, so that if the processor overheats it will shut 
> >>>down the machine anyway:
> >>>
> >>>---
> >>>Regardless of enabling of the automatic
> >>>or On-Demand modes, in the event of a catastrophic cooling failure, the 
> >>>processor will
> >>>automatically shut down when the silicon has reached a temperature of 
> >>>approximately
> >>>135 °C. At this point the system bus signal THERMTRIP# will go active 
> >>>and stay active
> >>>until RESET# has been initiated. 
> >>>---
> >>
> >>Correct.  Even more so, automatic mode continues to override On-Demand 
> >>mode if there is a more moderate thermal condition than THERMTRIP#:
> >>
> >>"On-Demand mode may be used at the same time Automatic mode is enabled, 
> >>however, if the system tries to enable the TCC via On-Demand mode at the 
> >>same time automatic mode is enabled AND a high temperature condition 
> >>exists, the duty cycle of the automatic mode will override the duty 
> >>cycle selected by the On-Demand mode."
> >>
> >>Since automatic mode is set by the BIOS before we even boot, things 
> >>should be fine.
>  >
> > Thanks! With this set I am down to "only" 14 frequencies, but they are
> > now proportional to CPU speed and I still have a fully functional TCC,
> > should I need it.
> > 
> > Also, at no added charge, the system no longer locks up at low speed. I
> > can to all the way down to 150 MHz just fine! No more hangs.
> > 
> > I really think that if would be a good idea to have
> > hint.p4tcc.0.disabled set by default, especially based on sobomax's
> > recent message where the spec says that normal operation can't be
> > assured if the TCC is not in automatic mode.
> 
> I'm glad it's working for you but I don't think p4tcc should be disabled 
> by default.  sobomax's interpretation of the spec is not correct.
> 
> The text you are referring to is directed at BIOS authors.  The 
> (undocumented) Automatic flag must be set during initialization (i.e., 
> by the BIOS) or the system is not operating within specifications.
> 
> Mobile Intel Pentium 4 Processor-M Datasheet, 6.1.2
> ---
> The thermal monitor uses two modes to activate the TCC: Automatic mode 
> and On-Demand mode. Automatic mode is required for the processor to 
> operate within specifications and must first be enabled via BIOS.
> ---
> 
> Again, this text is just saying that if the BIOS never enables the 
> Automatic flag, the system is out of specification.  However, this spec 
> is a bit unclear on what happens when On-Demand mode is active and then 
> a thermal condition occurs.  It only specifies that if On-Demand mode is 
> selected while a thermal condition is already present, the requested 
> transition will not occur until the thermal condition has passed.
> 
> If you look elsewhere, the design is stated more clearly and shows the 
> reading that enabling On-Demand disables Automatic mode is incorrect.
> 
> Intel Software Developer's Manual, Volume 3, 13.15.3:
> "If on-demand clock modulation and TM1 are both enabled and the thermal 
> status of the processor is hot ..., clock modulation at the duty cycle 
> specified by TM1 takes precedence, regardless of the setting of the 
> on-demand clock modulation duty cycle."
> 
> Empirical testing shows TM1 kicks in around 75C and THERMTRIP is 
> somewhere near 100C.  The separate THERMTRIP feature disables the 
> processor completely if TM1 or 2 fail to stop the temperature from rising.
> 
> http://www.digit-life.com/articles2/p4-throttling/

OK. This makes me feel a bit better, but I still think I'll leave TCC
out of the equation as it makes the various frequency steps vary uneven
to the point that lowering dev.cpu.0.freq would increase performance
(and the reverse, as well) and it causes my system to hang when
throttled back too far. It never hangs with TCC disabled although my
lowest "frequency" is now just 150 MHz.

By the way, I am still delighted in the cpufreq addition to the system.
It gives me excellent control of CPU speed to stretch my battery life.
All I really need is a desktop tool (maybe a gnome applet) to let me
adjust freq easily. I may just try to write that myself if I get some
time before someone else gets to it.
-- 
R. Kevin Oberman, Network Engineer
Energy Sciences Network (ESnet)
Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
E-mail: oberman@es.net			Phone: +1 510 486-8634



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050302235623.BA3925D07>