]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/swap: skip scanning cluster range if it's empty cluster
authorBaoquan He <bhe@redhat.com>
Wed, 5 Feb 2025 09:27:13 +0000 (17:27 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 4 Mar 2025 05:49:40 +0000 (21:49 -0800)
commit727c339f3272284ae091f61b617dea6e9400ddda
tree2d6aa90c19cb0d97f9e2ac3efc2b2bbd2150e952
parente5e8ed54ca43bd4d423e45d481d7a9db1a7679f9
mm/swap: skip scanning cluster range if it's empty cluster

Since ci->lock has been taken when isolating cluster from
si->free_clusters or taking si->percpu_cluster->next[order], it's
unnecessary to scan and check the cluster range availability if i'ts empty
cluster, and this can accelerate the huge page swapping.

Link: https://lkml.kernel.org/r/20250205092721.9395-5-bhe@redhat.com
Signed-off-by: Baoquan He <bhe@redhat.com>
Cc: Chris Li <chrisl@kernel.org>
Cc: Kairui Song <ryncsn@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/swapfile.c