Re: [PATCH 2/3] arm64/hugetlb: Enable HUGETLB_PAGE_SIZE_VARIABLE
On 2/11/21 1:31 PM, Christoph Hellwig wrote: > On Thu, Feb 11, 2021 at 11:52:10AM +0530, Anshuman Khandual wrote: >> MAX_ORDER which invariably depends on FORCE_MAX_ZONEORDER can be a variable >> for a given page size, depending on whether TRANSPARENT_HUGEPAGE is enabled >> or not. In certain page size and THP combinations HUGETLB_PAGE_ORDER can be >> greater than MAX_ORDER, making it unusable as pageblock_order. >> >> This enables HUGETLB_PAGE_SIZE_VARIABLE making pageblock_order a variable >> rather than the compile time constant HUGETLB_PAGE_ORDER which could break >> MAX_ORDER rule for certain configurations. >> >> Cc: Catalin Marinas >> Cc: Will Deacon >> Cc: linux-arm-ker...@lists.infradead.org >> Cc: linux-kernel@vger.kernel.org >> Signed-off-by: Anshuman Khandual >> --- >> arch/arm64/Kconfig | 4 >> 1 file changed, 4 insertions(+) >> >> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig >> index f39568b28ec1..8e3a5578f663 100644 >> --- a/arch/arm64/Kconfig >> +++ b/arch/arm64/Kconfig >> @@ -1909,6 +1909,10 @@ config ARCH_ENABLE_THP_MIGRATION >> def_bool y >> depends on TRANSPARENT_HUGEPAGE >> >> +config HUGETLB_PAGE_SIZE_VARIABLE > > Please move the definition of HUGETLB_PAGE_SIZE_VARIABLE to > mm/Kconfig and select it from the arch Kconfigfs instead of duplicating > the definition. Sure, will do.
Re: [PATCH 2/3] arm64/hugetlb: Enable HUGETLB_PAGE_SIZE_VARIABLE
On Thu, Feb 11, 2021 at 11:52:10AM +0530, Anshuman Khandual wrote: > MAX_ORDER which invariably depends on FORCE_MAX_ZONEORDER can be a variable > for a given page size, depending on whether TRANSPARENT_HUGEPAGE is enabled > or not. In certain page size and THP combinations HUGETLB_PAGE_ORDER can be > greater than MAX_ORDER, making it unusable as pageblock_order. > > This enables HUGETLB_PAGE_SIZE_VARIABLE making pageblock_order a variable > rather than the compile time constant HUGETLB_PAGE_ORDER which could break > MAX_ORDER rule for certain configurations. > > Cc: Catalin Marinas > Cc: Will Deacon > Cc: linux-arm-ker...@lists.infradead.org > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Anshuman Khandual > --- > arch/arm64/Kconfig | 4 > 1 file changed, 4 insertions(+) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index f39568b28ec1..8e3a5578f663 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -1909,6 +1909,10 @@ config ARCH_ENABLE_THP_MIGRATION > def_bool y > depends on TRANSPARENT_HUGEPAGE > > +config HUGETLB_PAGE_SIZE_VARIABLE Please move the definition of HUGETLB_PAGE_SIZE_VARIABLE to mm/Kconfig and select it from the arch Kconfigfs instead of duplicating the definition.
[PATCH 2/3] arm64/hugetlb: Enable HUGETLB_PAGE_SIZE_VARIABLE
MAX_ORDER which invariably depends on FORCE_MAX_ZONEORDER can be a variable for a given page size, depending on whether TRANSPARENT_HUGEPAGE is enabled or not. In certain page size and THP combinations HUGETLB_PAGE_ORDER can be greater than MAX_ORDER, making it unusable as pageblock_order. This enables HUGETLB_PAGE_SIZE_VARIABLE making pageblock_order a variable rather than the compile time constant HUGETLB_PAGE_ORDER which could break MAX_ORDER rule for certain configurations. Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-ker...@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anshuman Khandual --- arch/arm64/Kconfig | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index f39568b28ec1..8e3a5578f663 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -1909,6 +1909,10 @@ config ARCH_ENABLE_THP_MIGRATION def_bool y depends on TRANSPARENT_HUGEPAGE +config HUGETLB_PAGE_SIZE_VARIABLE + def_bool y + depends on HUGETLB_PAGE + menu "Power management options" source "kernel/power/Kconfig" -- 2.20.1