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

From: Oscar Salvador
Date: Wed Jul 02 2025 - 04:42:29 EST


On Fri, Jun 27, 2025 at 01:55:08PM +0200, 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
>
> (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.
>
> Signed-off-by: David Hildenbrand <david@xxxxxxxxxx>

Hi David :-),

I have to confess that I fell in the same trap as Lorenzo wrt.
__pte_batch_clear_ignored changing the pte value.
So I'm not sure if it would be nice to place a little comment in
__pte_batch_clear_ignored claryfing that pte's value remains unchanged ?

Reviewed-by: Oscar Salvador <osalvador@xxxxxxx>


--
Oscar Salvador
SUSE Labs