Skip to content

Commit 0b376f1

Browse files
kvaneeshakpm00
authored andcommitted
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: 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>
1 parent 87a7ae7 commit 0b376f1

File tree

6 files changed

+11
-12
lines changed

6 files changed

+11
-12
lines changed

arch/loongarch/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ config LOONGARCH
5353
select ARCH_USE_QUEUED_RWLOCKS
5454
select ARCH_USE_QUEUED_SPINLOCKS
5555
select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
56-
select ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
5756
select ARCH_WANT_LD_ORPHAN_WARN
57+
select ARCH_WANT_OPTIMIZE_VMEMMAP
5858
select ARCH_WANTS_NO_INSTR
5959
select BUILDTIME_TABLE_SORT
6060
select COMMON_CLK

arch/s390/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ config S390
126126
select ARCH_WANTS_DYNAMIC_TASK_STRUCT
127127
select ARCH_WANTS_NO_INSTR
128128
select ARCH_WANT_DEFAULT_BPF_JIT
129-
select ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
130129
select ARCH_WANT_IPC_PARSE_VERSION
130+
select ARCH_WANT_OPTIMIZE_VMEMMAP
131131
select BUILDTIME_TABLE_SORT
132132
select CLONE_BACKWARDS2
133133
select DMA_OPS if PCI

arch/x86/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ config X86
126126
select ARCH_WANTS_NO_INSTR
127127
select ARCH_WANT_GENERAL_HUGETLB
128128
select ARCH_WANT_HUGE_PMD_SHARE
129-
select ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP if X86_64
130129
select ARCH_WANT_LD_ORPHAN_WARN
130+
select ARCH_WANT_OPTIMIZE_VMEMMAP if X86_64
131131
select ARCH_WANTS_THP_SWAP if X86_64
132132
select ARCH_HAS_PARANOID_L1D_FLUSH
133133
select BUILDTIME_TABLE_SORT

fs/Kconfig

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -250,16 +250,9 @@ config HUGETLBFS
250250
config HUGETLB_PAGE
251251
def_bool HUGETLBFS
252252

253-
#
254-
# Select this config option from the architecture Kconfig, if it is preferred
255-
# to enable the feature of HugeTLB Vmemmap Optimization (HVO).
256-
#
257-
config ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
258-
bool
259-
260253
config HUGETLB_PAGE_OPTIMIZE_VMEMMAP
261254
def_bool HUGETLB_PAGE
262-
depends on ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
255+
depends on ARCH_WANT_OPTIMIZE_VMEMMAP
263256
depends on SPARSEMEM_VMEMMAP
264257

265258
config HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON

include/linux/mm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3561,7 +3561,7 @@ void vmemmap_free(unsigned long start, unsigned long end,
35613561
struct vmem_altmap *altmap);
35623562
#endif
35633563

3564-
#ifdef CONFIG_ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
3564+
#ifdef CONFIG_ARCH_WANT_OPTIMIZE_VMEMMAP
35653565
static inline bool vmemmap_can_optimize(struct vmem_altmap *altmap,
35663566
struct dev_pagemap *pgmap)
35673567
{

mm/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,12 @@ config SPARSEMEM_VMEMMAP
479479
SPARSEMEM_VMEMMAP uses a virtually mapped memmap to optimise
480480
pfn_to_page and page_to_pfn operations. This is the most
481481
efficient option when sufficient kernel resources are available.
482+
#
483+
# Select this config option from the architecture Kconfig, if it is preferred
484+
# to enable the feature of HugeTLB/dev_dax vmemmap optimization.
485+
#
486+
config ARCH_WANT_OPTIMIZE_VMEMMAP
487+
bool
482488

483489
config HAVE_MEMBLOCK_PHYS_MAP
484490
bool

0 commit comments

Comments
 (0)