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

From: Rik van Riel
Date: Fri Feb 21 2020 - 17:35:24 EST


On Fri, 2020-02-21 at 17:31 -0500, Zi Yan wrote:
> On 21 Feb 2020, at 16:53, Rik van Riel wrote:
>
> > +++ b/mm/compaction.c
> > @@ -894,12 +894,12 @@ isolate_migratepages_block(struct
> > compact_control *cc, unsigned long low_pfn,
> >
> > /*
> > * Regardless of being on LRU, compound pages such as
> > THP and
> > - * hugetlbfs are not to be compacted. We can
> > potentially save
> > - * a lot of iterations if we skip them at once. The
> > check is
> > - * racy, but we can consider only valid values and the
> > only
> > - * danger is skipping too much.
> > + * hugetlbfs are not to be compacted most of the time.
> > We can
> > + * potentially save a lot of iterations if we skip them
> > at
> > + * once. The check is racy, but we can consider only
> > valid
> > + * values and the only danger is skipping too much.
> > */
>
> Maybe add âwe do want to move them when allocating contiguous memory
> using CMAâ to help
> people understand the context of using cc->alloc_contig?

I can certainly do that.

I'll wait for feedback from other people to see if
more changes are wanted, and plan to post v2 by
Tuesday or so :)

--
All Rights Reversed.

Attachment: signature.asc
Description: This is a digitally signed message part