The patch titled Subject: mm-swap-allow-cache-reclaim-to-skip-slot-cache-fix has been added to the -mm mm-unstable branch. Its filename is mm-swap-allow-cache-reclaim-to-skip-slot-cache-fix.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-swap-allow-cache-reclaim-to-skip-slot-cache-fix.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Barry Song <21cnbao@xxxxxxxxx> Subject: mm-swap-allow-cache-reclaim-to-skip-slot-cache-fix Date: Mon, 5 Aug 2024 13:53:24 +1200 small folios should have nr_pages == 1 but not nr_page == 0 Link: https://lkml.kernel.org/r/20240805015324.45134-1-21cnbao@xxxxxxxxx Signed-off-by: Barry Song <21cnbao@xxxxxxxxx> Cc: Chris Li <chrisl@xxxxxxxxxx> Cc: "Huang, Ying" <ying.huang@xxxxxxxxx> Cc: Hugh Dickins <hughd@xxxxxxxxxx> Cc: Kairui Song <ryncsn@xxxxxxxxx> Cc: Kalesh Singh <kaleshsingh@xxxxxxxxxx> Cc: Ryan Roberts <ryan.roberts@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/swapfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/swapfile.c~mm-swap-allow-cache-reclaim-to-skip-slot-cache-fix +++ a/mm/swapfile.c @@ -224,7 +224,7 @@ static int __try_to_reclaim_swap(struct spin_lock(&si->lock); /* Only sinple page folio can be backed by zswap */ - if (!nr_pages) + if (nr_pages == 1) zswap_invalidate(entry); swap_entry_range_free(si, entry, nr_pages); spin_unlock(&si->lock); _ Patches currently in -mm which might be from 21cnbao@xxxxxxxxx are mm-swap-allow-cache-reclaim-to-skip-slot-cache-fix.patch