Re: [PATCH v2 4/4] mm: remove boolean output parameters from folio_pte_batch_ext()
From: Oscar Salvador
Date: Thu Jul 03 2025 - 05:17:37 EST
On Wed, Jul 02, 2025 at 12:49:26PM +0200, David Hildenbrand wrote:
> Instead, let's just allow for specifying through flags whether we want
> to have bits merged into the original PTE.
>
> For the madvise() case, simplify by having only a single parameter for
> merging young+dirty. For madvise_cold_or_pageout_pte_range() merging the
> dirty bit is not required, but also not harmful. This code is not that
> performance critical after all to really force all micro-optimizations.
>
> As we now have two pte_t * parameters, use PageTable() to make sure we
> are actually given a pointer at a copy of the PTE, not a pointer into
> an actual page table.
>
> Signed-off-by: David Hildenbrand <david@xxxxxxxxxx>
Although I think it'd be nice to have a comment pointing out why dirty-young bites
go together:
Reviewed-by: Oscar Salvador <osalvador@xxxxxxx>
--
Oscar Salvador
SUSE Labs