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

Stephane Eranian
2010-12-13T19:04:10Z

On Mon, Dec 13, 2010 at 5:51 PM, Andi Kleen <andi@firstfloor.org> wrote:
>> 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.

That is true.