swap: avoid a redundant pte map if ra window is 1
authorKairui Song <kasong@tencent.com>
Mon, 19 Dec 2022 18:58:38 +0000 (02:58 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 19 Jan 2023 01:12:45 +0000 (17:12 -0800)
commit18ad72f5b7186336646182b17e0654bf907b39e6
treec40e316a0f982f865b48a4413b544090a2fbc8da
parent3f79b187ad2f677047a1f1104bfb8a81b58b67d5
swap: avoid a redundant pte map if ra window is 1

Avoid a redundant pte map/unmap when swap readahead window is 1.

Link: https://lkml.kernel.org/r/20221219185840.25441-3-ryncsn@gmail.com
Signed-off-by: Kairui Song <kasong@tencent.com>
Reviewed-by: "Huang, Ying" <ying.huang@intel.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/swap_state.c