[PATCH] x86, mce: therm_throt: don't log redundant normality

From: Hugh Dickins
Date: Sun Aug 16 2009 - 10:55:12 EST


Hi Dmitry,

I'm delighted to find your 0d01f31439c1e4d602bf9fdc924ab66f407f5e38
"x86, mce: therm_throt - change when we print messages" in rc6:
thank you.

I too had been annoyed by "critical" CPU1 Temperature/speed normal
messages, with no indication that anything had been abnormal: after
resume on a Fujitsu-Siemens Esprimo Mobile (whereas startup decided
the Duo's CPU0 Thermal monitoring would be handled by SMI not by MCE).

I hadn't reported it yet, because I couldn't quite work out what to do
about it: your patch looks good, so long as someone else doesn't have
a machine which jumps between throttled and unthrottled too quickly.

But could we add one more thing on top of your patch? Though it no
longer keeps announcing "I am normal", can we please also get rid
of the accompanying "Machine check events logged" message too?
If the non-event isn't worth showing (I agree that it isn't),
then I think it's not worth logging either.

Hugh


[PATCH] x86, mce: therm_throt - don't log redundant normality

0d01f31439c1e4d602bf9fdc924ab66f407f5e38 "x86, mce: therm_throt -
change when we print messages" removed redundant announcements of
"Temperature/speed normal". They're not worth logging either:
remove their accompanying "Machine check events logged" messages.

Signed-off-by: Hugh Dickins <hugh.dickins@xxxxxxxxxxxxx>
---

arch/x86/kernel/cpu/mcheck/therm_throt.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

--- 2.6.31-rc6/arch/x86/kernel/cpu/mcheck/therm_throt.c 2009-08-14 09:34:06.000000000 +0100
+++ linux/arch/x86/kernel/cpu/mcheck/therm_throt.c 2009-08-14 13:22:07.000000000 +0100
@@ -116,11 +116,14 @@ static int therm_throt_process(int curr)
cpu, __get_cpu_var(thermal_throttle_count));

add_taint(TAINT_MACHINE_CHECK);
- } else if (was_throttled) {
+ return 1;
+ }
+ if (was_throttled) {
printk(KERN_INFO "CPU%d: Temperature/speed normal\n", cpu);
+ return 1;
}

- return 1;
+ return 0;
}

#ifdef CONFIG_SYSFS
--
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/