Re: [PATCH] mm: Do not start/end writeback for pages stored in zswap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 11/06/2024 10:53, Chengming Zhou wrote:
On 2024/6/10 22:30, Usama Arif wrote:
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.

Signed-off-by: Usama Arif <usamaarif642@xxxxxxxxx>
Looks good to me, thanks.

Reviewed-by: Chengming Zhou <chengming.zhou@xxxxxxxxx>


Fororgot to add:

Suggested-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>


---
  mm/page_io.c | 2 --
  1 file changed, 2 deletions(-)

diff --git a/mm/page_io.c b/mm/page_io.c
index a360857cf75d..501784d79977 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -196,9 +196,7 @@ int swap_writepage(struct page *page, struct writeback_control *wbc)
  		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))) {




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux