The patch titled Subject: mm: do not start/end writeback for pages stored in zswap has been added to the -mm mm-unstable branch. Its filename is mm-do-not-start-end-writeback-for-pages-stored-in-zswap.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-do-not-start-end-writeback-for-pages-stored-in-zswap.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: Usama Arif <usamaarif642@xxxxxxxxx> Subject: mm: do not start/end writeback for pages stored in zswap Date: Mon, 10 Jun 2024 15:30:37 +0100 start/end writeback combination incorrectly increments NR_WRITTEN counter, eventhough the pages aren't written to disk. Pages successfully stored in zswap should just unlock folio and return from writepage. Link: https://lkml.kernel.org/r/20240610143037.812955-1-usamaarif642@xxxxxxxxx Signed-off-by: Usama Arif <usamaarif642@xxxxxxxxx> Cc: Chengming Zhou <chengming.zhou@xxxxxxxxx> Cc: Johannes Weiner <hannes@xxxxxxxxxxx> Cc: kernel-team@xxxxxxxx Cc: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> Cc: Nhat Pham <nphamcs@xxxxxxxxx> Cc: Yosry Ahmed <yosryahmed@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/page_io.c | 2 -- 1 file changed, 2 deletions(-) --- a/mm/page_io.c~mm-do-not-start-end-writeback-for-pages-stored-in-zswap +++ a/mm/page_io.c @@ -196,9 +196,7 @@ int swap_writepage(struct page *page, st return ret; } if (zswap_store(folio)) { - folio_start_writeback(folio); folio_unlock(folio); - folio_end_writeback(folio); return 0; } if (!mem_cgroup_zswap_writeback_enabled(folio_memcg(folio))) { _ Patches currently in -mm which might be from usamaarif642@xxxxxxxxx are mm-do-not-start-end-writeback-for-pages-stored-in-zswap.patch