Skip to content

Commit 5cfadda

Browse files
xzpetergregkh
authored andcommitted
fs/Kconfig: make hugetlbfs a menuconfig
[ Upstream commit cddba0a ] Hugetlb vmemmap default option (HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON) is a sub-option to hugetlbfs, but it shows in the same level as hugetlbfs itself, under "Pesudo filesystems". Make the vmemmap option a sub-option to hugetlbfs, by changing hugetlbfs into a menuconfig. When moving it, fix a typo 'v' spot by Randy. Link: https://lkml.kernel.org/r/20231124151902.1075697-1-peterx@redhat.com Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Muchun Song <songmuchun@bytedance.com> Cc: Mike Kravetz <mike.kravetz@oracle.com> Cc: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Stable-dep-of: 59d9094 ("mm: hugetlb: independent PMD page table shared count") Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 1abe0a3 commit 5cfadda

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

fs/Kconfig

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ config TMPFS_QUOTA
253253
config ARCH_SUPPORTS_HUGETLBFS
254254
def_bool n
255255

256-
config HUGETLBFS
256+
menuconfig HUGETLBFS
257257
bool "HugeTLB file system support"
258258
depends on X86 || IA64 || SPARC64 || ARCH_SUPPORTS_HUGETLBFS || BROKEN
259259
depends on (SYSFS || SYSCTL)
@@ -265,22 +265,24 @@ config HUGETLBFS
265265

266266
If unsure, say N.
267267

268-
config HUGETLB_PAGE
269-
def_bool HUGETLBFS
270-
271-
config HUGETLB_PAGE_OPTIMIZE_VMEMMAP
272-
def_bool HUGETLB_PAGE
273-
depends on ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP
274-
depends on SPARSEMEM_VMEMMAP
275-
268+
if HUGETLBFS
276269
config HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON
277270
bool "HugeTLB Vmemmap Optimization (HVO) defaults to on"
278271
default n
279272
depends on HUGETLB_PAGE_OPTIMIZE_VMEMMAP
280273
help
281-
The HugeTLB VmemmapvOptimization (HVO) defaults to off. Say Y here to
274+
The HugeTLB Vmemmap Optimization (HVO) defaults to off. Say Y here to
282275
enable HVO by default. It can be disabled via hugetlb_free_vmemmap=off
283276
(boot command line) or hugetlb_optimize_vmemmap (sysctl).
277+
endif # HUGETLBFS
278+
279+
config HUGETLB_PAGE
280+
def_bool HUGETLBFS
281+
282+
config HUGETLB_PAGE_OPTIMIZE_VMEMMAP
283+
def_bool HUGETLB_PAGE
284+
depends on ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP
285+
depends on SPARSEMEM_VMEMMAP
284286

285287
config ARCH_HAS_GIGANTIC_PAGE
286288
bool

0 commit comments

Comments
 (0)