Re: [PATCH 1/2] mm/khugepaged: do synchronous writeback for MADV_COLLAPSE

From: Lorenzo Stoakes
Date: Mon Nov 10 2025 - 14:50:55 EST


On Tue, Nov 11, 2025 at 01:10:03AM +0530, Garg, Shivank wrote:
> I bisected the crash on mm-unstable
>
> b14d61d8fe442b1cc2d7591cf040a6dcd7fe2dd8 is the first bad commit
> commit b14d61d8fe442b1cc2d7591cf040a6dcd7fe2dd8
> Author: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
> Date: Sat Nov 8 17:08:18 2025 +0000
>
> mm: eliminate is_swap_pte() when softleaf_from_pte() suffices
>
> In cases where we can simply utilise the fact that softleaf_from_pte()
> treats present entries as if they were none entries and thus eliminate
> spurious uses of is_swap_pte(), do so.
>
> No functional change intended.

Ah fun :)

Thanks, this is very likely a bug that I am about to fix in the series that
was reported on review.

Could you try the attached fix-patch please?

Note that this might not apply against mm-unstable, in which case replace
'softleaf' with 'leafent' :) as there was a rename in v2.

Cheers, Lorenzo

----8<----