linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] EDAC, mce_amd: Issue decoded MCE through the tracepoint
@ 2017-08-25 10:24 Borislav Petkov
  2017-08-25 10:24 ` [PATCH 1/7] x86/mce: Handle an in-kernel MCE decoder Borislav Petkov
                   ` (7 more replies)
  0 siblings, 8 replies; 19+ messages in thread
From: Borislav Petkov @ 2017-08-25 10:24 UTC (permalink / raw)
  To: linux-edac; +Cc: Steven Rostedt, Tony Luck, Yazen Ghannam, X86 ML, LKML

From: Borislav Petkov <bp@suse.de>

Hi all,

here's v2 incorporating all the feedback from last time. The main
difference is that instead of adding yet another tracepoint, I extended
mce_record with the decoded string. This way is much more natural and we
should've done it like this since the get-go.

The TP record looks like this:

# tracer: nop
#
#                              _-----=> irqs-off
#                             / _----=> need-resched
#                            | / _---=> hardirq/softirq
#                            || / _--=> preempt-depth
#                            ||| /     delay
#           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
#              | |       |   ||||       |         |
     kworker/1:1-91    [001] ....    97.021806: mce_record: CPU: 0, MCGc/s: 0/0, MC5: 9600410000000e0f, IPID: 0000000000000000, ADDR/MISC/SYND: 0000000097370d7b/0000000000000000/0000000000000000, RIP: 00:<0000000000000000>, TSC: 5c226747ec, PROCESSOR: 2:0, TIME: 0, SOCKET: 0, APIC: 0 MC5 Error: CPU Watchdog timer expire.

and userspace can pick apart the fields, as before.

Next step is adding that to rasdaemon.

Thanks.

Changelog:
==========

v1:

here's a first stab at adding a tracepoint which dumps the decoded MCE
string to userspace. The main idea is to have the decoding functionality
in the kernel and depending on whether you have userspace consumers
listening or not, to dump the error to the tracepoint or to dmesg.

In either case, we do the decoding in the kernel and don't need special
userspace. Furthermore, adding new CPU support will have to be done only
in one place.

First 6 patches are cleanups which are good to have regardless, IMO.

Any constructive comments and suggestions are appreciated.

Thanks.

P.S., Thanks to Rostedt for the input!

Borislav Petkov (7):
  x86/mce: Handle an in-kernel MCE decoder
  x86/mce: Extend the MCE tracepoint with a decoded string
  seq_buf: Add seq_buf_clear_buf()
  seq_buf: Export seq_buf_printf() to modules
  EDAC, mce_amd: Convert to seq_buf
  EDAC, mce_amd: Issue the decoded info through the TP or printk()
  x86/mce: Issue the mcelog --ascii message on !AMD

 arch/x86/include/asm/mce.h       |   4 +-
 arch/x86/kernel/cpu/mcheck/mce.c |  14 +-
 drivers/edac/mce_amd.c           | 279 ++++++++++++++++++++++++---------------
 include/linux/seq_buf.h          |   7 +
 include/trace/events/mce.h       |  11 +-
 lib/seq_buf.c                    |   1 +
 6 files changed, 204 insertions(+), 112 deletions(-)

-- 
2.13.0

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

end of thread, other threads:[~2017-09-04 10:47 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-25 10:24 [PATCH 0/7] EDAC, mce_amd: Issue decoded MCE through the tracepoint Borislav Petkov
2017-08-25 10:24 ` [PATCH 1/7] x86/mce: Handle an in-kernel MCE decoder Borislav Petkov
2017-08-25 10:24 ` [PATCH 2/7] x86/mce: Extend the MCE tracepoint with a decoded string Borislav Petkov
2017-08-25 10:24 ` [PATCH 3/7] seq_buf: Add seq_buf_clear_buf() Borislav Petkov
2017-08-25 10:24 ` [PATCH 4/7] seq_buf: Export seq_buf_printf() to modules Borislav Petkov
2017-08-25 13:27   ` Steven Rostedt
2017-08-25 10:24 ` [PATCH 5/7] EDAC, mce_amd: Convert to seq_buf Borislav Petkov
2017-08-25 13:30   ` Steven Rostedt
2017-08-25 10:24 ` [PATCH 6/7] EDAC, mce_amd: Issue the decoded info through the TP or printk() Borislav Petkov
2017-08-25 13:33   ` Steven Rostedt
2017-08-25 10:24 ` [PATCH 7/7] x86/mce: Issue the mcelog --ascii message on !AMD Borislav Petkov
2017-08-28 13:45 ` [PATCH 0/7] EDAC, mce_amd: Issue decoded MCE through the tracepoint Borislav Petkov
2017-08-30 11:48   ` Borislav Petkov
2017-08-30 21:47     ` mark gross
2017-08-30 22:02       ` Borislav Petkov
2017-08-31 19:17         ` Borislav Petkov
2017-08-30 23:30       ` Steven Rostedt
2017-09-03 23:37         ` mark gross
2017-09-04 10:47           ` Borislav Petkov

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).