* [merged mm-hotfixes-stable] mm-zswap-dont-return-lru_skip-if-we-have-dropped-lru-lock.patch removed from -mm tree
@ 2024-02-08 5:21 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-02-08 5:21 UTC (permalink / raw)
To: mm-commits, yosryahmed, nphamcs, hannes, chriscli, zhouchengming,
akpm
The quilt patch titled
Subject: mm/zswap: don't return LRU_SKIP if we have dropped lru lock
has been removed from the -mm tree. Its filename was
mm-zswap-dont-return-lru_skip-if-we-have-dropped-lru-lock.patch
This patch was dropped because it was merged into the mm-hotfixes-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Chengming Zhou <zhouchengming@bytedance.com>
Subject: mm/zswap: don't return LRU_SKIP if we have dropped lru lock
Date: Sun, 28 Jan 2024 13:28:49 +0000
LRU_SKIP can only be returned if we don't ever dropped lru lock, or we
need to return LRU_RETRY to restart from the head of lru list.
Otherwise, the iteration might continue from a cursor position that was
freed while the locks were dropped.
Actually we may need to introduce another LRU_STOP to really terminate the
ongoing shrinking scan process, when we encounter a warm page already in
the swap cache. The current list_lru implementation doesn't have this
function to early break from __list_lru_walk_one.
Link: https://lkml.kernel.org/r/20240126-zswap-writeback-race-v2-1-b10479847099@bytedance.com
Fixes: b5ba474f3f51 ("zswap: shrink zswap pool based on memory pressure")
Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Nhat Pham <nphamcs@gmail.com>
Cc: Chris Li <chriscli@google.com>
Cc: Yosry Ahmed <yosryahmed@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/zswap.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- a/mm/zswap.c~mm-zswap-dont-return-lru_skip-if-we-have-dropped-lru-lock
+++ a/mm/zswap.c
@@ -895,10 +895,8 @@ static enum lru_status shrink_memcg_cb(s
* into the warmer region. We should terminate shrinking (if we're in the dynamic
* shrinker context).
*/
- if (writeback_result == -EEXIST && encountered_page_in_swapcache) {
- ret = LRU_SKIP;
+ if (writeback_result == -EEXIST && encountered_page_in_swapcache)
*encountered_page_in_swapcache = true;
- }
goto put_unlock;
}
_
Patches currently in -mm which might be from zhouchengming@bytedance.com are
mm-zswap-make-sure-each-swapfile-always-have-zswap-rb-tree.patch
mm-zswap-split-zswap-rb-tree.patch
mm-zswap-fix-race-between-lru-writeback-and-swapoff.patch
mm-list_lru-remove-list_lru_putback.patch
mm-zswap-add-more-comments-in-shrink_memcg_cb.patch
mm-zswap-invalidate-zswap-entry-when-swap-entry-free.patch
mm-zswap-stop-lru-list-shrinking-when-encounter-warm-region.patch
mm-zswap-remove-duplicate_entry-debug-value.patch
mm-zswap-only-support-zswap_exclusive_loads_enabled.patch
mm-zswap-zswap-entry-doesnt-need-refcount-anymore.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-08 5:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-08 5:21 [merged mm-hotfixes-stable] mm-zswap-dont-return-lru_skip-if-we-have-dropped-lru-lock.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.