perf/x86/cstate: Allow reading the package statistics from local CPU
authorTero Kristo <tero.kristo@linux.intel.com>
Tue, 12 Sep 2023 12:44:31 +0000 (15:44 +0300)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 9 Oct 2023 14:12:22 +0000 (16:12 +0200)
commit05276d4831fe023b6674a72bd6b8c5b39796e690
treef3b48465fb6506a930ca8071745250263227add1
parent38cd5b6a875adc877681faf8e3ad47fdbd6eceb5
perf/x86/cstate: Allow reading the package statistics from local CPU

The MSR registers for reading the package residency counters are
available on every CPU of the package. To avoid doing unnecessary SMP
calls to read the values for these from the various CPUs inside a
package, allow reading them from any CPU of the package.

Suggested-by: Kan Liang <kan.liang@intel.com>
Signed-off-by: Tero Kristo <tero.kristo@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20230912124432.3616761-2-tero.kristo@linux.intel.com
arch/x86/events/intel/cstate.c