Re: [PATCH mm-new v3 1/1] mm/khugepaged: abort collapse scan on non-swap entries
From: Lorenzo Stoakes
Date: Tue Oct 14 2025 - 12:11:06 EST
On Tue, Oct 14, 2025 at 05:33:18PM +0200, David Hildenbrand wrote:
> For the sake of progress, I assume the compiler will optimize out the
> additional pte_none() stuff.
>
> I absolutely, absolutely hate is_swap_pte(). To me, it makes the code more
> confusing that talking about something that is !present but also !none:
> there is something that is not an ordinary page table mapping.
Yeah it's nasty for sure.
I hate non-swap-entry swap entries with a passion.
We clearly need to rework this... :)
Naming is hard however...
>
> The underlying problem is how we hacked in non-swap into swap (and that's
> exactly where it gets confusing). Well, which this series is all about.
Yup
>
> So, I don't care in the end here.
I do still feel a single guard condition works better than having to know
implementaiton details so would still prefer this change to be made.
>
> --
> Cheers
>
> David / dhildenb
>
Cheers, Lorenzo