Re: [PATCH 1/2] perf/x86/rapl: Move the pmu allocation out of CPU hotplug

From: Thomas Gleixner
Date: Tue Oct 08 2024 - 12:33:28 EST


On Fri, Sep 13 2024 at 10:10, kan liang wrote:
> +static void __init init_rapl_pmu(void)
> +{
> + struct rapl_pmu *pmu;
> + s32 rapl_pmu_idx;
> + int cpu;
> +
> + cpus_read_lock();
> +
> + for_each_cpu(cpu, cpu_online_mask) {

How is that supposed to work, when not all CPUs are online when
init_rapl_pmus() is invoked?

Thanks,

tglx