From: Nhat Pham Date: Tue, 6 Aug 2024 00:34:03 +0000 (-0700) Subject: zswap: implement a second chance algorithm for dynamic zswap shrinker (fix) X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=f26951aa1d36ed635c0859f1c9e613d946f82906;p=users%2Fjedix%2Flinux-maple.git zswap: implement a second chance algorithm for dynamic zswap shrinker (fix) Fix a small mistake in the referenced bit documentation. Link: https://lkml.kernel.org/r/20240806003403.3142387-1-nphamcs@gmail.com Signed-off-by: Nhat Pham Acked-by: Yosry Ahmed Cc: Chengming Zhou Cc: Johannes Weiner Cc: Shakeel Butt Cc: Takero Funaki Signed-off-by: Andrew Morton --- diff --git a/mm/zswap.c b/mm/zswap.c index 92ee0dc248cdb..df66ab102d276 100644 --- a/mm/zswap.c +++ b/mm/zswap.c @@ -188,8 +188,8 @@ static struct shrinker *zswap_shrinker; * decompression. For a same value filled page length is 0, and both * pool and lru are invalid and must be ignored. * referenced - true if the entry recently entered the zswap pool. Unset by the - * dynamic shrinker. The entry is only reclaimed by the dynamic - * shrinker if referenced is unset. See comments in the shrinker + * writeback logic. The entry is only reclaimed by the writeback + * logic if referenced is unset. See comments in the shrinker * section for context. * pool - the zswap_pool the entry's data is in * handle - zpool allocation handle that stores the compressed page data