linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: Balbir Singh <bsingharora@gmail.com>
Cc: mpe@ellerman.id.au, mahesh@linux.vnet.ibm.com,
	linuxppc-dev@lists.ozlabs.org, <skiboot@lists.ozlabs.org>
Subject: Re: [PATCH v1 0/4] Revisit MCE handling for UE Errors
Date: Tue, 12 Sep 2017 15:03:44 +1000	[thread overview]
Message-ID: <20170912150344.2d6702d1@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <20170912043859.32473-1-bsingharora@gmail.com>

Hi Balbir,

Very cool. How are you testing it? Is it failing memory pages
and poisoning them out properly?

Looks like you have a printk in the machine_check_early path,
which you shouldn't. I guess because we don't mark that context
as an NMI. Which we could... but I think you want to put as
little as possible in that path, so avoiding the print would
be preferable. Perhaps you could mark the mce event somehow that
the failure can be reported during processing it?

Firmware logging is a good question, I could not really see
where this all gets plumbed through. If this is expected to be
a common problem for some types of attached memory, then we
really need to build up a log of these errors that can be used
to exclude the memory after a reboot too. Do we have anything
like this capability in firmware?

Thanks,
Nick

On Tue, 12 Sep 2017 14:38:55 +1000
Balbir Singh <bsingharora@gmail.com> wrote:

> This patch series is designed to hook up memory_failure on
> UE errors, this is specially helpful for user_mode UE errors.
> 
> The first patch is a cleanup patch, it removes dead code.
> I could not find any users of get_mce_fault_addr().
> The second patch walks kernel/user mode page tables in
> real mode to extract the effective address of the instruction
> that caused the UE error and the effective address it was
> trying to access (for load/store). The third patch hooks
> up the pfn for instruction UE errors (ierror).
> 
> The fourth patch hooks up memory_failure to the MCE patch.
> 
> TODO:
> Log the address in NVRAM, so that we can recover from
> bad pages at boot and keep the blacklist persistent.
> 
> Changelog v2:
> 	- address review comments from Nick and Mahesh
> 	(initialization of pfn and more comments on failure
> 	when addr_to_pfn() or anaylse_instr() fail)
> 	- Hookup ierrors to the framework as well
> 	(comments from Mahesh)
> 
> Balbir Singh (4):
>   powerpc/mce.c: Remove unused function get_mce_fault_addr()
>   powerpc/mce: Hookup derror (load/store) UE errors
>   powerpc/mce: Hookup ierror (instruction) UE errors
>   powerpc/mce: hookup memory_failure for UE errors
> 
>  arch/powerpc/include/asm/mce.h  |   4 +-
>  arch/powerpc/kernel/mce.c       | 108 ++++++++++++++++++++++++----------------
>  arch/powerpc/kernel/mce_power.c | 105 +++++++++++++++++++++++++++++++++++---
>  3 files changed, 163 insertions(+), 54 deletions(-)
> 

  parent reply	other threads:[~2017-09-12  5:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-12  4:38 [PATCH v1 0/4] Revisit MCE handling for UE Errors Balbir Singh
2017-09-12  4:38 ` [PATCH v1 1/4] powerpc/mce.c: Remove unused function get_mce_fault_addr() Balbir Singh
2017-09-12  4:38 ` [PATCH v1 2/4] powerpc/mce: Hookup derror (load/store) UE errors Balbir Singh
2017-09-12  4:38 ` [PATCH v1 3/4] powerpc/mce: Hookup ierror (instruction) " Balbir Singh
2017-09-12  4:38 ` [PATCH v1 4/4] powerpc/mce: hookup memory_failure for " Balbir Singh
2017-09-12  5:03 ` Nicholas Piggin [this message]
2017-09-12  7:11   ` [PATCH v1 0/4] Revisit MCE handling for UE Errors Balbir Singh

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=20170912150344.2d6702d1@roar.ozlabs.ibm.com \
    --to=npiggin@gmail.com \
    --cc=bsingharora@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mahesh@linux.vnet.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=skiboot@lists.ozlabs.org \
    /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;
as well as URLs for NNTP newsgroup(s).