[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1ae917ec-4d32-4ee7-0948-f91eb3bf35fb@huawei.com>
Date: Mon, 10 Jan 2022 18:43:08 +0000
From: John Garry <john.garry@...wei.com>
To: Ian Rogers <irogers@...gle.com>, Andi Kleen <ak@...ux.intel.com>,
"Jiri Olsa" <jolsa@...hat.com>, Namhyung Kim <namhyung@...nel.org>,
Kajol Jain <kjain@...ux.ibm.com>,
"Paul A . Clarke" <pc@...ibm.com>,
"Arnaldo Carvalho de Melo" <acme@...nel.org>,
Riccardo Mancini <rickyman7@...il.com>,
Kan Liang <kan.liang@...ux.intel.com>,
Peter Zijlstra <peterz@...radead.org>,
"Ingo Molnar" <mingo@...hat.com>,
Mark Rutland <mark.rutland@....com>,
"Alexander Shishkin" <alexander.shishkin@...ux.intel.com>,
<linux-perf-users@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
"Vineet Singh" <vineet.singh@...el.com>,
James Clark <james.clark@....com>,
"Mathieu Poirier" <mathieu.poirier@...aro.org>,
Suzuki K Poulose <suzuki.poulose@....com>,
Mike Leach <mike.leach@...aro.org>,
Leo Yan <leo.yan@...aro.org>, <coresight@...ts.linaro.org>,
<linux-arm-kernel@...ts.infradead.org>, <zhengjun.xing@...el.com>
CC: <eranian@...gle.com>
Subject: Re: [PATCH v4 03/48] perf stat: Correct aggregation CPU map
On 05/01/2022 06:13, Ian Rogers wrote:
> Switch the perf_cpu_map in aggr_update_shadow from
> the evlist to the counter's cpu map, so the index is appropriate. This
> addresses a problem where uncore counts, with a cpumap like:
> $ cat /sys/devices/uncore_imc_0/cpumask
> 0,18
> Don't aggregate counts in CPUs based on the index of those values in the
> cpumap (0 and 1) but on the actual CPU (0 and 18). Thereby correcting
> metric calculations in per-socket mode for counters without a full
> cpumask.
>
> On a SkylakeX with a tweaked DRAM_BW_Use metric, to remove unnecessary
> scaling, this gives:
>
> Before:
> $ /perf stat --per-socket -M DRAM_BW_Use -I 1000
> 1.001102293 S0 1 27.01 MiB uncore_imc/cas_count_write/ # 103.00 DRAM_BW_Use
> 1.001102293 S0 1 30.22 MiB uncore_imc/cas_count_read/
> 1.001102293 S0 1 1,001,102,293 ns duration_time
> 1.001102293 S1 1 20.10 MiB uncore_imc/cas_count_write/ # 0.00 DRAM_BW_Use
> 1.001102293 S1 1 32.74 MiB uncore_imc/cas_count_read/
> 1.001102293 S1 0 <not counted> ns duration_time
> 2.003517973 S0 1 83.04 MiB uncore_imc/cas_count_write/ # 920.00 DRAM_BW_Use
> 2.003517973 S0 1 145.95 MiB uncore_imc/cas_count_read/
> 2.003517973 S0 1 1,002,415,680 ns duration_time
> 2.003517973 S1 1 302.45 MiB uncore_imc/cas_count_write/ # 0.00 DRAM_BW_Use
> 2.003517973 S1 1 290.99 MiB uncore_imc/cas_count_read/
> 2.003517973 S1 0 <not counted> ns duration_time
>
> After:
> $ perf stat --per-socket -M DRAM_BW_Use -I 1000
> 1.001080840 S0 1 24.96 MiB uncore_imc/cas_count_write/ # 54.00 DRAM_BW_Use
> 1.001080840 S0 1 33.64 MiB uncore_imc/cas_count_read/
> 1.001080840 S0 1 1,001,080,840 ns duration_time
> 1.001080840 S1 1 42.43 MiB uncore_imc/cas_count_write/ # 84.00 DRAM_BW_Use
> 1.001080840 S1 1 47.05 MiB uncore_imc/cas_count_read/
> 1.001080840 S1 0 <not counted> ns duration_time
>
> Signed-off-by: Ian Rogers<irogers@...gle.com>
Tested-by: John Garry <john.garry@...wei.com>
Powered by blists - more mailing lists