Re: [PATCH v2 2/4] mm: smaller folio_pte_batch() improvements

From: Zi Yan
Date: Wed Jul 02 2025 - 10:24:16 EST


On 2 Jul 2025, at 6:49, David Hildenbrand wrote:

> Let's clean up a bit:
>
> (1) No need for start_ptep vs. ptep anymore, we can simply use ptep.
>
> (2) Let's switch to "unsigned int" for everything. Negative values do
> not make sense.
>
> (3) We can simplify the code by leaving the pte unchanged after the
> pte_same() check.
>
> (4) Clarify that we should never exceed a single VMA; it indicates a
> problem in the caller.
>
> No functional change intended.
>
> Reviewed-by: Lance Yang <lance.yang@xxxxxxxxx>
> Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
> Reviewed-by: Oscar Salvador <osalvador@xxxxxxx>
> Signed-off-by: David Hildenbrand <david@xxxxxxxxxx>
> ---
> mm/internal.h | 37 +++++++++++++++----------------------
> 1 file changed, 15 insertions(+), 22 deletions(-)
>
Reviewed-by: Zi Yan <ziy@xxxxxxxxxx>

Best Regards,
Yan, Zi