Skip to contentSkip to conversation

mm-rmap-introduce-folio_remove_rmap_.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Dec 29, 2023

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm/rmap: introduce folio_remove_rmap_[pte|ptes|pmd]()
has been removed from the -mm tree. Its filename was
mm-rmap-introduce-folio_remove_rmap_.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: David Hildenbrand <[email protected]>
Subject: mm/rmap: introduce folio_remove_rmap_[pte|ptes|pmd]()
Date: Wed, 20 Dec 2023 23:44:47 +0100

Let's mimic what we did with folio_add_file_rmap_*() and folio_add_anon_rmap_*() so we can similarly replace page_remove_rmap() next.

Make the compiler always special-case on the granularity by using __always_inline.

We're adding folio_remove_rmap_ptes() handling right away, as we want to use that soon for batching rmap operations when unmapping PTE-mapped large folios.

---

 include/linux/rmap.h |    6 +++
 mm/rmap.c            |   80 +++++++++++++++++++++++++++++++++--------
 2 files changed, 71 insertions(+), 15 deletions(-)
include/linux/rmap.h renamed from include/linux/rmap.h~mm-rmap-introduce-folio_remove_rmap_ +6 -0
@@ -243,6 +243,12 @@ void folio_add_file_rmap_pmd(struct foli
 		struct vm_area_struct *);
 void page_remove_rmap(struct page *, struct vm_area_struct *,
 		bool compound);
+void folio_remove_rmap_ptes(struct folio *, struct page *, int nr_pages,
+		struct vm_area_struct *);
+#define folio_remove_rmap_pte(folio, page, vma) \
+	folio_remove_rmap_ptes(folio, page, 1, vma)
+void folio_remove_rmap_pmd(struct folio *, struct page *,
+		struct vm_area_struct *);
 
 void hugetlb_add_anon_rmap(struct folio *, struct vm_area_struct *,
 		unsigned long address, rmap_t flags);
mm/rmap.c renamed from mm/rmap.c~mm-rmap-introduce-folio_remove_rmap_ +65 -15

109 lines not on this page · raw message

_

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