Re: [PATCH v3 07/16] mm: avoid unnecessary use of is_swap_pmd()
From: Lorenzo Stoakes
Date: Fri Nov 21 2025 - 14:26:45 EST
On Fri, Nov 21, 2025 at 06:42:05PM +0100, Vlastimil Babka wrote:
> On 11/10/25 23:21, Lorenzo Stoakes wrote:
> > PMD 'non-swap' swap entries are currently used for PMD-level migration
> > entries and device private entries.
> >
> > To add to the confusion in this terminology we use is_swap_pmd() in an
> > inconsistent way similar to how is_swap_pte() was being used - sometimes
> > adopting the convention that pmd_none(), !pmd_present() implies PMD 'swap'
>
> !pmd_none()
>
> ?
Yeah sorry this is a typo.
Andrew, if it's easy to fix could you? If too late then never mind :)
>
> > entry, sometimes not.
> >
> > This patch handles the low-hanging fruit of cases where we can simply
> > substitute other predicates for is_swap_pmd().
> >
> > No functional change intended.
> >
> > Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
>
> Reviewed-by: Vlastimil Babka <vbabka@xxxxxxx>
>
Cheers, Lorenzo