]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: swap: allow cache reclaim to skip slot cache
authorKairui Song <kasong@tencent.com>
Wed, 31 Jul 2024 06:49:18 +0000 (23:49 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 17 Aug 2024 00:52:46 +0000 (17:52 -0700)
commit7666a2d26cd587c7017fd15da617838aca3c770f
tree7e38f8628b18c8d880120bb2bd7fbbd1ada18298
parentcc7b0442ff1662e7d708f150dd2abdb8d1a90d23
mm: swap: allow cache reclaim to skip slot cache

Currently we free the reclaimed slots through slot cache even if the slot
is required to be empty immediately.  As a result the reclaim caller will
see the slot still occupied even after a successful reclaim, and need to
keep reclaiming until slot cache get flushed.  This caused ineffective or
over reclaim when SWAP is under stress.

So introduce a new flag allowing the slot to be emptied bypassing the slot
cache.

Link: https://lkml.kernel.org/r/20240730-swap-allocator-v5-6-cb9c148b9297@kernel.org
Signed-off-by: Kairui Song <kasong@tencent.com>
Reported-by: Barry Song <21cnbao@gmail.com>
Cc: Chris Li <chrisl@kernel.org>
Cc: "Huang, Ying" <ying.huang@intel.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Kalesh Singh <kaleshsingh@google.com>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/swapfile.c