Re: [PATCH] x86_64: Notify user of MCE events.

From: Andi Kleen
Date: Sun Jan 09 2005 - 11:46:48 EST


Zwane Mwaikambo <zwane@xxxxxxxxxxxxxxxx> writes:

> +
> + if (!test_and_set_bit(0, &console_logged))
> + notify_user = 1;
> }
>
> static void print_mce(struct mce *m)
> @@ -252,6 +258,12 @@ static void mcheck_timer(void *data)
> {
> on_each_cpu(mcheck_check_cpu, NULL, 1, 1);
> schedule_delayed_work(&mcheck_work, check_interval * HZ);
> +
> + if (notify_user && console_logged) {

Perhaps a comment here that the race is harmless?

> + notify_user = 0;
> + clear_bit(0, &console_logged);
> + printk(KERN_EMERG "Machine check exception logged, run mcelog\n");

I would drop the "run mcelog". It's misleading if mcelog is already
running in cron as it should.

-Andi
-
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/