Re: [RFC PATCH v3 0/8] batch lookups in follow_page_mask()
From: Christoph Hellwig
Date: Tue Aug 25 2026 - 03:52:41 EST
On Mon, Aug 10, 2026 at 10:51:49PM -0400, Rik van Riel wrote:
> follow_page_mask() walks the page tables one page at a time, even when the
> caller asked for a whole run of contiguous pages. Every page of a large folio
> re-enters the pmd/pud/pte walk and re-takes the page table lock.
>
> This series changes follow_page_mask() to return a page count and a fill an
> array of pages, instead of a single struct page, so a walker can hand back
> more than one page per call.
And what many including the most performance critical callers want
instead is really a single bio_vec. Maybe we can go the extra step for
that, as it would reduce the number of calls into gup significantly.