* [PATCH] fs/Kconfig: Make hugetlbfs a menuconfig
@ 2023-11-23 22:39 Peter Xu
2023-11-24 0:19 ` Randy Dunlap
0 siblings, 1 reply; 4+ messages in thread
From: Peter Xu @ 2023-11-23 22:39 UTC (permalink / raw)
To: linux-kernel, linux-mm
Cc: peterx, Andrew Morton, Mike Kravetz, Muchun Song, linux-fsdevel
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 <mike.kravetz@oracle.com>
Cc: Muchun Song <songmuchun@bytedance.com>
Cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Peter Xu <peterx@redhat.com>
---
fs/Kconfig | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/fs/Kconfig b/fs/Kconfig
index fd1f655b4f1f..8636198a8689 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -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
--
2.41.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] fs/Kconfig: Make hugetlbfs a menuconfig
2023-11-23 22:39 [PATCH] fs/Kconfig: Make hugetlbfs a menuconfig Peter Xu
@ 2023-11-24 0:19 ` Randy Dunlap
2023-11-24 2:37 ` Muchun Song
0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2023-11-24 0:19 UTC (permalink / raw)
To: Peter Xu, linux-kernel, linux-mm
Cc: Andrew Morton, Mike Kravetz, Muchun Song, linux-fsdevel
BTW:
On 11/23/23 14:39, Peter Xu wrote:
> 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 <mike.kravetz@oracle.com>
> Cc: Muchun Song <songmuchun@bytedance.com>
> Cc: linux-fsdevel@vger.kernel.org
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
> fs/Kconfig | 20 +++++++++++---------
> 1 file changed, 11 insertions(+), 9 deletions(-)
>
> diff --git a/fs/Kconfig b/fs/Kconfig
> index fd1f655b4f1f..8636198a8689 100644
> --- a/fs/Kconfig
> +++ b/fs/Kconfig
> @@ -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
Is this small 'v' ^ a typo?
thanks.
> 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
--
~Randy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fs/Kconfig: Make hugetlbfs a menuconfig
2023-11-24 0:19 ` Randy Dunlap
@ 2023-11-24 2:37 ` Muchun Song
2023-11-24 15:16 ` Peter Xu
0 siblings, 1 reply; 4+ messages in thread
From: Muchun Song @ 2023-11-24 2:37 UTC (permalink / raw)
To: Randy Dunlap, Peter Xu
Cc: Peter Xu, LKML, Linux-MM, Andrew Morton, Mike Kravetz,
Muchun Song, linux-fsdevel
> On Nov 24, 2023, at 08:19, Randy Dunlap <rdunlap@infradead.org> wrote:
>
> BTW:
>
> On 11/23/23 14:39, Peter Xu wrote:
>> 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 <mike.kravetz@oracle.com>
>> Cc: Muchun Song <songmuchun@bytedance.com>
>> Cc: linux-fsdevel@vger.kernel.org
>> Signed-off-by: Peter Xu <peterx@redhat.com>
>> ---
>> fs/Kconfig | 20 +++++++++++---------
>> 1 file changed, 11 insertions(+), 9 deletions(-)
>>
>> diff --git a/fs/Kconfig b/fs/Kconfig
>> index fd1f655b4f1f..8636198a8689 100644
>> --- a/fs/Kconfig
>> +++ b/fs/Kconfig
>> @@ -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
>
> Is 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fs/Kconfig: Make hugetlbfs a menuconfig
2023-11-24 2:37 ` Muchun Song
@ 2023-11-24 15:16 ` Peter Xu
0 siblings, 0 replies; 4+ messages in thread
From: Peter Xu @ 2023-11-24 15:16 UTC (permalink / raw)
To: Muchun Song
Cc: Randy Dunlap, LKML, Linux-MM, Andrew Morton, Mike Kravetz,
Muchun Song, linux-fsdevel
On Fri, Nov 24, 2023 at 10:37:06AM +0800, Muchun Song wrote:
> >> +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
> >
> > Is 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?
Sure, this patch is indeed more or less moving that around; I can touch
that up. I'll resend.
Thanks,
--
Peter Xu
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-11-24 15:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-23 22:39 [PATCH] fs/Kconfig: Make hugetlbfs a menuconfig Peter Xu
2023-11-24 0:19 ` Randy Dunlap
2023-11-24 2:37 ` Muchun Song
2023-11-24 15:16 ` Peter Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).