aboutsummaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorXie XiuQi <xiexiuqi@huawei.com>2015-06-10 10:10:09 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2015-06-10 10:10:09 +1000
commitd3be90b59e9abdebc090405bae6a378673ab38bd (patch)
tree35fc1456467909f1d10e73c9fbabb520e4ae15fc /mm
parent1e92a6f30b4bd9eb3475ce6b82657d634d8db41b (diff)
tracing: add trace event for memory-failure
RAS user space tools like rasdaemon which base on trace event, could receive mce error event, but no memory recovery result event. So, I want to add this event to make this scenario complete. This patch add a event at ras group for memory-failure. The output like below: # tracer: nop # # entries-in-buffer/entries-written: 2/2 #P:24 # # _-----=> irqs-off # / _----=> need-resched # | / _---=> hardirq/softirq # || / _--=> preempt-depth # ||| / delay # TASK-PID CPU# |||| TIMESTAMP FUNCTION # | | | |||| | | mce-inject-13150 [001] .... 277.019359: memory_failure_event: pfn 0x19869: recovery action for free buddy page: Delayed Signed-off-by: Xie XiuQi <xiexiuqi@huawei.com> Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Acked-by: Steven Rostedt <rostedt@goodmis.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Chen Gong <gong.chen@linux.intel.com> Cc: Jim Davis <jim.epost@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/memory-failure.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 15c0d5ab0893..c53543d89282 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -57,6 +57,7 @@
#include <linux/mm_inline.h>
#include <linux/kfifo.h>
#include "internal.h"
+#include "ras/ras_event.h"
int sysctl_memory_failure_early_kill __read_mostly = 0;
@@ -855,6 +856,8 @@ static struct page_state {
static void action_result(unsigned long pfn, enum mf_action_page_type type,
enum mf_result result)
{
+ trace_memory_failure_event(pfn, type, result);
+
pr_err("MCE %#lx: recovery action for %s: %s\n",
pfn, action_page_types[type], action_name[result]);
}