Re: [PATCHv5] mm: optimization on page allocation when CMA enabled

From: Roman Gushchin
Date: Mon Oct 09 2023 - 21:31:53 EST


On Mon, Oct 09, 2023 at 05:14:15PM -0700, Andrew Morton wrote:
> On Sun, 8 Oct 2023 15:54:40 +0800 Zhaoyang Huang <huangzhaoyang@xxxxxxxxx> wrote:
>
> > > Roman previously asked
> > >
> > > : Also I'm a bit concerned about potential performance implications.
> > > : Would be great to provide some benchmarks or some data. Probably it's
> > > : ok because of we have pcp caches on top, but I'm not 100% sure.
> > >
> > > Are you able to perform such testing and tell us the result?
> > I have applied this patch in a v5.4 based ANDROID system and got no
> > regression problem. Actually, this commit is aimed to have
> > alloc_pages(GFP_USER) use CMA instead of stealing U&R(could lead to
> > GFP_KERNEL fail) only when zone's free pages and free cma are around
> > WATERMARK_LOW/MIN which would NOT affect most scenarios.
>
> OK, thanks.
>
> Could the appropriate people please take a look at this? It has been
> in mm-unstable since May.

I have 2 concerns:
1) it's still hard to understand the commit message and comments, I can
only reverse-engineer it based on the code changes;
2) performance concerns I expressed earlier are not addressed. Idk what's
a good benchmark for the page allocator, probably something i/o or
networking heavy.

On the positive side I believe that the patch is solving a real problem.