This is against 2.6.31, but it should still patch, tell me if not. Should this also go to stable@xxxxxxxxxx? Thanks, Thomas --------- This (introduced by Ingo some time ago): if (!(was_throttled ^ is_throttled) && time_before64(tmp_jiffs, __get_cpu_var(next_check))) does not help much. The interrupts happening and the read out MSR seem to tell that the CPU gets throttled and unthrottled all the time. Thus current implementation results in hundreds (thousands?) of "above threshold" messages per minute. This patch is more or less a revert back to the implementation in older kernels. The message: printk(KERN_INFO "CPU%d: Temperature/speed normal\n", cpu); is not needed as it is suppressed anyway. Reference of an affected Core 2 and a Celeron machine: http://bugzilla.novell.com/show_bug.cgi?id=533556 Signed-off-by: Thomas Renninger <trenn@xxxxxxx> --- arch/x86/kernel/cpu/mcheck/therm_throt.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) Index: linux-2.6.31-openSUSE-11.2/arch/x86/kernel/cpu/mcheck/therm_throt.c =================================================================== --- linux-2.6.31-openSUSE-11.2.orig/arch/x86/kernel/cpu/mcheck/therm_throt.c +++ linux-2.6.31-openSUSE-11.2/arch/x86/kernel/cpu/mcheck/therm_throt.c @@ -36,7 +36,6 @@ static DEFINE_PER_CPU(__u64, next_check) = INITIAL_JIFFIES; static DEFINE_PER_CPU(unsigned long, thermal_throttle_count); -static DEFINE_PER_CPU(bool, thermal_throttle_active); static atomic_t therm_throt_en = ATOMIC_INIT(0); @@ -97,31 +96,24 @@ static int therm_throt_process(int curr) { unsigned int cpu = smp_processor_id(); __u64 tmp_jiffs = get_jiffies_64(); - bool was_throttled = __get_cpu_var(thermal_throttle_active); - bool is_throttled = __get_cpu_var(thermal_throttle_active) = curr; - if (is_throttled) + if (curr) __get_cpu_var(thermal_throttle_count)++; - if (!(was_throttled ^ is_throttled) && - time_before64(tmp_jiffs, __get_cpu_var(next_check))) + if (time_before64(tmp_jiffs, __get_cpu_var(next_check))) return 0; __get_cpu_var(next_check) = tmp_jiffs + CHECK_INTERVAL; /* if we just entered the thermal event */ - if (is_throttled) { + if (curr) { printk(KERN_CRIT "CPU%d: Temperature above threshold, " - "cpu clock throttled (total events = %lu)\n", + "cpu clock temporarily throttled (total events = %lu)\n", cpu, __get_cpu_var(thermal_throttle_count)); add_taint(TAINT_MACHINE_CHECK); return 1; } - if (was_throttled) { - printk(KERN_INFO "CPU%d: Temperature/speed normal\n", cpu); - return 1; - } return 0; } -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html