Messages in this thread | | | Date | Thu, 11 Mar 2021 13:19:14 +0100 | From | Peter Zijlstra <> | Subject | Re: [PATCH V2 16/25] perf/x86: Register hybrid PMUs |
| |
On Wed, Mar 10, 2021 at 08:37:52AM -0800, kan.liang@linux.intel.com wrote: > @@ -4420,6 +4513,27 @@ void intel_cpuc_finish(struct cpu_hw_events *cpuc) > static void intel_pmu_cpu_dead(int cpu) > { > intel_cpuc_finish(&per_cpu(cpu_hw_events, cpu)); > + > + if (is_hybrid()) { > + struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); > + struct x86_hybrid_pmu *hybrid_pmu = NULL; > + int i; > + > + for (i = 0; i < x86_pmu.num_hybrid_pmus; i++) { > + if (cpumask_test_and_clear_cpu(cpu, &x86_pmu.hybrid_pmu[i].supported_cpus)) { > + hybrid_pmu = &x86_pmu.hybrid_pmu[i]; > + break; > + } > + } > + if (WARN_ON_ONCE(!hybrid_pmu)) > + return; > + > + cpuc->pmu = NULL; > + if (cpumask_empty(&hybrid_pmu->supported_cpus)) { > + perf_pmu_unregister(&hybrid_pmu->pmu); > + hybrid_pmu->pmu.type = -1; > + } > + } > }
CPU_DEAD is the part of hotplug after we've disabled IRQs for the last time and before we kill ourselves, and you're trying to use mutexes again!
| |