mm: hugetlb_vmemmap: move PageVmemmapSelfHosted() check to split_vmemmap_huge_pmd()
authorMuchun Song <songmuchun@bytedance.com>
Mon, 27 Nov 2023 08:46:44 +0000 (16:46 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 11 Dec 2023 00:51:54 +0000 (16:51 -0800)
commitbe035a2acf1fa03caf77daff7d8a424f395cfb4c
treebbc7c8f5c12bbbdb864b92d0c8858220aae9deed
parentfb93ed63345f67f676cd3569057e8e7c2b58aed7
mm: hugetlb_vmemmap: move PageVmemmapSelfHosted() check to split_vmemmap_huge_pmd()

To check a page whether it is self-hosted needs to traverse the page table
(e.g.  pmd_off_k()), however, we already have done this in the next
calling of vmemmap_remap_range().  Moving PageVmemmapSelfHosted() check to
vmemmap_pmd_entry() could simplify the code a bit.

Link: https://lkml.kernel.org/r/20231127084645.27017-4-songmuchun@bytedance.com
Signed-off-by: Muchun Song <songmuchun@bytedance.com>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/hugetlb_vmemmap.c