Re: [PATCH v2] mm: make folio_pte_batch available outside of mm/memory.c

From: David Hildenbrand
Date: Tue Feb 27 2024 - 10:11:14 EST


On 27.02.24 11:42, Barry Song wrote:
From: Barry Song <v-songbaohua@xxxxxxxx>

madvise, mprotect and some others might need folio_pte_batch to check if
a range of PTEs are completely mapped to a large folio with contiguous
physical addresses. Let's make it available in mm/internal.h.


Would have added

"
While at it, add proper kernel doc and sanity-check more input parameters using two additional VM_WARN_ON_FOLIO().
"

Acked-by: David Hildenbrand <david@xxxxxxxxxx>


--
Cheers,

David / dhildenb