RE: [LKP] Re: [perf/x86] 81ec3f3c4c: will-it-scale.per_process_ops -5.5% regression

From: Kleen, Andi
Date: Fri Feb 21 2020 - 13:05:06 EST




>So likely, this commit changes the layout of the kernel text
>and data,

It should be only data here. text changes all the time anyways,
but data tends to be more stable.

> which may trigger some cacheline level change. From
>the system map of the 2 kernels, a big trunk of symbol's address
>changes which follow the global "pmu",

I wonder if it's the effect Andrew predicted a long time ago from
using __read_mostly. If all the __read_mostlies are moved somewhere
else the remaining read/write variables will get more sensitive to false sharing.

A simple experiment would be to add a __cacheline_aligned to align it,
and then add

____cacheline_aligned char dummy[0];

at the end to pad it to 64bytes.

Or hopefully Jiri can figure it out from the C2C data.

>btw, we've seen similar case that an irrelevant commit changes
>the benchmark, like a hugetlb patch improves pagefault test on
>a platform that never uses hugetlb https://lkml.org/lkml/2020/1/14/150

Yes we've had similar problems with the data segment before.

-Andi