• Peter Xu's avatar
    mm: introduce vma_pgtable_walk_{begin|end}() · 239e9a90
    Peter Xu authored
    Introduce per-vma begin()/end() helpers for pgtable walks.  This is a
    preparation work to merge hugetlb pgtable walkers with generic mm.
    
    The helpers need to be called before and after a pgtable walk, will start
    to be needed if the pgtable walker code supports hugetlb pages.  It's a
    hook point for any type of VMA, but for now only hugetlb uses it to
    stablize the pgtable pages from getting away (due to possible pmd
    unsharing).
    
    Link: https://lkml.kernel.org/r/20240327152332.950956-5-peterx@redhat.comSigned-off-by: default avatarPeter Xu <peterx@redhat.com>
    Reviewed-by: default avatarChristoph Hellwig <hch@infradead.org>
    Reviewed-by: default avatarMuchun Song <muchun.song@linux.dev>
    Tested-by: default avatarRyan Roberts <ryan.roberts@arm.com>
    Cc: Andrea Arcangeli <aarcange@redhat.com>
    Cc: Andrew Jones <andrew.jones@linux.dev>
    Cc: Aneesh Kumar K.V (IBM) <aneesh.kumar@kernel.org>
    Cc: Axel Rasmussen <axelrasmussen@google.com>
    Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
    Cc: David Hildenbrand <david@redhat.com>
    Cc: James Houghton <jthoughton@google.com>
    Cc: Jason Gunthorpe <jgg@nvidia.com>
    Cc: John Hubbard <jhubbard@nvidia.com>
    Cc: Kirill A. Shutemov <kirill@shutemov.name>
    Cc: Lorenzo Stoakes <lstoakes@gmail.com>
    Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
    Cc: Michael Ellerman <mpe@ellerman.id.au>
    Cc: "Mike Rapoport (IBM)" <rppt@kernel.org>
    Cc: Rik van Riel <riel@surriel.com>
    Cc: Vlastimil Babka <vbabka@suse.cz>
    Cc: Yang Shi <shy828301@gmail.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    239e9a90
memory.c 174 KB