aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndi Kleen <andi@firstfloor.org>2010-11-22 14:36:54 +0100
committerAndi Kleen <ak@linux.intel.com>2010-11-22 15:20:28 +0100
commitac2b116e36c697e96f06fdbd2e77d2bf6b0c2fb0 (patch)
treec7b2d55970ce7b9cd567d5fd8b0daf9a28f56ebf
parentaa817b2243580b8375d2cb18ad326530c7a74e33 (diff)
downloadlinux-mce-2.6-mce/cmci.tar.gz
DEBUG: Trace poll timer frequencymce/cmci
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 95cf1f0697f86a..2129c0d1e8f6b9 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -1159,6 +1159,7 @@ static void mce_start_timer(unsigned long data)
struct timer_list *t;
int *n;
int i;
+ int old;
if (mce_available(&current_cpu_data)) {
machine_check_poll(MCP_TIMESTAMP,
@@ -1172,10 +1173,13 @@ static void mce_start_timer(unsigned long data)
* Only round timers when there are no errors.
*/
n = &__get_cpu_var(mce_next_interval);
+ old = *n;
if (mce_notify_irq())
*n = max_t(int, *n/2, msecs_to_jiffies(check_min_interval));
else if ((*n *= 2) >= check_interval * HZ)
*n = round_jiffies_relative(check_interval * HZ);
+ if (*n != old)
+ trace_printk("MCE timer frequency changed %d -> %d\n", old, *n);
/*
* Cycle timer through the available thread siblings.
@@ -1189,6 +1193,10 @@ static void mce_start_timer(unsigned long data)
t->expires = jiffies + *n;
add_timer_on(t, i);
+
+ if (i != smp_processor_id())
+ trace_printk("MCE timer cpu %d moved to %d\n",
+ smp_processor_id(), i);
}
static void mce_do_trigger(struct work_struct *work)
@@ -1430,6 +1438,8 @@ static void __mcheck_cpu_init_timer(void)
del_timer_sync(&per_cpu(mce_timer, i));
del_timer_sync(&per_cpu(mce_timer, cpu));
+ printk(KERN_INFO "MCE: CPU %d: started MCA poll timer\n", cpu);
+
*n = check_interval * HZ;
if (!*n)
return;