Commit 0b376f1e authored by Aneesh Kumar K.V's avatar Aneesh Kumar K.V Committed by Andrew Morton
Browse files

mm/hugetlb_vmemmap: rename ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP

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: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Reviewed-by: default avatarMuchun 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: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 87a7ae75
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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
+1 −8
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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)
{
Loading