Re: [UNTESTED PATCH] x86, mce: Avoid double entry of deferred errors into the genpool.

From: Chen, Gong
Date: Wed Nov 11 2015 - 23:23:50 EST


On Wed, Nov 11, 2015 at 02:01:51PM -0800, Luck, Tony wrote:
> Date: Wed, 11 Nov 2015 14:01:51 -0800
> From: Tony Luck <tony.luck@xxxxxxxxx>
> To: "Chen, Gong" <gong.chen@xxxxxxxxxxxxxxx>
> Cc: bp@xxxxxxxxx, linux-edac@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
> Subject: [UNTESTED PATCH] x86, mce: Avoid double entry of deferred errors
> into the genpool.
>
> We used to have a special ring buffer for deferred errors that
> was used to mark problem pages. We replaced that with a genpool.
> Then later converted mce_log() to also use the same genpool. As
> a result we end up adding all deferred errors to the genpool twice.
>
> Rearrange this code. Make sure to set the m.severity and m.usable_addr
> fields for deferred errors. Then if flags and mca_cfg.dont_log_ce mean
> we call mce_log() we are done, because that will add this entry to the
> genpool.
>
> If we skipped mce_log(), then we still want to take action for the
> deferred error, so add to the genpool.
>
> Changed the name of the boolean "error_logged" to "error_seen", we
> should set it whether of not we logged an error because the return
> value from machine_check_poll() is used to decide whether storms
> have subsided or not.
>
> Reported-by: Chen, Gong <gong.chen.linux.intel.com>
> Signed-off-by: Tony Luck <tony.luck@xxxxxxxxx>
> ---

It's much better than my original version.

Attachment: signature.asc
Description: PGP signature