Skip to contentSkip to conversation

mm-hugetlb-add-hugetlb_folio_subpool-helpers.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 hugetlb_folio_subpool() helpers
has been removed from the -mm tree. Its filename was
mm-hugetlb-add-hugetlb_folio_subpool-helpers.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 hugetlb_folio_subpool() helpers
Date: Thu, 22 Sep 2022 10:42:05 -0500

Allow hugetlbfs_migrate_folio to check and read subpool information by passing in a 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 kernel test robot <[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]>

---

 fs/hugetlbfs/inode.c    |    8 ++++----
 include/linux/hugetlb.h |   15 +++++++++++++--
 2 files changed, 17 insertions(+), 6 deletions(-)
fs/hugetlbfs/inode.c renamed from fs/hugetlbfs/inode.c~mm-hugetlb-add-hugetlb_folio_subpool-helpers +4 -4
@@ -1091,10 +1091,10 @@ static int hugetlbfs_migrate_folio(struc
 	if (rc != MIGRATEPAGE_SUCCESS)
 		return rc;
 
-	if (hugetlb_page_subpool(&src->page)) {
-		hugetlb_set_page_subpool(&dst->page,
-					hugetlb_page_subpool(&src->page));
-		hugetlb_set_page_subpool(&src->page, NULL);
+	if (hugetlb_folio_subpool(src)) {
+		hugetlb_set_folio_subpool(dst,
+					hugetlb_folio_subpool(src));
+		hugetlb_set_folio_subpool(src, NULL);
 	}
 
 	if (mode != MIGRATE_SYNC_NO_COPY)
include/linux/hugetlb.h renamed from include/linux/hugetlb.h~mm-hugetlb-add-hugetlb_folio_subpool-helpers +13 -2
@@ -718,18 +718,29 @@ extern unsigned int default_hstate_idx;
 
 #define default_hstate (hstates[default_hstate_idx])
 
+static inline struct hugepage_subpool *hugetlb_folio_subpool(struct folio *folio)
+{
+	return (void *)folio_get_private_1(folio);
+}
+
 /*
  * hugetlb page subpool pointer located in hpage[1].private
  */
 static inline struct hugepage_subpool *hugetlb_page_subpool(struct page *hpage)
 {
-	return (void *)page_private(hpage + SUBPAGE_INDEX_SUBPOOL);
+	return hugetlb_folio_subpool(page_folio(hpage));
+}
+
+static inline void hugetlb_set_folio_subpool(struct folio *folio,
+					struct hugepage_subpool *subpool)
+{
+	folio_set_private_1(folio, (unsigned long)subpool);
 }
 
 static inline void hugetlb_set_page_subpool(struct page *hpage,
 					struct hugepage_subpool *subpool)
 {
-	set_page_private(hpage + SUBPAGE_INDEX_SUBPOOL, (unsigned long)subpool);
+	hugetlb_set_folio_subpool(page_folio(hpage), subpool);
 }
 
 static inline struct hstate *hstate_file(struct file *f)

_

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