Re: [RFC PATCH v3 7/8] mm/gup: walk multiple PTEs per follow_page_pte() call
From: Rik van Riel
Date: Wed Oct 14 2026 - 21:50:38 EST
On Thu, 2026-10-15 at 05:54 +0800, Yuan-Hao Hsu wrote:
>
> You already mentioned on 3/8 moving the gup_fill_pages() call out of
> the lock so the PUD path can share the helper; this makes it more
> than a cleanup. Storing pages[] under the lock is cheap; could the
> flushes move after pte_unmap_unlock() and run over pages[0..nr), the
> way follow_pmd_mask() and follow_pud_mask() do it after 5/8 and the
> way __get_user_pages() did it before the series? With pages == NULL
> there is nothing to flush either way.
>
Good point. I'll move the cache flushing to a separate
function for v4.
Thank you for pointing out this issue.
--
All Rights Reversed.