All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] EDAC, pnd2: set MCE_PRIO_EDAC priority for pnd2_mce_dec notifier
@ 2020-06-10  6:58 Zhenzhong Duan
  2020-06-10  6:58 ` [PATCH] EDAC/mc: call edac_inc_ue_error() before panic Zhenzhong Duan
  2020-06-10 17:16 ` [PATCH] EDAC, pnd2: set MCE_PRIO_EDAC priority for pnd2_mce_dec notifier Luck, Tony
  0 siblings, 2 replies; 5+ messages in thread
From: Zhenzhong Duan @ 2020-06-10  6:58 UTC (permalink / raw)
  To: linux-kernel, linux-edac
  Cc: tony.luck, bp, mchehab, james.morse, rrichter, Zhenzhong Duan

...or else it has MCE_PRIO_LOWEST priority by default.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@gmail.com>
---
 drivers/edac/pnd2_edac.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/edac/pnd2_edac.c b/drivers/edac/pnd2_edac.c
index bc47328..368fae3 100644
--- a/drivers/edac/pnd2_edac.c
+++ b/drivers/edac/pnd2_edac.c
@@ -1434,6 +1434,7 @@ static int pnd2_mce_check_error(struct notifier_block *nb, unsigned long val, vo
 
 static struct notifier_block pnd2_mce_dec = {
 	.notifier_call	= pnd2_mce_check_error,
+	.priority	= MCE_PRIO_EDAC,
 };
 
 #ifdef CONFIG_EDAC_DEBUG
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] EDAC/mc: call edac_inc_ue_error() before panic
  2020-06-10  6:58 [PATCH] EDAC, pnd2: set MCE_PRIO_EDAC priority for pnd2_mce_dec notifier Zhenzhong Duan
@ 2020-06-10  6:58 ` Zhenzhong Duan
  2020-06-10 17:19   ` Luck, Tony
  2020-06-10 17:16 ` [PATCH] EDAC, pnd2: set MCE_PRIO_EDAC priority for pnd2_mce_dec notifier Luck, Tony
  1 sibling, 1 reply; 5+ messages in thread
From: Zhenzhong Duan @ 2020-06-10  6:58 UTC (permalink / raw)
  To: linux-kernel, linux-edac
  Cc: tony.luck, bp, mchehab, james.morse, rrichter, Zhenzhong Duan

By calling edac_inc_ue_error() before panic, we get a correct UE error
count for core dump analysis.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@gmail.com>
---
 drivers/edac/edac_mc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index 75ede27..c1f23c2 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -1011,6 +1011,8 @@ static void edac_ue_error(struct edac_raw_error_desc *e)
 			e->other_detail);
 	}
 
+	edac_inc_ue_error(e);
+
 	if (edac_mc_get_panic_on_ue()) {
 		panic("UE %s%son %s (%s page:0x%lx offset:0x%lx grain:%ld%s%s)\n",
 			e->msg,
@@ -1020,8 +1022,6 @@ static void edac_ue_error(struct edac_raw_error_desc *e)
 			*e->other_detail ? " - " : "",
 			e->other_detail);
 	}
-
-	edac_inc_ue_error(e);
 }
 
 static void edac_inc_csrow(struct edac_raw_error_desc *e, int row, int chan)
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] EDAC, pnd2: set MCE_PRIO_EDAC priority for pnd2_mce_dec notifier
  2020-06-10  6:58 [PATCH] EDAC, pnd2: set MCE_PRIO_EDAC priority for pnd2_mce_dec notifier Zhenzhong Duan
  2020-06-10  6:58 ` [PATCH] EDAC/mc: call edac_inc_ue_error() before panic Zhenzhong Duan
@ 2020-06-10 17:16 ` Luck, Tony
  1 sibling, 0 replies; 5+ messages in thread
From: Luck, Tony @ 2020-06-10 17:16 UTC (permalink / raw)
  To: Zhenzhong Duan
  Cc: linux-kernel, linux-edac, bp, mchehab, james.morse, rrichter

On Wed, Jun 10, 2020 at 02:58:45PM +0800, Zhenzhong Duan wrote:
> ...or else it has MCE_PRIO_LOWEST priority by default.
> 
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@gmail.com>
> ---
>  drivers/edac/pnd2_edac.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/edac/pnd2_edac.c b/drivers/edac/pnd2_edac.c
> index bc47328..368fae3 100644
> --- a/drivers/edac/pnd2_edac.c
> +++ b/drivers/edac/pnd2_edac.c
> @@ -1434,6 +1434,7 @@ static int pnd2_mce_check_error(struct notifier_block *nb, unsigned long val, vo
>  
>  static struct notifier_block pnd2_mce_dec = {
>  	.notifier_call	= pnd2_mce_check_error,
> +	.priority	= MCE_PRIO_EDAC,
>  };
>  
>  #ifdef CONFIG_EDAC_DEBUG
> -- 

Looks OK. I'll queue this next week (after Linus releases v5.8-rc1). It should
be merged into v5.9

Thanks

-Tony

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] EDAC/mc: call edac_inc_ue_error() before panic
  2020-06-10  6:58 ` [PATCH] EDAC/mc: call edac_inc_ue_error() before panic Zhenzhong Duan
@ 2020-06-10 17:19   ` Luck, Tony
  2020-06-11  2:37     ` Zhenzhong Duan
  0 siblings, 1 reply; 5+ messages in thread
From: Luck, Tony @ 2020-06-10 17:19 UTC (permalink / raw)
  To: Zhenzhong Duan
  Cc: linux-kernel, linux-edac, bp, mchehab, james.morse, rrichter

On Wed, Jun 10, 2020 at 02:58:46PM +0800, Zhenzhong Duan wrote:
> By calling edac_inc_ue_error() before panic, we get a correct UE error
> count for core dump analysis.

Looks accurate, and I'll add the patch to be applied. But I wonder
how big a problem it is. Isn't most of the information deriveable
from the panic message?

> 
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@gmail.com>
> ---
>  drivers/edac/edac_mc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
> index 75ede27..c1f23c2 100644
> --- a/drivers/edac/edac_mc.c
> +++ b/drivers/edac/edac_mc.c
> @@ -1011,6 +1011,8 @@ static void edac_ue_error(struct edac_raw_error_desc *e)
>  			e->other_detail);
>  	}
>  
> +	edac_inc_ue_error(e);
> +
>  	if (edac_mc_get_panic_on_ue()) {
>  		panic("UE %s%son %s (%s page:0x%lx offset:0x%lx grain:%ld%s%s)\n",
>  			e->msg,
> @@ -1020,8 +1022,6 @@ static void edac_ue_error(struct edac_raw_error_desc *e)
>  			*e->other_detail ? " - " : "",
>  			e->other_detail);
>  	}
> -
> -	edac_inc_ue_error(e);
>  }
>  
>  static void edac_inc_csrow(struct edac_raw_error_desc *e, int row, int chan)
> -- 
> 1.8.3.1
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] EDAC/mc: call edac_inc_ue_error() before panic
  2020-06-10 17:19   ` Luck, Tony
@ 2020-06-11  2:37     ` Zhenzhong Duan
  0 siblings, 0 replies; 5+ messages in thread
From: Zhenzhong Duan @ 2020-06-11  2:37 UTC (permalink / raw)
  To: Luck, Tony
  Cc: linux-kernel, linux-edac, Borislav Petkov, mchehab, james.morse,
	rrichter

On Thu, Jun 11, 2020 at 1:19 AM Luck, Tony <tony.luck@intel.com> wrote:
>
> On Wed, Jun 10, 2020 at 02:58:46PM +0800, Zhenzhong Duan wrote:
> > By calling edac_inc_ue_error() before panic, we get a correct UE error
> > count for core dump analysis.
>
> Looks accurate, and I'll add the patch to be applied. But I wonder
> how big a problem it is. Isn't most of the information deriveable
> from the panic message?

Thanks for review.
Yes, it's totally not a problem.  I'm a little too strict here.

Zhenzhong

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-06-11  2:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-10  6:58 [PATCH] EDAC, pnd2: set MCE_PRIO_EDAC priority for pnd2_mce_dec notifier Zhenzhong Duan
2020-06-10  6:58 ` [PATCH] EDAC/mc: call edac_inc_ue_error() before panic Zhenzhong Duan
2020-06-10 17:19   ` Luck, Tony
2020-06-11  2:37     ` Zhenzhong Duan
2020-06-10 17:16 ` [PATCH] EDAC, pnd2: set MCE_PRIO_EDAC priority for pnd2_mce_dec notifier Luck, Tony

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.