]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: swap: add back full cluster when no entry is reclaimed
authorKemeng Shi <shikemeng@huaweicloud.com>
Mon, 24 Feb 2025 11:39:10 +0000 (19:39 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 4 Mar 2025 05:48:28 +0000 (21:48 -0800)
commitd8fee650bd5b388715bf5f18a7cb3bdabf3bb48d
treefb63213935c1e760612279393f95c757b12f73ca
parent0af6b142dc8aba3856bc4d2f9ff24fb97be8e5bb
mm: swap: add back full cluster when no entry is reclaimed

If no swap cache is reclaimed, cluster taken off from full_clusters list
will not be put in any list and we can't reclaime HAS_CACHE slots
efficiently.  Do relocate_cluster for such cluster to avoid inefficiency.

Link: https://lkml.kernel.org/r/20250224113910.522439-1-shikemeng@huaweicloud.com
Fixes: 3b644773eefd ("mm, swap: reduce contention on device lock")
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: Kairui Song <kasong@tencent.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/swapfile.c