* [merged] mm-soft-offline-exit-with-failure-for-non-anonymous-thp.patch removed from -mm tree
@ 2016-01-19 20:14 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2016-01-19 20:14 UTC (permalink / raw)
To: n-horiguchi, andi, kirill, mm-commits
The patch titled
Subject: mm: soft-offline: exit with failure for non anonymous thp
has been removed from the -mm tree. Its filename was
mm-soft-offline-exit-with-failure-for-non-anonymous-thp.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Subject: mm: soft-offline: exit with failure for non anonymous thp
Currently memory_failure() doesn't handle non anonymous thp case, because
we can hardly expect the error handling to be successful, and it can just
hit some corner case which results in BUG_ON or something severe like
that. This is also the case for soft offline code, so let's make it in
the same way.
Orignal code has a MF_COUNT_INCREASED check before put_hwpoison_page(),
but it's unnecessary because get_any_page() is already called when running
on this code, which takes a refcount of the target page regardress of the
flag. So this patch also removes it.
[akpm@linux-foundation.org: fix build]
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/memory-failure.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff -puN mm/memory-failure.c~mm-soft-offline-exit-with-failure-for-non-anonymous-thp mm/memory-failure.c
--- a/mm/memory-failure.c~mm-soft-offline-exit-with-failure-for-non-anonymous-thp
+++ a/mm/memory-failure.c
@@ -1691,16 +1691,16 @@ static int soft_offline_in_use_page(stru
if (!PageHuge(page) && PageTransHuge(hpage)) {
lock_page(hpage);
- ret = split_huge_page(hpage);
- unlock_page(hpage);
- if (unlikely(ret || PageTransCompound(page) ||
- !PageAnon(page))) {
- pr_info("soft offline: %#lx: failed to split THP\n",
- page_to_pfn(page));
- if (flags & MF_COUNT_INCREASED)
- put_hwpoison_page(hpage);
+ if (!PageAnon(hpage) || unlikely(split_huge_page(hpage))) {
+ unlock_page(hpage);
+ if (!PageAnon(hpage))
+ pr_info("soft offline: %#lx: non anonymous thp\n", page_to_pfn(page));
+ else
+ pr_info("soft offline: %#lx: thp split failed\n", page_to_pfn(page));
+ put_hwpoison_page(hpage);
return -EBUSY;
}
+ unlock_page(hpage);
get_hwpoison_page(page);
put_hwpoison_page(hpage);
}
_
Patches currently in -mm which might be from n-horiguchi@ah.jp.nec.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-01-19 20:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-19 20:14 [merged] mm-soft-offline-exit-with-failure-for-non-anonymous-thp.patch removed from -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.