Re: [PATCH v2] mm: free the swap slot of a dirty swapin folio
From: David Hildenbrand (Arm)
Date: Wed Dec 02 2026 - 08:50:32 EST
> I'm not sure this comment really helps explain why being dirty matters
> here, which I think is the interesting insight captured by your commit
> message. The idea is that dirty folio == swap slot is stale, right?
>
> What about:
>
> /*
> * Free the swapcache if the folio is dirty (it has diverged from its
> * swap slot) or if an exclusive write will make it diverge.
> */
I'll queue it as is for now. Having the folio dirty naturally implies that the
data on disk is old and we need another writeback + cannot easily drop the folio.
Thanks for the review, appreciated!
--
Cheers,
David