Re: [PATCH v2 6/6] x86/mce: Dynamically register default MCE handler

From: Jan H. SchÃnherr
Date: Thu Jan 09 2020 - 17:30:29 EST


On 09/01/2020 22.54, Luck, Tony wrote:
>> It seems to me that the issue is the mcelog notifier counts toward the number
>> of notifiers, so the default notifier doesn't print anything.
>
> If we gave a API to the notifiers to say whether to suppress printing, then the
> dev_mcelog() code could do the suppression only if some process had
> /dev/mcelog open. So if mcelog(8) wasn't running, you'd still see the console
> message.

I briefly looked into that.

There is the issue that mcelog code buffers MCEs unconditionally. And we probably
don't want to deactivate that, so that MCEs during boot can be queried
a bit later via /dev/mcelog.

We would get a bit of duplicate logging, if we let mcelog report "supress
printing" only if there is an actual consumer. (Or if there was a consumer
once, in case there are periodically polling consumers.)

Regards
Jan

--



Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879