]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mm, swap: check swap table directly for checking cache
authorKairui Song <kasong@tencent.com>
Fri, 19 Dec 2025 19:43:45 +0000 (03:43 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 31 Jan 2026 22:22:57 +0000 (14:22 -0800)
commit4984d746c80e888a89342d03e2b1ef20f804dff0
treee7ec91c2ea70e3b8a7f7d51af1faa30bc9e93f90
parent270f095179ff15b7c72f25dd6720dcab3d15cc9b
mm, swap: check swap table directly for checking cache

Instead of looking at the swap map, check swap table directly to tell if a
swap slot is cached.  Prepares for the removal of SWAP_HAS_CACHE.

Link: https://lkml.kernel.org/r/20251220-swap-table-p2-v5-16-8862a265a033@tencent.com
Signed-off-by: Kairui Song <kasong@tencent.com>
Reviewed-by: Baoquan He <bhe@redhat.com>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Barry Song <baohua@kernel.org>
Cc: Chris Li <chrisl@kernel.org>
Cc: Nhat Pham <nphamcs@gmail.com>
Cc: Rafael J. Wysocki (Intel) <rafael@kernel.org>
Cc: Yosry Ahmed <yosry.ahmed@linux.dev>
Cc: Deepanshu Kartikey <kartikey406@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Kairui Song <ryncsn@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/swap.h
mm/swap_state.c
mm/swapfile.c
mm/userfaultfd.c