]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf/x86/uncore: Support per PMU cpumask
authorKan Liang <kan.liang@linux.intel.com>
Fri, 14 Jun 2024 13:46:25 +0000 (06:46 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 17 Jun 2024 15:57:56 +0000 (17:57 +0200)
commitc74443d92f68f07c03ae242ced554b749e6c6736
treef9d66b4c758b79481c84f4f5b6ee34e927b52244
parent0007f39325921351b7860a976a730acbb198b9ca
perf/x86/uncore: Support per PMU cpumask

The cpumask of some uncore units, e.g., CXL uncore units, may be wrong
under some configurations. Perf may access an uncore counter of a
non-existent uncore unit.

The uncore driver assumes that all uncore units are symmetric among
dies. A global cpumask is shared among all uncore PMUs. However, some
CXL uncore units may only be available on some dies.

A per PMU cpumask is introduced to track the CPU mask of this PMU.
The driver searches the unit control RB tree to check whether the PMU is
available on a given die, and updates the per PMU cpumask accordingly.

Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Yunying Sun <yunying.sun@intel.com>
Link: https://lore.kernel.org/r/20240614134631.1092359-3-kan.liang@linux.intel.com
arch/x86/events/intel/uncore.c
arch/x86/events/intel/uncore.h
arch/x86/events/intel/uncore_discovery.c
arch/x86/events/intel/uncore_discovery.h