* [merged mm-stable] mm-memory-failure-kill-__soft_offline_page.patch removed from -mm tree
@ 2022-09-12 3:29 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-09-12 3:29 UTC (permalink / raw)
To: mm-commits, naoya.horiguchi, linmiaohe, david, anshuman.khandual,
wangkefeng.wang, akpm
The quilt patch titled
Subject: mm: memory-failure: kill __soft_offline_page()
has been removed from the -mm tree. Its filename was
mm-memory-failure-kill-__soft_offline_page.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Kefeng Wang <wangkefeng.wang@huawei.com>
Subject: mm: memory-failure: kill __soft_offline_page()
Date: Fri, 19 Aug 2022 11:34:02 +0800
Squash the __soft_offline_page() into soft_offline_in_use_page() and kill
__soft_offline_page().
[wangkefeng.wang@huawei.com: update hpage when try_to_split_thp_page() succeeds]
Link: https://lkml.kernel.org/r/20220830104654.28234-1-wangkefeng.wang@huawei.com
Link: https://lkml.kernel.org/r/20220819033402.156519-2-wangkefeng.wang@huawei.com
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>
Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/memory-failure.c | 25 ++++++++++---------------
1 file changed, 10 insertions(+), 15 deletions(-)
--- a/mm/memory-failure.c~mm-memory-failure-kill-__soft_offline_page
+++ a/mm/memory-failure.c
@@ -2432,11 +2432,11 @@ static bool isolate_page(struct page *pa
}
/*
- * __soft_offline_page handles hugetlb-pages and non-hugetlb pages.
+ * soft_offline_in_use_page handles hugetlb-pages and non-hugetlb pages.
* If the page is a non-dirty unmapped page-cache page, it simply invalidates.
* If the page is mapped, it migrates the contents over.
*/
-static int __soft_offline_page(struct page *page)
+static int soft_offline_in_use_page(struct page *page)
{
long ret = 0;
unsigned long pfn = page_to_pfn(page);
@@ -2449,6 +2449,14 @@ static int __soft_offline_page(struct pa
.gfp_mask = GFP_USER | __GFP_MOVABLE | __GFP_RETRY_MAYFAIL,
};
+ if (!huge && PageTransHuge(hpage)) {
+ if (try_to_split_thp_page(page)) {
+ pr_info("soft offline: %#lx: thp split failed\n", pfn);
+ return -EBUSY;
+ }
+ hpage = page;
+ }
+
lock_page(page);
if (!PageHuge(page))
wait_on_page_writeback(page);
@@ -2498,19 +2506,6 @@ static int __soft_offline_page(struct pa
return ret;
}
-static int soft_offline_in_use_page(struct page *page)
-{
- struct page *hpage = compound_head(page);
-
- if (!PageHuge(page) && PageTransHuge(hpage))
- if (try_to_split_thp_page(page) < 0) {
- pr_info("soft offline: %#lx: thp split failed\n",
- page_to_pfn(page));
- return -EBUSY;
- }
- return __soft_offline_page(page);
-}
-
static void put_ref_page(struct page *page)
{
if (page)
_
Patches currently in -mm which might be from wangkefeng.wang@huawei.com are
mm-reuse-pageblock_start-end_pfn-macro.patch
mm-add-pageblock_align-macro.patch
mm-add-pageblock_aligned-macro.patch
memblock-tests-add-new-pageblock-related-macro.patch
kernel-exit-cleanup-release_thread.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-09-12 3:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-12 3:29 [merged mm-stable] mm-memory-failure-kill-__soft_offline_page.patch removed from -mm tree Andrew Morton
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.