Re: [PATCH v3 26/30] maple_tree: Use maple copy node for mas_wr_split()

From: Matthew Wilcox

Date: Sat May 09 2026 - 12:02:44 EST


On Fri, May 08, 2026 at 11:18:31PM +0200, Liam R. Howlett wrote:
> On 26/05/08 02:12PM, D, Suneeth wrote:
> > We run will-it-scale micro-benchmark as part of our weekly CI for Kernel
> > Performance Regression testing between a stable vs rc kernel. We
> > observed will-it-scale-thread-brk1 variant was regressing with
> > ~9% on an AMD's Turin machine between the kernels v7.0 and
> > v7.1-rc1. Bisecting further landed me onto this commit
> > 280b792cac62ddadca2935766ca870b438c86323 (maple_tree: Use maple copy node
> > for mas_wr_split()) as the first bad
> > commit.
>
> Thank you for this report.
>
> Considering this is brk1() in thread mode, I'm going to tell you that
> this test is seriously flawed and will not produce anything that looks
> reasonable. The way it is written will race all over the place and thus
> is unreliable.

I think Liam's being too nice here. You should understand *what the
test is measuring*. That's literally your job as a performance engineer.

Go off and read the brk manpage. Then think about a threaded program.
And under what circumstances two threads would call brk() at the same time.
And what might happen if they do.

"line goes up" or "line goes down" isn't necessarily uninteresting,
but it's much more useful if it's set in some kind of context.