Re: [PATCH] x86/mce: Make timer handling more robust
From: Thomas Gleixner
Date: Tue Jan 31 2017 - 08:33:44 EST
On Tue, 31 Jan 2017, Thomas Gleixner wrote:
> +static void mce_start_timer(struct timer_list *t)
> {
> unsigned long iv = check_interval * HZ;
>
> if (mca_cfg.ignore_ce || !iv)
> return;
>
> - per_cpu(mce_next_interval, cpu) = iv;
> -
> - t->expires = round_jiffies(jiffies + iv);
> - add_timer_on(t, cpu);
> + this_cpu_write(mce_next_interval, iv);
> + __start_timer(t, jiffies + iv);
Bah. That's wrong. Delta patch below:
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -1782,7 +1782,7 @@ static void mce_start_timer(struct timer
return;
this_cpu_write(mce_next_interval, iv);
- __start_timer(t, jiffies + iv);
+ __start_timer(t, iv);
}
static void __mcheck_cpu_setup_timer(void)