Commit 47010c04 authored by Muchun Song's avatar Muchun Song Committed by Andrew Morton
Browse files

mm: hugetlb_vmemmap: cleanup CONFIG_HUGETLB_PAGE_FREE_VMEMMAP*

The word of "free" is not expressive enough to express the feature of
optimizing vmemmap pages associated with each HugeTLB, rename this keywork
to "optimize".  In this patch , cheanup configs to make code more
expressive.

Link: https://lkml.kernel.org/r/20220404074652.68024-4-songmuchun@bytedance.com


Signed-off-by: default avatarMuchun Song <songmuchun@bytedance.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: David Hildenbrand <david@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent f10f1442
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1660,7 +1660,7 @@
			Format: size[KMG]
			Format: size[KMG]


	hugetlb_free_vmemmap=
	hugetlb_free_vmemmap=
			[KNL] Reguires CONFIG_HUGETLB_PAGE_FREE_VMEMMAP
			[KNL] Reguires CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
			enabled.
			enabled.
			Allows heavy hugetlb users to free up some more
			Allows heavy hugetlb users to free up some more
			memory (7 * PAGE_SIZE for each 2MB hugetlb page).
			memory (7 * PAGE_SIZE for each 2MB hugetlb page).
@@ -1669,7 +1669,7 @@
			on:  enable the feature
			on:  enable the feature
			off: disable the feature
			off: disable the feature


			Built with CONFIG_HUGETLB_PAGE_FREE_VMEMMAP_DEFAULT_ON=y,
			Built with CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON=y,
			the default is on.
			the default is on.


			This is not compatible with memory_hotplug.memmap_on_memory.
			This is not compatible with memory_hotplug.memmap_on_memory.
+1 −1
Original line number Original line Diff line number Diff line
@@ -164,7 +164,7 @@ default_hugepagesz
	will all result in 256 2M huge pages being allocated.  Valid default
	will all result in 256 2M huge pages being allocated.  Valid default
	huge page size is architecture dependent.
	huge page size is architecture dependent.
hugetlb_free_vmemmap
hugetlb_free_vmemmap
	When CONFIG_HUGETLB_PAGE_FREE_VMEMMAP is set, this enables freeing
	When CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP is set, this enables optimizing
	unused vmemmap pages associated with each HugeTLB page.
	unused vmemmap pages associated with each HugeTLB page.


When multiple huge page sizes are supported, ``/proc/sys/vm/nr_hugepages``
When multiple huge page sizes are supported, ``/proc/sys/vm/nr_hugepages``
+1 −1
Original line number Original line Diff line number Diff line
@@ -97,7 +97,7 @@ config ARM64
	select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
	select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
	select ARCH_WANT_FRAME_POINTERS
	select ARCH_WANT_FRAME_POINTERS
	select ARCH_WANT_HUGE_PMD_SHARE if ARM64_4K_PAGES || (ARM64_16K_PAGES && !ARM64_VA_BITS_36)
	select ARCH_WANT_HUGE_PMD_SHARE if ARM64_4K_PAGES || (ARM64_16K_PAGES && !ARM64_VA_BITS_36)
	select ARCH_WANT_HUGETLB_PAGE_FREE_VMEMMAP
	select ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP
	select ARCH_WANT_LD_ORPHAN_WARN
	select ARCH_WANT_LD_ORPHAN_WARN
	select ARCH_WANTS_NO_INSTR
	select ARCH_WANTS_NO_INSTR
	select ARCH_HAS_UBSAN_SANITIZE_ALL
	select ARCH_HAS_UBSAN_SANITIZE_ALL
+1 −1
Original line number Original line Diff line number Diff line
@@ -78,7 +78,7 @@ void flush_dcache_page(struct page *page)
	/*
	/*
	 * Only the head page's flags of HugeTLB can be cleared since the tail
	 * Only the head page's flags of HugeTLB can be cleared since the tail
	 * vmemmap pages associated with each HugeTLB page are mapped with
	 * vmemmap pages associated with each HugeTLB page are mapped with
	 * read-only when CONFIG_HUGETLB_PAGE_FREE_VMEMMAP is enabled (more
	 * read-only when CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP is enabled (more
	 * details can refer to vmemmap_remap_pte()).  Although
	 * details can refer to vmemmap_remap_pte()).  Although
	 * __sync_icache_dcache() only set PG_dcache_clean flag on the head
	 * __sync_icache_dcache() only set PG_dcache_clean flag on the head
	 * page struct, there is more than one page struct with PG_dcache_clean
	 * page struct, there is more than one page struct with PG_dcache_clean
+1 −1
Original line number Original line Diff line number Diff line
@@ -121,7 +121,7 @@ config X86
	select ARCH_WANTS_NO_INSTR
	select ARCH_WANTS_NO_INSTR
	select ARCH_WANT_GENERAL_HUGETLB
	select ARCH_WANT_GENERAL_HUGETLB
	select ARCH_WANT_HUGE_PMD_SHARE
	select ARCH_WANT_HUGE_PMD_SHARE
	select ARCH_WANT_HUGETLB_PAGE_FREE_VMEMMAP	if X86_64
	select ARCH_WANT_HUGETLB_PAGE_OPTIMIZE_VMEMMAP	if X86_64
	select ARCH_WANT_LD_ORPHAN_WARN
	select ARCH_WANT_LD_ORPHAN_WARN
	select ARCH_WANTS_THP_SWAP		if X86_64
	select ARCH_WANTS_THP_SWAP		if X86_64
	select ARCH_HAS_PARANOID_L1D_FLUSH
	select ARCH_HAS_PARANOID_L1D_FLUSH
Loading