linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Revert "hugetlb: make hugetlb depends on SYSFS or SYSCTL"
@ 2025-08-26  3:09 Miaohe Lin
  2025-08-27  3:35 ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: Miaohe Lin @ 2025-08-26  3:09 UTC (permalink / raw)
  To: akpm, muchun.song, osalvador, david; +Cc: linmiaohe, linux-mm, linux-kernel

Commit f8142cf94d47 ("hugetlb: make hugetlb depends on SYSFS or SYSCTL")
added dependency on SYSFS or SYSCTL but hugetlb can be used without SYSFS
or SYSCTL. So this dependency is wrong and should be removed.

This reverts commit f8142cf94d4737ea0c3baffb3b9bad8addcb9b6b.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202508222032.bwJsQPZ1-lkp@intel.com/
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 fs/Kconfig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/Kconfig b/fs/Kconfig
index c654a3642897..187a75440aca 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -250,7 +250,6 @@ config ARCH_SUPPORTS_HUGETLBFS
 menuconfig HUGETLBFS
 	bool "HugeTLB file system support"
 	depends on ARCH_SUPPORTS_HUGETLBFS
-	depends on (SYSFS || SYSCTL)
 	select MEMFD_CREATE
 	select PADATA if SMP
 	help
-- 
2.33.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] Revert "hugetlb: make hugetlb depends on SYSFS or SYSCTL"
  2025-08-26  3:09 [PATCH] Revert "hugetlb: make hugetlb depends on SYSFS or SYSCTL" Miaohe Lin
@ 2025-08-27  3:35 ` Andrew Morton
  2025-08-28  2:31   ` Miaohe Lin
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2025-08-27  3:35 UTC (permalink / raw)
  To: Miaohe Lin; +Cc: muchun.song, osalvador, david, linux-mm, linux-kernel

On Tue, 26 Aug 2025 11:09:55 +0800 Miaohe Lin <linmiaohe@huawei.com> wrote:

> Commit f8142cf94d47 ("hugetlb: make hugetlb depends on SYSFS or SYSCTL")
> added dependency on SYSFS or SYSCTL but hugetlb can be used without SYSFS
> or SYSCTL. So this dependency is wrong and should be removed.
> 
> This reverts commit f8142cf94d4737ea0c3baffb3b9bad8addcb9b6b.

f8142cf94d47 said:

    If CONFIG_SYSFS and CONFIG_SYSCTL are both undefined, hugetlb
    doesn't work now as there's no way to set max huge pages.  Make
    sure at least one of the above configs is defined to make hugetlb
    works as expected.

So there is now a way to set max huge pages?  A reference tot he
commit which made f8142cf94d47 unneeded might be helpful?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Revert "hugetlb: make hugetlb depends on SYSFS or SYSCTL"
  2025-08-27  3:35 ` Andrew Morton
@ 2025-08-28  2:31   ` Miaohe Lin
  2025-08-28  2:49     ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: Miaohe Lin @ 2025-08-28  2:31 UTC (permalink / raw)
  To: Andrew Morton; +Cc: muchun.song, osalvador, david, linux-mm, linux-kernel

On 2025/8/27 11:35, Andrew Morton wrote:
> On Tue, 26 Aug 2025 11:09:55 +0800 Miaohe Lin <linmiaohe@huawei.com> wrote:
> 
>> Commit f8142cf94d47 ("hugetlb: make hugetlb depends on SYSFS or SYSCTL")
>> added dependency on SYSFS or SYSCTL but hugetlb can be used without SYSFS
>> or SYSCTL. So this dependency is wrong and should be removed.
>>
>> This reverts commit f8142cf94d4737ea0c3baffb3b9bad8addcb9b6b.
> 
> f8142cf94d47 said:
> 
>     If CONFIG_SYSFS and CONFIG_SYSCTL are both undefined, hugetlb
>     doesn't work now as there's no way to set max huge pages.  Make
>     sure at least one of the above configs is defined to make hugetlb
>     works as expected.
> 
> So there is now a way to set max huge pages?  A reference tot he
> commit which made f8142cf94d47 unneeded might be helpful?

The commit is just wrong. It overlooked the scenario of using hugetlb through boot parameters
when it was submitted.

Thanks.
.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Revert "hugetlb: make hugetlb depends on SYSFS or SYSCTL"
  2025-08-28  2:31   ` Miaohe Lin
@ 2025-08-28  2:49     ` Andrew Morton
  2025-08-28  3:29       ` Miaohe Lin
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2025-08-28  2:49 UTC (permalink / raw)
  To: Miaohe Lin; +Cc: muchun.song, osalvador, david, linux-mm, linux-kernel

On Thu, 28 Aug 2025 10:31:51 +0800 Miaohe Lin <linmiaohe@huawei.com> wrote:

> On 2025/8/27 11:35, Andrew Morton wrote:
> > On Tue, 26 Aug 2025 11:09:55 +0800 Miaohe Lin <linmiaohe@huawei.com> wrote:
> > 
> >> Commit f8142cf94d47 ("hugetlb: make hugetlb depends on SYSFS or SYSCTL")
> >> added dependency on SYSFS or SYSCTL but hugetlb can be used without SYSFS
> >> or SYSCTL. So this dependency is wrong and should be removed.
> >>
> >> This reverts commit f8142cf94d4737ea0c3baffb3b9bad8addcb9b6b.
> > 
> > f8142cf94d47 said:
> > 
> >     If CONFIG_SYSFS and CONFIG_SYSCTL are both undefined, hugetlb
> >     doesn't work now as there's no way to set max huge pages.  Make
> >     sure at least one of the above configs is defined to make hugetlb
> >     works as expected.
> > 
> > So there is now a way to set max huge pages?  A reference tot he
> > commit which made f8142cf94d47 unneeded might be helpful?
> 
> The commit is just wrong. It overlooked the scenario of using hugetlb through boot parameters
> when it was submitted.
> 

OK.  Could we please have a description of the user-visible effect and
a decision on whether we should backport the fix?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Revert "hugetlb: make hugetlb depends on SYSFS or SYSCTL"
  2025-08-28  2:49     ` Andrew Morton
@ 2025-08-28  3:29       ` Miaohe Lin
  0 siblings, 0 replies; 5+ messages in thread
From: Miaohe Lin @ 2025-08-28  3:29 UTC (permalink / raw)
  To: Andrew Morton; +Cc: muchun.song, osalvador, david, linux-mm, linux-kernel

On 2025/8/28 10:49, Andrew Morton wrote:
> On Thu, 28 Aug 2025 10:31:51 +0800 Miaohe Lin <linmiaohe@huawei.com> wrote:
> 
>> On 2025/8/27 11:35, Andrew Morton wrote:
>>> On Tue, 26 Aug 2025 11:09:55 +0800 Miaohe Lin <linmiaohe@huawei.com> wrote:
>>>
>>>> Commit f8142cf94d47 ("hugetlb: make hugetlb depends on SYSFS or SYSCTL")
>>>> added dependency on SYSFS or SYSCTL but hugetlb can be used without SYSFS
>>>> or SYSCTL. So this dependency is wrong and should be removed.
>>>>
>>>> This reverts commit f8142cf94d4737ea0c3baffb3b9bad8addcb9b6b.
>>>
>>> f8142cf94d47 said:
>>>
>>>     If CONFIG_SYSFS and CONFIG_SYSCTL are both undefined, hugetlb
>>>     doesn't work now as there's no way to set max huge pages.  Make
>>>     sure at least one of the above configs is defined to make hugetlb
>>>     works as expected.
>>>
>>> So there is now a way to set max huge pages?  A reference tot he
>>> commit which made f8142cf94d47 unneeded might be helpful?
>>
>> The commit is just wrong. It overlooked the scenario of using hugetlb through boot parameters
>> when it was submitted.
>>
> 
> OK.  Could we please have a description of the user-visible effect and
> a decision on whether we should backport the fix?

For users with CONFIG_SYSFS or CONFIG_SYSCTL on, there should be no difference.
For users have CONFIG_SYSFS and CONFIG_SYSCTL both undefined, hugetlbfs can still
works perfectly well through cmdline except a possible kismet warning[1] when select
CONFIG_HUGETLBFS. IMHO, it might not worth a backport.


[1]: https://lore.kernel.org/all/5c99458f-4a91-485f-8a35-3618a992e2e4@csgroup.eu/

Thanks.
.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-08-28  3:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-26  3:09 [PATCH] Revert "hugetlb: make hugetlb depends on SYSFS or SYSCTL" Miaohe Lin
2025-08-27  3:35 ` Andrew Morton
2025-08-28  2:31   ` Miaohe Lin
2025-08-28  2:49     ` Andrew Morton
2025-08-28  3:29       ` Miaohe Lin

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).