* [folded-merged] mmhwpoison-take-free-pages-off-the-buddy-freelists-for-hugetlb.patch removed from -mm tree
@ 2020-12-15 2:18 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2020-12-15 2:18 UTC (permalink / raw)
To: mm-commits, naoya.horiguchi, osalvador
The patch titled
Subject: mm,hwpoison: take free pages off the buddy freelists for hugetlb
has been removed from the -mm tree. Its filename was
mmhwpoison-take-free-pages-off-the-buddy-freelists-for-hugetlb.patch
This patch was dropped because it was folded into mmhwpoison-take-free-pages-off-the-buddy-freelists.patch
------------------------------------------------------
From: Oscar Salvador <osalvador@suse.de>
Subject: mm,hwpoison: take free pages off the buddy freelists for hugetlb
Currently, free hugetlb get dissolved, but we also need to make sure to
take the poisoned subpage off the buddy frelists, so no one stumbles upon
it (see previous patch for more information).
Link: https://lkml.kernel.org/r/20201013144447.6706-4-osalvador@suse.de
Signed-off-by: Oscar Salvador <osalvador@suse.de>
Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/memory-failure.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
--- a/mm/memory-failure.c~mmhwpoison-take-free-pages-off-the-buddy-freelists-for-hugetlb
+++ a/mm/memory-failure.c
@@ -809,7 +809,7 @@ static int me_swapcache_clean(struct pag
*/
static int me_huge_page(struct page *p, unsigned long pfn)
{
- int res = 0;
+ int res;
struct page *hpage = compound_head(p);
struct address_space *mapping;
@@ -820,6 +820,7 @@ static int me_huge_page(struct page *p,
if (mapping) {
res = truncate_error_page(hpage, pfn, mapping);
} else {
+ res = MF_FAILED;
unlock_page(hpage);
/*
* migration entry prevents later access on error anonymous
@@ -828,8 +829,10 @@ static int me_huge_page(struct page *p,
*/
if (PageAnon(hpage))
put_page(hpage);
- dissolve_free_huge_page(p);
- res = MF_RECOVERED;
+ if (!dissolve_free_huge_page(p) && take_page_off_buddy(p)) {
+ page_ref_inc(p);
+ res = MF_RECOVERED;
+ }
lock_page(hpage);
}
@@ -1196,9 +1199,13 @@ static int memory_failure_hugetlb(unsign
}
}
unlock_page(head);
- dissolve_free_huge_page(p);
- action_result(pfn, MF_MSG_FREE_HUGE, MF_DELAYED);
- return 0;
+ res = MF_FAILED;
+ if (!dissolve_free_huge_page(p) && take_page_off_buddy(p)) {
+ page_ref_inc(p);
+ res = MF_RECOVERED;
+ }
+ action_result(pfn, MF_MSG_FREE_HUGE, res);
+ return res == MF_RECOVERED ? 0 : -EBUSY;
}
lock_page(head);
_
Patches currently in -mm which might be from osalvador@suse.de are
mmhwpoison-drain-pcplists-before-bailing-out-for-non-buddy-zero-refcount-page.patch
mmhwpoison-take-free-pages-off-the-buddy-freelists.patch
mmhwpoison-drop-unneeded-pcplist-draining.patch
mmhwpoison-refactor-get_any_page.patch
mmhwpoison-disable-pcplists-before-grabbing-a-refcount.patch
mmhwpoison-remove-drain_all_pages-from-shake_page.patch
mmmemory_failure-always-pin-the-page-in-madvise_inject_error.patch
mmhwpoison-return-ebusy-when-migration-fails.patch
mmhugetlb-remove-unneded-initialization.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-12-15 2:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-15 2:18 [folded-merged] mmhwpoison-take-free-pages-off-the-buddy-freelists-for-hugetlb.patch removed from -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).