As Dev reported[1], it's not ready to support batched unmapping for uffd case. Let's still fallback to per-page unmapping for the uffd case. [1] https://lore.kernel.org/linux-mm/20260116082721.275178-1-dev.jain@arm.com/ Reported-by: Dev Jain Suggested-by: Barry Song Signed-off-by: Baolin Wang --- mm/rmap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mm/rmap.c b/mm/rmap.c index f13480cb9f2e..172643092dcf 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -1953,6 +1953,9 @@ static inline unsigned int folio_unmap_pte_batch(struct folio *folio, if (pte_unused(pte)) return 1; + if (userfaultfd_wp(vma)) + return 1; + return folio_pte_batch(folio, pvmw->pte, pte, max_nr); } -- 2.47.3