Skip to contentSkip to conversation

mm-hugetlb-add-folio_hstate.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Nov 9, 2022

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/hugetlb: add folio_hstate()
has been removed from the -mm tree. Its filename was
mm-hugetlb-add-folio_hstate.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: Sidhartha Kumar <[email protected]>
Subject: mm/hugetlb: add folio_hstate()
Date: Thu, 22 Sep 2022 10:42:07 -0500

Helper function to retrieve hstate information from a hugetlb folio.

Cc Arnd Bergmann <[email protected]>
Cc Colin Cross <[email protected]>
Cc David Howells <[email protected]>
Cc "Eric W . Biederman" <[email protected]>
Cc Hugh Dickins <[email protected]>
Cc Matthew Wilcox <[email protected]>
Cc Muchun Song <[email protected]>
Cc Peter Xu <[email protected]>
Cc Vlastimil Babka <[email protected]>
Cc William Kucharski <[email protected]>

---

 include/linux/hugetlb.h |   14 ++++++++++++--
 mm/migrate.c            |    2 +-
 2 files changed, 13 insertions(+), 3 deletions(-)
include/linux/hugetlb.h renamed from include/linux/hugetlb.h~mm-hugetlb-add-folio_hstate +12 -2
@@ -824,10 +824,15 @@ static inline pte_t arch_make_huge_pte(p
 }
 #endif
 
+static inline struct hstate *folio_hstate(struct folio *folio)
+{
+	VM_BUG_ON_FOLIO(!folio_test_hugetlb(folio), folio);
+	return size_to_hstate(folio_size(folio));
+}
+
 static inline struct hstate *page_hstate(struct page *page)
 {
-	VM_BUG_ON_PAGE(!PageHuge(page), page);
-	return size_to_hstate(page_size(page));
+	return folio_hstate(page_folio(page));
 }
 
 static inline unsigned hstate_index_to_shift(unsigned index)
@@ -1035,6 +1040,11 @@ static inline struct hstate *hstate_vma(
 {
 	return NULL;
 }
+
+static inline struct hstate *folio_hstate(struct folio *folio)
+{
+	return NULL;
+}
 
 static inline struct hstate *page_hstate(struct page *page)
 {
mm/migrate.c renamed from mm/migrate.c~mm-hugetlb-add-folio_hstate +1 -1
@@ -1620,7 +1620,7 @@ struct page *alloc_migration_target(stru
 		nid = folio_nid(folio);
 
 	if (folio_test_hugetlb(folio)) {
-		struct hstate *h = page_hstate(&folio->page);
+		struct hstate *h = folio_hstate(folio);
 
 		gfp_mask = htlb_modify_alloc_mask(h, gfp_mask);
 		return alloc_huge_page_nodemask(h, nid, mtc->nmask, gfp_mask);

_

Patches currently in -mm which might be from [email protected] are

mm-hugetlb_cgroup-convert-__set_hugetlb_cgroup-to-folios.patch mm-hugetlb_cgroup-convert-hugetlb_cgroup_from_page-to-folios.patch mm-hugetlb_cgroup-convert-set_hugetlb_cgroup-to-folios.patch mm-hugetlb_cgroup-convert-hugetlb_cgroup_migrate-to-folios.patch mm-hugetlb-convert-isolate_or_dissolve_huge_page-to-folios.patch mm-hugetlb-convert-free_huge_page-to-folios.patch mm-hugetlb_cgroup-convert-hugetlb_cgroup_uncharge_page-to-folios.patch mm-hugeltb_cgroup-convert-hugetlb_cgroup_commit_charge-to-folios.patch mm-hugetlb-convert-move_hugetlb_state-to-folios.patch