mm/hugetlb_vmemmap: rename ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
authorAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Wed, 12 Apr 2023 05:00:25 +0000 (10:30 +0530)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 18 Apr 2023 23:30:09 +0000 (16:30 -0700)
Now we use ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP config option to
indicate devdax and hugetlb vmemmap optimization support.  Hence rename
that to a generic ARCH_WANT_OPTIMIZE_VMEMMAP

Link: https://lkml.kernel.org/r/20230412050025.84346-2-aneesh.kumar@linux.ibm.com
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
Cc: Joao Martins <joao.m.martins@oracle.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Tarun Sahu <tsahu@linux.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/loongarch/Kconfig
arch/s390/Kconfig
arch/x86/Kconfig
fs/Kconfig
include/linux/mm.h
mm/Kconfig

index e1e3a38289624e2202da59ad2767364138e84493..5abd13093c1a9323cc4e56cee70d96bf6293f9d7 100644 (file)
@@ -53,8 +53,8 @@ config LOONGARCH
        select ARCH_USE_QUEUED_RWLOCKS
        select ARCH_USE_QUEUED_SPINLOCKS
        select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
-       select ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
        select ARCH_WANT_LD_ORPHAN_WARN
+       select ARCH_WANT_OPTIMIZE_VMEMMAP
        select ARCH_WANTS_NO_INSTR
        select BUILDTIME_TABLE_SORT
        select COMMON_CLK
index 548b5b5870032f0e2b987eee0eb11c890b5ae5fe..61d778397720a5243043e508d1712d049371555c 100644 (file)
@@ -126,8 +126,8 @@ config S390
        select ARCH_WANTS_DYNAMIC_TASK_STRUCT
        select ARCH_WANTS_NO_INSTR
        select ARCH_WANT_DEFAULT_BPF_JIT
-       select ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
        select ARCH_WANT_IPC_PARSE_VERSION
+       select ARCH_WANT_OPTIMIZE_VMEMMAP
        select BUILDTIME_TABLE_SORT
        select CLONE_BACKWARDS2
        select DMA_OPS if PCI
index df21fba77db10a65665edc63388508bb5710c3ee..4c123315c440adc325b56c9322767761cee5a0d1 100644 (file)
@@ -126,8 +126,8 @@ config X86
        select ARCH_WANTS_NO_INSTR
        select ARCH_WANT_GENERAL_HUGETLB
        select ARCH_WANT_HUGE_PMD_SHARE
-       select ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP  if X86_64
        select ARCH_WANT_LD_ORPHAN_WARN
+       select ARCH_WANT_OPTIMIZE_VMEMMAP       if X86_64
        select ARCH_WANTS_THP_SWAP              if X86_64
        select ARCH_HAS_PARANOID_L1D_FLUSH
        select BUILDTIME_TABLE_SORT
index e99830c650336a403b6d92ebe431bfbac671c667..cc07a0cd317265f15788348c633085c020ce1c13 100644 (file)
@@ -250,16 +250,9 @@ config HUGETLBFS
 config HUGETLB_PAGE
        def_bool HUGETLBFS
 
-#
-# Select this config option from the architecture Kconfig, if it is preferred
-# to enable the feature of HugeTLB Vmemmap Optimization (HVO).
-#
-config ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
-       bool
-
 config HUGETLB_PAGE_OPTIMIZE_VMEMMAP
        def_bool HUGETLB_PAGE
-       depends on ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
+       depends on ARCH_WANT_OPTIMIZE_VMEMMAP
        depends on SPARSEMEM_VMEMMAP
 
 config HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON
index 21a7e24600845eae81947ce742c2ff9927608614..0b514de4314395291eaece956bf9d7747aef9d96 100644 (file)
@@ -3561,7 +3561,7 @@ void vmemmap_free(unsigned long start, unsigned long end,
                struct vmem_altmap *altmap);
 #endif
 
-#ifdef CONFIG_ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
+#ifdef CONFIG_ARCH_WANT_OPTIMIZE_VMEMMAP
 static inline bool vmemmap_can_optimize(struct vmem_altmap *altmap,
                                           struct dev_pagemap *pgmap)
 {
index 6ee3b48ed29819f3fff743bc9e697f0ae4f6d95b..5ca8fcfae243c2f0e40810af77efa444d3578973 100644 (file)
@@ -479,6 +479,12 @@ config SPARSEMEM_VMEMMAP
          SPARSEMEM_VMEMMAP uses a virtually mapped memmap to optimise
          pfn_to_page and page_to_pfn operations.  This is the most
          efficient option when sufficient kernel resources are available.
+#
+# Select this config option from the architecture Kconfig, if it is preferred
+# to enable the feature of HugeTLB/dev_dax vmemmap optimization.
+#
+config ARCH_WANT_OPTIMIZE_VMEMMAP
+       bool
 
 config HAVE_MEMBLOCK_PHYS_MAP
        bool