summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2024-04-12 16:23:35 -0700
committerAndrew Morton <akpm@linux-foundation.org>2024-04-12 16:23:35 -0700
commit264cbabb93355780b816628546e6465a1f615bb9 (patch)
tree5cc3b56f04908726b857c3e0c6235350b5cfeb98
parent620bbff208476710fa03cdacda9a61f0e7038846 (diff)
download25-new-264cbabb93355780b816628546e6465a1f615bb9.tar.gz
foo
-rw-r--r--patches/mm-hugetlb-convert-dissolve_free_huge_pages-to-folios.patch21
1 files changed, 13 insertions, 8 deletions
diff --git a/patches/mm-hugetlb-convert-dissolve_free_huge_pages-to-folios.patch b/patches/mm-hugetlb-convert-dissolve_free_huge_pages-to-folios.patch
index f42d33122..915ee2eb1 100644
--- a/patches/mm-hugetlb-convert-dissolve_free_huge_pages-to-folios.patch
+++ b/patches/mm-hugetlb-convert-dissolve_free_huge_pages-to-folios.patch
@@ -3,11 +3,12 @@ Subject: mm/hugetlb: convert dissolve_free_huge_pages() to folios
Date: Thu, 11 Apr 2024 09:47:56 -0700
Allows us to rename dissolve_free_huge_pages() to
-dissolve_free_hugetlb_folio(). Convert one caller to pass in a folio
+dissolve_free_hugetlb_folio(). Convert one caller to pass in a folio
directly and use page_folio() to convert the caller in mm/memory-failure.
Link: https://lkml.kernel.org/r/20240411164756.261178-1-sidhartha.kumar@oracle.com
Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
+Reviewed-by: Oscar Salvador <osalvador@suse.de>
Cc: Jane Chu <jane.chu@oracle.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Miaohe Lin <linmiaohe@huawei.com>
@@ -94,17 +95,21 @@ Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
}
--- a/mm/memory-failure.c~mm-hugetlb-convert-dissolve_free_huge_pages-to-folios
+++ a/mm/memory-failure.c
-@@ -155,11 +155,11 @@ static int __page_handle_poison(struct p
+@@ -155,7 +155,7 @@ static int __page_handle_poison(struct p
/*
- * zone_pcp_disable() can't be used here. It will hold pcp_batch_high_lock and
-- * dissolve_free_huge_page() might hold cpu_hotplug_lock via static_key_slow_dec()
-+ * dissolve_free_hugetlb_folio() might hold cpu_hotplug_lock via static_key_slow_dec()
- * when hugetlb vmemmap optimization is enabled. This will break current lock
- * dependency chain and leads to deadlock.
+ * zone_pcp_disable() can't be used here. It will
+- * hold pcp_batch_high_lock and dissolve_free_huge_page() might hold
++ * hold pcp_batch_high_lock and dissolve_free_hugetlb_folio() might hold
+ * cpu_hotplug_lock via static_key_slow_dec() when hugetlb vmemmap
+ * optimization is enabled. This will break current lock dependency
+ * chain and leads to deadlock.
+@@ -165,7 +165,7 @@ static int __page_handle_poison(struct p
+ * but nothing guarantees that those pages do not get back to a PCP
+ * queue if we need to refill those.
*/
- ret = dissolve_free_huge_page(page);
-+ ret = dissolve_free_hugetlb_folio(page_folio(page));
++ ret = dissolve_free_hugetlb_folio(page);
if (!ret) {
drain_all_pages(page_zone(page));
ret = take_page_off_buddy(page);