From: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Andi Kleen <andi@firstfloor.org>
Cc: Tony Luck <tony.luck@intel.com>,
"Kirill A. Shutemov" <kirill@shutemov.name>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Naoya Horiguchi <nao.horiguchi@gmail.com>
Subject: [PATCH 4/4] mm/memory-failure: me_huge_page() does nothing for thp
Date: Tue, 12 May 2015 09:46:47 +0000 [thread overview]
Message-ID: <1431423998-1939-5-git-send-email-n-horiguchi@ah.jp.nec.com> (raw)
In-Reply-To: <1431423998-1939-1-git-send-email-n-horiguchi@ah.jp.nec.com>
memory_failure() is supposed not to handle thp itself, but to split it. But
if something were wrong and page_action() were called on thp, me_huge_page()
(action routine for hugepages) should be better to take no action, rather
than to take wrong action prepared for hugetlb (which triggers BUG_ON().)
This change is for potential problems, but makes sense to me because thp is
an actively developing feature and this code path can be open in the future.
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
---
mm/memory-failure.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git v4.1-rc3.orig/mm/memory-failure.c v4.1-rc3/mm/memory-failure.c
index 918256de15bf..6b5bdc575496 100644
--- v4.1-rc3.orig/mm/memory-failure.c
+++ v4.1-rc3/mm/memory-failure.c
@@ -743,6 +743,10 @@ static int me_huge_page(struct page *p, unsigned long pfn)
{
int res = 0;
struct page *hpage = compound_head(p);
+
+ if (!PageHuge(hpage))
+ return MF_DELAYED;
+
/*
* We can safely recover from error on free or reserved (i.e.
* not in-use) hugepage by dequeuing it from freelist.
--
2.1.0
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-05-12 9:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-12 9:46 [PATCH 0/4] hwpoison fixes for v4.2 Naoya Horiguchi
2015-05-12 9:46 ` Naoya Horiguchi [this message]
2015-05-12 9:46 ` [PATCH 2/4] mm/memory-failure: introduce get_hwpoison_page() for consistent refcount handling Naoya Horiguchi
2015-05-12 22:00 ` Andrew Morton
2015-05-13 0:11 ` Naoya Horiguchi
2015-05-12 9:46 ` [PATCH 1/4] mm/memory-failure: split thp earlier in memory error handling Naoya Horiguchi
2015-05-12 9:46 ` [PATCH 3/4] mm: soft-offline: don't free target page in successful page migration Naoya Horiguchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1431423998-1939-5-git-send-email-n-horiguchi@ah.jp.nec.com \
--to=n-horiguchi@ah.jp.nec.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nao.horiguchi@gmail.com \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox