mm-rmap-pass-rmap-flags-to-hugepage_add_anon_rmap.patch removed from -mm tree
The quilt patch titled
Subject: mm/rmap: pass rmap flags to hugepage_add_anon_rmap()
has been removed from the -mm tree. Its filename was
mm-rmap-pass-rmap-flags-to-hugepage_add_anon_rmap.patch
This patch was dropped because it was merged into mm-stable
------------------------------------------------------
From: David Hildenbrand <[email protected]>
Subject: mm/rmap: pass rmap flags to hugepage_add_anon_rmap()
Let's prepare for passing RMAP_EXCLUSIVE, similarly as we do for page_add_anon_rmap() now. RMAP_COMPOUND is implicit for hugetlb pages and ignored.
Signed-off-by David Hildenbrand <[email protected]>
Acked-by Vlastimil Babka <[email protected]>
Cc Andrea Arcangeli <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc David Rientjes <[email protected]>
Cc Don Dutile <[email protected]>
Cc Hugh Dickins <[email protected]>
Cc Jan Kara <[email protected]>
Cc Jann Horn <[email protected]>
Cc Jason Gunthorpe <[email protected]>
Cc John Hubbard <[email protected]>
Cc Khalid Aziz <[email protected]>
Cc "Kirill A. Shutemov" <[email protected]>
Cc Liang Zhang <[email protected]>
Cc "Matthew Wilcox (Oracle)" <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Mike Kravetz <[email protected]>
Cc Mike Rapoport <[email protected]>
Cc Nadav Amit <[email protected]>
Cc Oded Gabbay <[email protected]>
Cc Oleg Nesterov <[email protected]>
Cc Pedro Demarchi Gomes <[email protected]>
Cc Peter Xu <[email protected]>
Cc Rik van Riel <[email protected]>
Cc Roman Gushchin <[email protected]>
Cc Shakeel Butt <[email protected]>
Cc Yang Shi <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
include/linux/rmap.h | 2 +- mm/migrate.c | 3 ++- mm/rmap.c | 9 ++++++--- 3 files changed, 9 insertions(+), 5 deletions(-)
include/linux/rmap.h renamed from include/linux/rmap.h~mm-rmap-pass-rmap-flags-to-hugepage_add_anon_rmap +1 -1
@@ -191,7 +191,7 @@ void page_add_file_rmap(struct page *, svoid page_remove_rmap (struct page *,struct vm_area_struct *,bool compound);void hugepage_add_anon_rmap (struct page *,struct vm_area_struct *, -unsigned long address); +unsigned long address,rmap_t flags);void hugepage_add_new_anon_rmap (struct page *,struct vm_area_struct *,unsigned long address);
mm/migrate.c renamed from mm/migrate.c~mm-rmap-pass-rmap-flags-to-hugepage_add_anon_rmap +2 -1
@@ -232,7 +232,8 @@ static bool remove_migration_pte(struct pte =pte_mkhuge (pte); pte =arch_make_huge_pte (pte, shift, vma->vm_flags);if (folio_test_anon (folio)) -hugepage_add_anon_rmap (new, vma, pvmw.address); +hugepage_add_anon_rmap (new, vma, pvmw.address, +RMAP_NONE );else page_dup_file_rmap (new, true);set_huge_pte_at (vma->vm_mm, pvmw.address, pvmw.pte, pte);
mm/rmap.c renamed from mm/rmap.c~mm-rmap-pass-rmap-flags-to-hugepage_add_anon_rmap +6 -3
@@ -2391,9 +2391,11 @@ void rmap_walk_locked(struct folio *foli* The following two functions are for anonymous (private mapped) hugepages. * Unlike common anonymous pages, anonymous hugepages have no accounting code * and no lru code, because we handle hugepages differently from common pages. +* +* RMAP_COMPOUND is ignored. */ -void hugepage_add_anon_rmap (struct page *page, -struct vm_area_struct *vma,unsigned long address) +void hugepage_add_anon_rmap (struct page *page,struct vm_area_struct *vma, +unsigned long address,rmap_t flags) {struct anon_vma *anon_vma = vma->anon_vma;int first;
@@ -2403,7 +2405,8 @@ void hugepage_add_anon_rmap(struct page/* address might be in next vma when migration races vma_adjust */ first =atomic_inc_and_test (compound_mapcount_ptr (page));if (first) -__page_set_anon_rmap (page, vma, address,0 ); +__page_set_anon_rmap (page, vma, address, + !!(flags &RMAP_EXCLUSIVE )); } void hugepage_add_new_anon_rmap(struct page *page,
_
Patches currently in -mm which might be from [email protected] are