+ mm-soft-offline-exit-with-failure-for-non-anonymous-thp.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm: soft-offline: exit with failure for non anonymous thp
has been added to the -mm tree.  Its filename is
     mm-soft-offline-exit-with-failure-for-non-anonymous-thp.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-soft-offline-exit-with-failure-for-non-anonymous-thp.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-soft-offline-exit-with-failure-for-non-anonymous-thp.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx>
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 a case for soft offline code, so let's make it in the
same way.

Signed-off-by: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx>
Cc: Andi Kleen <andi@xxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/memory-failure.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 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
@@ -1751,9 +1751,11 @@ int soft_offline_page(struct page *page,
 		return -EBUSY;
 	}
 	if (!PageHuge(page) && PageTransHuge(hpage)) {
-		if (PageAnon(hpage) && unlikely(split_huge_page(hpage))) {
-			pr_info("soft offline: %#lx: failed to split THP\n",
-				pfn);
+		if (!PageAnon(hpage) || unlikely(split_huge_page(hpage))) {
+			if (!PageAnon(hpage))
+				pr_info("soft offline: %#lx: non anonymous thp\n", pfn);
+			else
+				pr_info("soft offline: %#lx: thp split failed\n", pfn);
 			if (flags & MF_COUNT_INCREASED)
 				put_hwpoison_page(page);
 			return -EBUSY;
_

Patches currently in -mm which might be from n-horiguchi@xxxxxxxxxxxxx are

mm-zonelist-enumerate-zonelists-array-index-fix-fix.patch
mm-zonelist-enumerate-zonelists-array-index-fix-fix-fix.patch
mm-page_isolation-use-micro-to-judge-the-alignment.patch
mm-soft-offline-exit-with-failure-for-non-anonymous-thp.patch
rmap-add-argument-to-charge-compound-page-fix.patch
mm-hwpoison-adjust-for-new-thp-refcounting.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux