Re: Changing temperature trip points

Dominik Brodowski
2002-11-03T22:26:21Z

On Sun, Nov 03, 2002 at 11:15:32PM +0100, Pavel Machek wrote:
> Hi!
>
> > > PS: Polling rate has strong effect on how passive works. If you set
> > > it too fast it will basically only use "max performance" and "max
> > > throttle", which is not what you want.
> > No, it doesn't: the _trend_ is deciding, and not the fact that the temp is
> > above the limit. additionally, polling is used automatically when passive
> > cooling a.k.a. "throttle || performance" is used. Patch will follow soon.
>
> AFAICR, its something like a * temperature + b * trend.
>
> Assume your polling frequency is 1msec, and passive limit 50C.
>
> t: Temp is 50C, machine is cool at P0:T0.
> t+1 msec: Temp is 51C. Trend is +, temperature is over, machine goes P0:T1.
> t+2 msec: Temp is still 51C (1 msec is too little time for temp to
> change), trend is no change, but temperature is still over, machine
> goes P0:T2.
> t+3 msec: Temp is still 51C (2 msec is too little time for temp to
> change), trend is no change, but temperature is still over, machine
> goes P0:T3.
> at t+7 msec machine reaches P0:T7.
> at t+1000msec cpu cools down, and you reach P0:T0 in 7 msec.
>
> Not good.

No, that's wrong:

1.) If passive cooling is active, _TSP is used _in all cases_
as polling frequency (_TSP is an integer given in 1/10th seconds) - see
acpi_thremal_check:
*
if (tz->state.passive)
sleep_time = tz->trips.passive.tsp * 100;
else if (tz->polling_frequency > 0)
sleep_time = tz->polling_frequency * 100;
*
2.) This means that in acpi_thermal_passive:
trend = (passive->tc1 * (tz->temperature -
tz->last_temperature)) + (passive->tc2 * (tz->temperature -
passive->temperature));
is only calculated each _TSP frequency. And only when this trend is
positive, throttling or perf. state is increased.
*
if (trend > 0)
for (i=0; i<passive->devices.count; i++)
acpi_processor_set_thermal_limit(
passive->devices.handles[i],
ACPI_PROCESSOR_LIMIT_INCREMENT);
*

Dominik