diff options
| author | Kan Liang <kan.liang@linux.intel.com> | 2024-06-14 06:46:25 -0700 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2024-06-17 17:57:56 +0200 |
| commit | c74443d92f68f07c03ae242ced554b749e6c6736 (patch) | |
| tree | f9d66b4c758b79481c84f4f5b6ee34e927b52244 /arch/x86/events/intel/uncore.h | |
| parent | perf/x86/uncore: Save the unit control address of all units (diff) | |
| download | linux-c74443d92f68f07c03ae242ced554b749e6c6736.tar.gz linux-c74443d92f68f07c03ae242ced554b749e6c6736.zip | |
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
Diffstat (limited to 'arch/x86/events/intel/uncore.h')
| -rw-r--r-- | arch/x86/events/intel/uncore.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/events/intel/uncore.h b/arch/x86/events/intel/uncore.h index 4838502d89ae..0a49e304fe40 100644 --- a/arch/x86/events/intel/uncore.h +++ b/arch/x86/events/intel/uncore.h @@ -86,6 +86,7 @@ struct intel_uncore_type { const struct attribute_group *attr_groups[4]; const struct attribute_group **attr_update; struct pmu *pmu; /* for custom pmu ops */ + struct rb_root *boxes; /* * Uncore PMU would store relevant platform topology configuration here * to identify which platform component each PMON block of that type is @@ -125,6 +126,7 @@ struct intel_uncore_pmu { int func_id; bool registered; atomic_t activeboxes; + cpumask_t cpu_mask; struct intel_uncore_type *type; struct intel_uncore_box **boxes; }; |
