Fix for supporting nest events on muti socket system

Michael Ellerman patch-notifications at ellerman.id.au
Wed Aug 16 22:29:57 AEST 2017


On Mon, 2017-08-14 at 11:42:23 UTC, Anju T wrote:
> In a multi node system with discontinuous node id, nest event values
> are not showing up properly.That is,
> 
> snip from lscpu output:
> 
> ..
> NUMA node0 CPU(s): 0-15
> NUMA node8 CPU(s): 16-31
> ..
> 
> Nest event values on such systems are broken:
> 
> $./perf stat -e 'nest_powerbus0_imc/PM_PB_CYC/' -C 0-14 -I 1000 sleep 1000
> #           time             counts unit events
>      1.000294577    30,17,24,42,880 nest_powerbus0_imc/PM_PB_CYC/
>      2.000528938    29,92,08,53,760 nest_powerbus0_imc/PM_PB_CYC/
>      3.000713925    29,92,08,00,000 nest_powerbus0_imc/PM_PB_CYC/
>      4.000901944    29,95,08,63,360 nest_powerbus0_imc/PM_PB_CYC/
>      5.001089119    29,92,07,92,320 nest_powerbus0_imc/PM_PB_CYC/
>      6.001276106    29,92,08,11,520 nest_powerbus0_imc/PM_PB_CYC/
> 
> $./perf stat -e 'nest_powerbus0_imc/PM_PB_CYC/' -C 16-28 -I 1000 sleep 1000
> #           time             counts unit events
>      1.000049902    <not supported> nest_powerbus0_imc/PM_PB_CYC/
>      2.000147269    <not supported> nest_powerbus0_imc/PM_PB_CYC/
>      3.000219730    <not supported> nest_powerbus0_imc/PM_PB_CYC/
>      4.000288098    <not supported> nest_powerbus0_imc/PM_PB_CYC/
>      5.000358716    <not supported> nest_powerbus0_imc/PM_PB_CYC/
>      6.000435615    <not supported> nest_powerbus0_imc/PM_PB_CYC/
>      7.000508481    <not supported> nest_powerbus0_imc/PM_PB_CYC/
> 
> This is because, when fetching for the reference count, node id is used
> as the array index which is not how this is done when initializing the
> structure. Patch to fix the same by using the right index to get the
> nest_imc_refc.
> 
> $./perf stat -e 'nest_powerbus0_imc/PM_PB_CYC/' -C 16-28 -I 1000 sleep 1000
> #           time             counts unit events
>      1.000241961    26,12,35,28,704 nest_powerbus0_imc/PM_PB_CYC/
>      2.000451678    25,95,72,48,512 nest_powerbus0_imc/PM_PB_CYC/
>      3.000634963    25,93,13,96,608 nest_powerbus0_imc/PM_PB_CYC/
>      4.000821186    25,95,74,38,208 nest_powerbus0_imc/PM_PB_CYC/
>      5.001005221    25,93,13,30,048 nest_powerbus0_imc/PM_PB_CYC/ 
> 
> Signed-off-by: Anju T Sudhakar <anju at linux.vnet.ibm.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/7efbae90892b7858f1d4873d34ffff

cheers


More information about the Linuxppc-dev mailing list