Skip to content

Commit 6c5dd27

Browse files
committed
mm/hugetlb_vmemmap: rename ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2217652 Conflicts: RHEL doesn't support loong arch, so that hunk was dropped. The s390 hunk depends on commit 00a34d5 ("s390: select ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP"). I didn't pull that in because I have no way to test it, and this fix was specifically aimed at ppc64le. commit 0b376f1 Author: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> Date: Wed Apr 12 10:30:25 2023 +0530 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> Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
1 parent 8ad3228 commit 6c5dd27

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

arch/x86/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ config X86
123123
select ARCH_WANTS_NO_INSTR
124124
select ARCH_WANT_GENERAL_HUGETLB
125125
select ARCH_WANT_HUGE_PMD_SHARE
126-
select ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP if X86_64
127126
select ARCH_WANT_LD_ORPHAN_WARN
127+
select ARCH_WANT_OPTIMIZE_VMEMMAP if X86_64
128128
select ARCH_WANTS_THP_SWAP if X86_64
129129
select ARCH_HAS_PARANOID_L1D_FLUSH
130130
select BUILDTIME_TABLE_SORT

fs/Kconfig

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -245,16 +245,9 @@ config HUGETLBFS
245245
config HUGETLB_PAGE
246246
def_bool HUGETLBFS
247247

248-
#
249-
# Select this config option from the architecture Kconfig, if it is preferred
250-
# to enable the feature of HugeTLB Vmemmap Optimization (HVO).
251-
#
252-
config ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
253-
bool
254-
255248
config HUGETLB_PAGE_OPTIMIZE_VMEMMAP
256249
def_bool HUGETLB_PAGE
257-
depends on ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
250+
depends on ARCH_WANT_OPTIMIZE_VMEMMAP
258251
depends on SPARSEMEM_VMEMMAP
259252

260253
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
@@ -3240,7 +3240,7 @@ void vmemmap_free(unsigned long start, unsigned long end,
32403240
struct vmem_altmap *altmap);
32413241
#endif
32423242

3243-
#ifdef CONFIG_ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
3243+
#ifdef CONFIG_ARCH_WANT_OPTIMIZE_VMEMMAP
32443244
static inline bool vmemmap_can_optimize(struct vmem_altmap *altmap,
32453245
struct dev_pagemap *pgmap)
32463246
{

mm/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,12 @@ config SPARSEMEM_VMEMMAP
440440
SPARSEMEM_VMEMMAP uses a virtually mapped memmap to optimise
441441
pfn_to_page and page_to_pfn operations. This is the most
442442
efficient option when sufficient kernel resources are available.
443+
#
444+
# Select this config option from the architecture Kconfig, if it is preferred
445+
# to enable the feature of HugeTLB/dev_dax vmemmap optimization.
446+
#
447+
config ARCH_WANT_OPTIMIZE_VMEMMAP
448+
bool
443449

444450
config HAVE_MEMBLOCK_PHYS_MAP
445451
bool

0 commit comments

Comments
 (0)