Re: [PATCH v2 2/2] mm,thp,compaction,cma: allow THP migration for CMA allocations

From: Vlastimil Babka
Date: Mon Mar 02 2020 - 04:32:59 EST


On 2/27/20 10:32 PM, Rik van Riel wrote:
> The code to implement THP migrations already exists, and the code
> for CMA to clear out a region of memory already exists.
>
> Only a few small tweaks are needed to allow CMA to move THP memory
> when attempting an allocation from alloc_contig_range.
>
> With these changes, migrating THPs from a CMA area works when
> allocating a 1GB hugepage from CMA memory.
>
> Signed-off-by: Rik van Riel <riel@xxxxxxxxxxx>
> Reviewed-by: Zi Yan <ziy@xxxxxxxxxx>

With the followup fix,

Reviewed-by: Vlastimil Babka <vbabka@xxxxxxx>

Thanks.