]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/swapfile.c: introduce function alloc_swap_scan_list()
authorChris Li <chrisl@kernel.org>
Tue, 12 Aug 2025 07:10:58 +0000 (00:10 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 13 Sep 2025 23:55:00 +0000 (16:55 -0700)
commit348e474f18e12c5a27422d0ae3b4316b13dbe3c9
tree70f27cda97f27285d36e7c4e1b9c217fa5243659
parent9d246d7410c9c4187e37cc3bfd1284d06b697566
mm/swapfile.c: introduce function alloc_swap_scan_list()

Patch series "mm/swapfile.c and swap.h cleanup", v3.

This patch series, which builds on Kairui's swap improve cluster scan series.
https://lore.kernel.org/linux-mm/20250806161748.76651-1-ryncsn@gmail.com/

It introduces a new function, alloc_swap_scan_list(), for swapfile.c.

It also cleans up swap.h by removing comments that reference fields that
have been deleted.

There are no functional changes in this two-patch series.

This patch (of 2):

alloc_swap_scan_list() will scan the whole list or the first cluster.

This reduces the repeat patterns of isolating a cluster then scanning that
cluster.  As a result, cluster_alloc_swap_entry() is shorter and
shallower.

No functional change.

Link: https://lkml.kernel.org/r/20250812-swap-scan-list-v3-0-6d73504d267b@kernel.org
Link: https://lkml.kernel.org/r/20250812-swap-scan-list-v3-1-6d73504d267b@kernel.org
Signed-off-by: Chris Li <chrisl@kernel.org>
Reviewed-by: Kairui Song <kasong@tencent.com>
Acked-by: Nhat Pham <nphamcs@gmail.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Barry Song <baohua@kernel.org>
Cc: "Huang, Ying" <ying.huang@linux.alibaba.com>
Cc: Kemeng Shi <shikemeng@huaweicloud.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/swapfile.c