v1
2026-07-29
gup批处理PTE大页 · v1
用nr_pages和@end替换page_mask,批量化PTE映射的large folio,提升性能。
原始补丁链接
子 Patch(2)
1/2
mm/gup: pass an end address to follow_page_mask() and return a page count
follow_page_mask() reports how many pages the returned page covers with a page_mask: a bitmask of the enclosing naturally-aligned huge page. Callers turn that into a stride, which assumes the run is a
2/2
mm/gup: batch contiguous PTE-mapped large folios in follow_page_mask()
follow_page_mask() returns one page per call for a PTE-mapped large folio, so __get_user_pages() re-walks the page tables for every page of an mTHP even though the folio maps a contiguous run. The hug