Re: [PATCH v2 6/8] mm/internal: add set_softleaf_ptes
From: Barry Song
Date: Sat Sep 05 2026 - 06:53:21 EST
On Tue, Sep 1, 2026 at 1:44 PM Dev Jain <dev.jain@xxxxxxx> wrote:
>
> Currently we have a helper called set_ptes() which is used to set
> consecutive present ptes in the pgtables. To do the same operation but
> to set "consecutive" nonpresent (softleaf) ptes, add set_softleaf_ptes().
>
> The softleaves which have a notion of consecutivity is swap softleaf,
> and those grouped by softeaf_has_pfn(). The latter is trivial; future
> code can convert present ptes pointing to the same large folio to
> swap softleaves with consecutive offsets using this helper.
>
> The other case is softleaf markers. They do not have a notion of a swap
> offset or PFN, so future code can use set_softleaf_ptes() to store
> multiple (same) markers on the ptes.
>
> Signed-off-by: Dev Jain <dev.jain@xxxxxxx>
> ---
Reviewed-by: Barry Song <baohua@xxxxxxxxxx>