Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751988AbbEGGEy (ORCPT ); Thu, 7 May 2015 02:04:54 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:24843 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751816AbbEGGEx (ORCPT ); Thu, 7 May 2015 02:04:53 -0400 Message-ID: <554AFFC9.2040904@huawei.com> Date: Thu, 7 May 2015 14:01:45 +0800 From: Xie XiuQi User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Steven Rostedt CC: , , , , , , , , , , , , , , , , Subject: Re: [PATCH v4 3/3] tracing: add trace event for memory-failure References: <1429519480-11687-1-git-send-email-xiexiuqi@huawei.com> <1429519480-11687-4-git-send-email-xiexiuqi@huawei.com> <20150506222551.56108f53@grimm.local.home> In-Reply-To: <20150506222551.56108f53@grimm.local.home> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.17.191] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020203.554AFFE1.0015,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 0c476ec43fe21de22232556aa83222a0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2482 Lines: 99 On 2015/5/7 10:25, Steven Rostedt wrote: > On Mon, 20 Apr 2015 16:44:40 +0800 > Xie XiuQi wrote: > ... >> + * >> + * unsigned long pfn - Page Frame Number of the corrupted page >> + * int type - Page types of the corrupted page >> + * int result - Result of recovery action >> + */ >> + >> +#ifdef CONFIG_MEMORY_FAILURE >> +#define MF_ACTION_RESULT \ >> + EM ( MF_IGNORED, "Ignord" ) \ > > "Ignored" ? My fault, I'll correct it, thanks. > >> + EM ( MF_FAILED, "Failed" ) \ >> + EM ( MF_DELAYED, "Delayed" ) \ >> + EMe ( MF_RECOVERED, "Recovered" ) >> + >> +#define MF_PAGE_TYPE \ >> + EM ( MF_MSG_KERNEL, "reserved kernel page" ) \ >> + EM ( MF_MSG_KERNEL_HIGH_ORDER, "high-order kernel page" ) \ ... >> + ), >> + >> + TP_fast_assign( >> + __entry->pfn = pfn; >> + __entry->type = type; >> + __entry->result = result; >> + ), >> + >> + TP_printk("pfn %#lx: recovery action for %s: %s", > > Hmm, "%#" is new to me. I'm not sure libtraceevent handles that. > > Not your problem, I need to make sure that it does, and if it does not, > I need to fix it. > > I'm not even sure what %# does. > > Other than the typo, > > Acked-by: Steven Rostedt Thanks, Xie XiuQi > > -- Steve > > >> + __entry->pfn, >> + __print_symbolic(__entry->type, MF_PAGE_TYPE), >> + __print_symbolic(__entry->result, MF_ACTION_RESULT) >> + ) >> +); >> +#endif /* CONFIG_MEMORY_FAILURE */ >> #endif /* _TRACE_HW_EVENT_MC_H */ >> >> /* This part must be outside protection */ >> diff --git a/mm/memory-failure.c b/mm/memory-failure.c >> index f074f8e..42c5981 100644 >> --- a/mm/memory-failure.c >> +++ b/mm/memory-failure.c >> @@ -56,6 +56,7 @@ >> #include >> #include >> #include "internal.h" >> +#include "ras/ras_event.h" >> >> int sysctl_memory_failure_early_kill __read_mostly = 0; >> >> @@ -850,6 +851,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]); >> } > > > . > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/