fs/Kconfig: Make hugetlbfs a menuconfig
Subsystems (2)
PATCH 1/1 fs/Kconfig: Make hugetlbfs a menuconfig
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.
--- fs/Kconfig | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-)
fs/Kconfig +11 -9
@@ -254,7 +254,7 @@ config TMPFS_QUOTA config ARCH_SUPPORTS_HUGETLBFS def_bool n -config HUGETLBFS +menuconfig HUGETLBFS bool "HugeTLB file system support" depends on X86 || SPARC64 || ARCH_SUPPORTS_HUGETLBFS || BROKEN depends on (SYSFS || SYSCTL)
@@ -266,14 +266,7 @@ config HUGETLBFS If unsure, say N. -config HUGETLB_PAGE - def_bool HUGETLBFS - -config HUGETLB_PAGE_OPTIMIZE_VMEMMAP - def_bool HUGETLB_PAGE - depends on ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP - depends on SPARSEMEM_VMEMMAP - +if HUGETLBFS config HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON bool "HugeTLB Vmemmap Optimization (HVO) defaults to on" default n
@@ -282,6 +275,15 @@ config HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON The HugeTLB VmemmapvOptimization (HVO) defaults to off. Say Y here to enable HVO by default. It can be disabled via hugetlb_free_vmemmap=off (boot command line) or hugetlb_optimize_vmemmap (sysctl). +endif # HUGETLBFS + +config HUGETLB_PAGE + def_bool HUGETLBFS + +config HUGETLB_PAGE_OPTIMIZE_VMEMMAP + def_bool HUGETLB_PAGE + depends on ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP + depends on SPARSEMEM_VMEMMAP config ARCH_HAS_GIGANTIC_PAGE bool
Signature · 1 line
2.41.0
BTW:
Quoted 44 lines · Peter Xu
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.Cc Mike Kravetz <[email protected]>Cc Muchun Song <[email protected]>Signed-off-by Peter Xu <[email protected]>--- fs/Kconfig | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-)fs/Kconfig +2
-9@@ -254,7 +254,7 @@ config TMPFS_QUOTA config ARCH_SUPPORTS_HUGETLBFS def_bool n -config HUGETLBFS +menuconfig HUGETLBFS bool "HugeTLB file system support" depends on X86 || SPARC64 || ARCH_SUPPORTS_HUGETLBFS || BROKEN depends on (SYSFS || SYSCTL)@@ -266,14 +266,7 @@ config HUGETLBFS If unsure, say N. -config HUGETLB_PAGE - def_bool HUGETLBFS - -config HUGETLB_PAGE_OPTIMIZE_VMEMMAP - def_bool HUGETLB_PAGE - depends on ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP - depends on SPARSEMEM_VMEMMAP - +if HUGETLBFS config HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON bool "HugeTLB Vmemmap Optimization (HVO) defaults to on" default n
fs/Kconfig config HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON · line 275
Quoted 1 line
fs/Kconfig +0
-0@@ -282,6 +275,15 @@ config HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON The HugeTLB VmemmapvOptimization (HVO) defaults to off. Say Y here to
Is this small 'v' ^ a typo?
thanks.
Quoted 14 lines
fs/Kconfig +9
-0enable HVO by default. It can be disabled via hugetlb_free_vmemmap=off (boot command line) or hugetlb_optimize_vmemmap (sysctl). +endif # HUGETLBFS + +config HUGETLB_PAGE + def_bool HUGETLBFS + +config HUGETLB_PAGE_OPTIMIZE_VMEMMAP + def_bool HUGETLB_PAGE + depends on ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP + depends on SPARSEMEM_VMEMMAP config ARCH_HAS_GIGANTIC_PAGE bool
Signature · 1 line
~Randy
Quoted 38 lines · Randy Dunlap
BTW:
Quoted 31 lines · Peter Xu
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.Cc Mike Kravetz <[email protected]>Cc Muchun Song <[email protected]>Signed-off-by Peter Xu <[email protected]>---
fs/Kconfig | 20 +++++++++++---------1 file changed, 11 insertions(+), 9 deletions(-)fs/Kconfig +0
-0@@ -254,7 +254,7 @@ config TMPFS_QUOTAconfig
ARCH_SUPPORTS_HUGETLBFSdef_boolnfs/Kconfig +1
-1-config HUGETLBFS +menuconfig HUGETLBFSbool "HugeTLB file system support"
depends on X86 || SPARC64 ||ARCH_SUPPORTS_HUGETLBFS|| BROKEN depends on (SYSFS || SYSCTL)fs/Kconfig +0
-0@@ -266,14 +266,7 @@ config HUGETLBFS If unsure, say N.
Quoted 16 lines
Quoted 13 lines
fs/Kconfig +1
-8-config HUGETLB_PAGE - def_bool HUGETLBFS - -config HUGETLB_PAGE_OPTIMIZE_VMEMMAP - def_bool HUGETLB_PAGE - depends on ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP - depends on SPARSEMEM_VMEMMAP - +if HUGETLBFSconfig
HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ONbool "HugeTLB Vmemmap Optimization (HVO) defaults to on" default nfs/Kconfig config HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON · line 275
Quoted 1 line
fs/Kconfig +0
-0@@ -282,6 +275,15 @@ config HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON The HugeTLB VmemmapvOptimization (HVO) defaults to off. Say Y here toIs this small 'v' ^ a typo?
Yes. Thanks for pointing it out. Although it is not related to this patch, but it will be nice for me to carry this tiny typo fix. Hi, Peter, would you like help me do this?
Thanks.
Quoted 9 lines · Muchun Song
Quoted 8 lines
fs/Kconfig config HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON · line 275
Quoted 6 lines
+if HUGETLBFS
configHUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ONbool "HugeTLB Vmemmap Optimization (HVO) defaults to on" default nfs/Kconfig +0
-0@@ -282,6 +275,15 @@ config HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON The HugeTLB VmemmapvOptimization (HVO) defaults to off. Say Y here toIs this small 'v' ^ a typo?
Quoted 3 lines
Yes. Thanks for pointing it out. Although it is not related to this patch, but it will be nice for me to carry this tiny typo fix. Hi, Peter, would you like help me do this?
Sure, this patch is indeed more or less moving that around; I can touch that up. I'll resend.
Thanks,
Signature · 1 line
Peter Xu