Skip to content

RFC RAS daemon v4

Borislav Petkov lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest11 of 12 patches 5 repliesIn review

11 of 12 patches are in this archive. The cover letter announces 12.

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12perf: Start the massive restructuringkernel/Makefile kernel/events/Makefile kernel/events/core.c+8 -20 replies
2/12perf: Add persistent event facilitiesinclude/linux/perf_event.h kernel/events/Makefile kernel/events/core.c +1 more+104 -80 replies
3/12x86, mce: Add persistent MCE eventarch/x86/include/asm/mce.h arch/x86/kernel/cpu/mcheck/mce.c+94 -00 replies
4/12perf: Add Makefile.libtools/perf/Makefile tools/scripts/Makefile.lib+67 -620 replies
5/12perf: Export trace-event utilstools/Makefile tools/lib/trace/Makefile tools/lib/trace/trace-event-info.c +18 more+132 -420 replies
6/12perf: Remove duplicate enum trace_flag_typetools/lib/trace/trace-event.h tools/perf/builtin-timechart.c+11 -200 replies
7/12perf: Export debugfs utilitiestools/Makefile tools/lib/lk/Makefile tools/lib/lk/debugfs.c +64 more+136 -830 replies
8/12perf: Carve out mmap helpers for general usetools/Makefile tools/lib/perf/Makefile tools/lib/perf/mmap.c +4 more+160 -1175 replies
9/12perf: Export util.ch into librarytools/lib/lk/Makefile tools/lib/lk/util.c tools/lib/perf/Makefile +5 more+12 -50 replies
10/12perf: Export ctype.ctools/lib/lk/Makefile tools/lib/lk/ctype.c tools/perf/Makefile+2 -20 replies
11/12perf: Export tracepoint_id_to_pathtools/lib/trace/trace-event-info.c tools/lib/trace/trace-event.h tools/perf/util/parse-events.c +2 more+128 -1200 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCHSET 0/12] RAS daemon v4

From: Borislav Petkov <[email protected]>

Hi,

here's another round of the RAS daemon patchset. This time I'd like to get some ACKs/NACKs on the perf bits and whether this is agreeable to do. To some of the patches:

* 0001-perf-Start-the-massive-restructuring.patch:

This renames perf_event.c into events/core.c, as talked about earlier. This is only a first step though, the rest should come from perf people I guess...

* 0002-perf-Add-persistent-event-facilities.patch

... and this one puts the persistent bits in persistent.c

* 0004-perf-Add-Makefile.lib.patch
* 0005-perf-Export-trace-event-utils.patch

I'm adding a toplevel tools/Makefile here which we could use for the other tools in there since we keep growing even more tools with each kernel release.

* 0007-perf-Export-debugfs-utilities.patch

This one is needed only temporary, as we're moving the perf events to /sysfs. After that work is done, the persistent fd will be read from there.

For more details, check the individual patches.

Btw, the patches are ontop of tip/master from ~two weeks ago, i.e.:
cf1f6cd677a9ce8c80e5de61724a25074ad9a8cf.

In order to run this patchset, you need only this hunk:

---

drivers/edac/mce_amd.c +3 -0
index c018109..7bffbc6 100644
@@ -1,5 +1,6 @@
 #include <linux/module.h>
 #include <linux/slab.h>
+#include <trace/events/mce.h>
 
 #include "mce_amd.h"
 
@@ -598,6 +599,8 @@ int amd_decode_mce(struct notifier_block *nb, unsigned long val, void *data)
 
 	amd_decode_err_code(m->status & 0xffff);
 
+	trace_mce_record(m);
+
 	return NOTIFY_STOP;
 }
 EXPORT_SYMBOL_GPL(amd_decode_mce);

---

so that you can inject some MCEs like so:

$ cd tools/
$ make -j ras
$ ./ras/rasd
$ modprobe mce_amd_inj (built by CONFIG_EDAC_MCE_INJ)
$ echo 0x9c00410000010016 > /sys/devices/system/edac/mce/status
$ echo 0 > /sys/devices/system/edac/mce/bank

And after 30 sec the latest, /var/log/ras.log will contain:

Got MCE, cpu: 0, status: 0x9c00410000010016, addr: 0x0000000000000000

This is still undecoded yet but I'm working on it.

Anyway, please take a look and send me all comments you'd have.

Thanks.