From: Borislav Petkov <bp@alien8.de>
To: Tony Luck <tony.luck@intel.com>
Cc: "Chen, Gong" <gong.chen@linux.intel.com>,
linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [UNTESTED PATCH] x86, mce: Avoid double entry of deferred errors into the genpool.
Date: Sat, 21 Nov 2015 20:15:56 +0100 [thread overview]
Message-ID: <20151121191556.GB15172@pd.tnic> (raw)
In-Reply-To: <3165a4989dcb45fc0306438d40d0cf2ace429c4c.1447280215.git.tony.luck@intel.com>
On Wed, Nov 11, 2015 at 02:01:51PM -0800, Tony Luck wrote:
> 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@intel.com>
> ---
> arch/x86/kernel/cpu/mcheck/mce.c | 24 +++++++++++++-----------
> 1 file changed, 13 insertions(+), 11 deletions(-)
...
> @@ -626,9 +621,16 @@ bool machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
> * Don't get the IP here because it's unlikely to
> * have anything to do with the actual error location.
> */
> - if (!(flags & MCP_DONTLOG) && !mca_cfg.dont_log_ce) {
> - error_logged = true;
> + if (!(flags & MCP_DONTLOG) && !mca_cfg.dont_log_ce)
> mce_log(&m);
> + else if (m.usable_addr) {
> + /*
> + * Although we skipped logging this, we still want
> + * to take action. Add to the pool so the registered
> + * notifiers will see it.
> + */
> + if (!mce_gen_pool_add(&m))
> + mce_schedule_work();
Right, this still causes the error to come out on AMD because the
notifier calls amd_decode_mce().
I guess we can extend the "if (m.usable_addr)" check above with "if
error is not CE" too and only add it to the generic pool when its
severity is anything stronger than MCE_KEEP_SEVERITY...
Also, two more fixes I've done while injecting in a kvm guest I'm
sending as a reply to this message. Will inject on a real box too.
Thanks.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
next prev parent reply other threads:[~2015-11-21 19:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-11 15:16 [PATCH] Cleanup useless codes in CMCI handler Chen, Gong
2015-11-11 19:38 ` Luck, Tony
2015-11-11 22:01 ` [UNTESTED PATCH] x86, mce: Avoid double entry of deferred errors into the genpool Tony Luck
2015-11-12 16:12 ` Chen, Gong
2015-11-19 16:15 ` Borislav Petkov
2015-11-19 19:33 ` Luck, Tony
2015-11-19 20:39 ` Borislav Petkov
2015-11-23 17:59 ` Borislav Petkov
2015-11-21 19:15 ` Borislav Petkov [this message]
2015-11-21 19:17 ` [PATCH 1/2] x86/mce: Add the missing memory error check on AMD Borislav Petkov
2015-11-21 19:18 ` [PATCH 2/2] x86/mce: Make usable address checks Intel-only Borislav Petkov
2015-11-24 0:19 ` [UNTESTED PATCH] x86, mce: Avoid double entry of deferred errors into the genpool Luck, Tony
2015-11-24 7:36 ` Borislav Petkov
2015-11-24 15:51 ` Luck, Tony
2015-11-24 18:56 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151121191556.GB15172@pd.tnic \
--to=bp@alien8.de \
--cc=gong.chen@linux.intel.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®