Re: [PATCH][2.6] throttle P4 thermal warnings

From: Pavel Machek
Date: Fri May 07 2004 - 09:31:41 EST


Hi!

> In really bad conditions this can keep printing for a while, throttle the
> output somewhat. Also change the "CPU%d" formatting to better match the
> other boot output.

Hmm, is it possible that you see "temperature above treshold", but
then you throttle it so you never see "temperature normal" message?

That would be pretty bad...

Also please consider putting Temperature above threshold and running
in modulated clock mode on single line.
Pavel


>
> - rdmsr (MSR_IA32_THERM_STATUS, l, h);
> - if (l & 1) {
> - printk(KERN_EMERG "CPU#%d: Temperature above threshold\n", cpu);
> - printk(KERN_EMERG "CPU#%d: Running in modulated clock mode\n", cpu);
> + if (time_after(next[cpu], jiffies))
> + return;
> +
> + next[cpu] = jiffies + HZ*5;
> + rdmsr(MSR_IA32_THERM_STATUS, l, h);
> + if (l & 0x1) {
> + printk(KERN_EMERG "CPU%d: Temperature above threshold\n", cpu);
> + printk(KERN_EMERG "CPU%d: Running in modulated clock mode\n", cpu);
> } else {
> - printk(KERN_INFO "CPU#%d: Temperature/speed normal\n", cpu);
> + printk(KERN_INFO "CPU%d: Temperature/speed normal\n", cpu);
> }
> }
>
--
When do you have heart between your knees?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/