]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm, swap: simplify folio swap allocation
authorKairui Song <kasong@tencent.com>
Mon, 24 Feb 2025 18:02:12 +0000 (02:02 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 28 Feb 2025 01:00:32 +0000 (17:00 -0800)
commit86adc4b1c5e95372e0f780aed983059cee2ea4b0
tree6eb7dead6bb3784a3aec639d1ffff3cbe7f92891
parentfb9cb8a61a84547695be330209398557c78d8480
mm, swap: simplify folio swap allocation

With slot cache gone, clean up the allocation helpers even more.
folio_alloc_swap will be the only entry for allocation and adding the
folio to swap cache (except suspend), making it opposite of
folio_free_swap.

Link: https://lkml.kernel.org/r/20250224180212.22802-8-ryncsn@gmail.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 <v-songbaohua@oppo.com>
Cc: Chris Li <chrisl@kernel.org>
Cc: "Huang, Ying" <ying.huang@linux.alibaba.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Kalesh Singh <kaleshsingh@google.com>
Cc: Matthew Wilcow (Oracle) <willy@infradead.org>
Cc: Nhat Pham <nphamcs@gmail.com>
Cc: Yosry Ahmed <yosryahmed@google.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/swap.h
mm/shmem.c
mm/swap.h
mm/swap_state.c
mm/swapfile.c
mm/vmscan.c