[PATCH v3] hugetlb: allow to free gigantic pages regardless of the configuration
Vlastimil Babka
vbabka at suse.cz
Sat Feb 16 03:48:50 AEDT 2019
On 2/14/19 8:31 PM, Alexandre Ghiti wrote:
> On systems without CMA or (MEMORY_ISOLATION && COMPACTION) activated but
> that support gigantic pages, boottime reserved gigantic pages can not be
> freed at all. This patch simply enables the possibility to hand back
> those pages to memory allocator.
>
> This patch also renames:
>
> - the triplet CMA or (MEMORY_ISOLATION && COMPACTION) into CONTIG_ALLOC,
> and gets rid of all use of it in architecture specific code (and then
> removes ARCH_HAS_GIGANTIC_PAGE config).
> - gigantic_page_supported to make it more accurate: this value being false
> does not mean that the system cannot use gigantic pages, it just means that
> runtime allocation of gigantic pages is not supported, one can still
> allocate boottime gigantic pages if the architecture supports it.
>
> Signed-off-by: Alexandre Ghiti <alex at ghiti.fr>
Acked-by: Vlastimil Babka <vbabka at suse.cz>
Thanks!
...
> --- a/mm/Kconfig
> +++ b/mm/Kconfig
> @@ -252,12 +252,17 @@ config MIGRATION
> pages as migration can relocate pages to satisfy a huge page
> allocation instead of reclaiming.
>
> +
Stray newline? No need to resend, Andrew can fix up.
Ah, he wasn't in To:, adding.
> config ARCH_ENABLE_HUGEPAGE_MIGRATION
> bool
>
> config ARCH_ENABLE_THP_MIGRATION
> bool
>
> +config CONTIG_ALLOC
> + def_bool y
> + depends on (MEMORY_ISOLATION && COMPACTION) || CMA
> +
> config PHYS_ADDR_T_64BIT
> def_bool 64BIT
>
More information about the Linuxppc-dev
mailing list