Re: [PATCH v3 07/16] mm: avoid unnecessary use of is_swap_pmd()

Vlastimil Babka
2025-11-21T17:42:09Z

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()

?

> 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@oracle.com>

Reviewed-by: Vlastimil Babka <vbabka@suse.cz>