Re: [PATCH] mm, page_alloc: batch cma update on pcp buffer refill

From: Andrew Morton
Date: Thu Feb 23 2023 - 16:48:31 EST


On Tue, 21 Feb 2023 11:27:14 +0100 Vlastimil Babka <vbabka@xxxxxxx> wrote:

>
> > The tables below compare this patch with the initial one using a
> > parallel allocation benchmark. The used kernel config is based on the default
> > debian config but with CONFIG_INIT_ON_ALLOC_DEFAULT_ON=FALSE and
> > CONFIG_CMA=TRUE. The benchmarks have been performed with the default sanity
> > checks enabled as the patch "mm, page_alloc: reduce page alloc/free sanity
> > checks" [2] was not enabled on my test branch.
> > The given times are average allocation times. The improvement is not
> > significant, but the general trend is visible.
>
> Yeah there's some improvement, but if [2] is accepted, then keeping two
> loops there just for the cma update (as there will be no more checking in
> the second loop) will almost certainly stop being a win. And with the risk
> of inaccuracy you pointed out, on top.
>
> ...
>
> > [2] https://lore.kernel.org/linux-mm/20230216095131.17336-1-vbabka@xxxxxxx/

I've just added "mm, page_alloc: reduce page alloc/free sanity checks"
to mm-unstable.