Re: [PATCH] Revert "hugetlb: make hugetlb depends on SYSFS or SYSCTL"

From: Andrew Morton
Date: Tue Aug 26 2025 - 23:36:05 EST


On Tue, 26 Aug 2025 11:09:55 +0800 Miaohe Lin <linmiaohe@xxxxxxxxxx> 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?