On Sat, Dec 20, 2025 at 3:45 AM Kairui Song wrote: > > From: Kairui Song > > The current swap entry allocation/freeing workflow has never had a clear > definition. This makes it hard to debug or add new optimizations. > > This commit introduces a proper definition of how swap entries would be > allocated and freed. Now, most operations are folio based, so they will > never exceed one swap cluster, and we now have a cleaner border between > swap and the rest of mm, making it much easier to follow and debug, > especially with new added sanity checks. Also making more optimization > possible. ... > > Cc: linux-pm@vger.kernel.org > Acked-by: Rafael J. Wysocki (Intel) > Signed-off-by: Kairui Song > --- Hi Andrew, Is it convenient for you to squash this attached fix into this patch? That's the two issues from Chris Mason and Lai Yi combined in a clean to apply format, only 3 lines change. There might be minor conflict by removing the WARN_ON in two following patches, but should be easy to resolve. I can send a v6 if that's troublesome.