Re: [RFC PATCH 2/3 v3] perf: Implement Nehalem uncore pmu

Andi Kleen
2010-12-13T16:51:12Z

> If think there you want something like:
>
> if (cpu == cpumask_first(topology_core_siblings(cpu)) {
>       rdmsrl(MSR_IA32_DEBUGCTLMSR, val);
>     wrmsrl(MSR_IA32_DEBUGCTLMSR, val | DEBUGCTLMSR_ENABLE_UNCORE_PMI);
> }

You have to be careful with hotplug. The code would need to be rerun
on hotplug. Otherwise the interrupt may end up on a downed CPU.
-Andi