Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759051Ab3ICAVN (ORCPT ); Mon, 2 Sep 2013 20:21:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24190 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753679Ab3ICAVM (ORCPT ); Mon, 2 Sep 2013 20:21:12 -0400 Date: Mon, 02 Sep 2013 20:20:52 -0400 From: Naoya Horiguchi To: Wanpeng Li Cc: Andrew Morton , Andi Kleen , Fengguang Wu , Tony Luck , gong.chen@linux.intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Message-ID: <1378167652-baz1wfnf-mutt-n-horiguchi@ah.jp.nec.com> In-Reply-To: <1378165006-19435-2-git-send-email-liwanp@linux.vnet.ibm.com> References: <1378165006-19435-1-git-send-email-liwanp@linux.vnet.ibm.com> <1378165006-19435-2-git-send-email-liwanp@linux.vnet.ibm.com> Subject: Re: [PATCH v2 2/4] mm/hwpoison: fix miss catch transparent huge page Mime-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Mutt-References: <1378165006-19435-2-git-send-email-liwanp@linux.vnet.ibm.com> X-Mutt-Fcc: ~/Maildir/sent/ User-Agent: Mutt 1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1985 Lines: 57 On Tue, Sep 03, 2013 at 07:36:44AM +0800, Wanpeng Li wrote: > Changelog: > *v1 -> v2: reverse PageTransHuge(page) && !PageHuge(page) check > > PageTransHuge() can't guarantee the page is transparent huge page since it > return true for both transparent huge and hugetlbfs pages. This patch fix > it by check the page is also !hugetlbfs page. > > Before patch: > > [ 121.571128] Injecting memory failure at pfn 23a200 > [ 121.571141] MCE 0x23a200: huge page recovery: Delayed > [ 140.355100] MCE: Memory failure is now running on 0x23a200 > > After patch: > > [ 94.290793] Injecting memory failure at pfn 23a000 > [ 94.290800] MCE 0x23a000: huge page recovery: Delayed > [ 105.722303] MCE: Software-unpoisoned page 0x23a000 > > Signed-off-by: Wanpeng Li Thanks! Reviewed-by: Naoya Horiguchi > --- > mm/memory-failure.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/memory-failure.c b/mm/memory-failure.c > index e28ee77..b114570 100644 > --- a/mm/memory-failure.c > +++ b/mm/memory-failure.c > @@ -1349,7 +1349,7 @@ int unpoison_memory(unsigned long pfn) > * worked by memory_failure() and the page lock is not held yet. > * In such case, we yield to memory_failure() and make unpoison fail. > */ > - if (PageTransHuge(page)) { > + if (!PageHuge(page) && PageTransHuge(page)) { > pr_info("MCE: Memory failure is now running on %#lx\n", pfn); > return 0; > } > -- > 1.8.1.2 > > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majordomo@kvack.org. For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: email@kvack.org > -- 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/