lkml.org 
[lkml]   [2015]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 2/2] x86, perf,cqm: handle CPU hotplug


On Thu, 18 Jun 2015, Thomas Gleixner wrote:

> On Thu, 18 Jun 2015, Kanaka Juvva wrote:
>
>> Added lock in event reader function. The cqm_pick_event_reader() function
>> accesses cqm_cpumask and it is critical section between this and
>> cqm_stable().
>>
>> This situation is true when a CPU is hotplugged. Mutex is used to protect
>> the critical section.
>>
>> Signed-off-by: Kanaka Juvva <kanaka.d.juvva@linux.intel.com>
>> ---
>> arch/x86/kernel/cpu/perf_event_intel_cqm.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/x86/kernel/cpu/perf_event_intel_cqm.c b/arch/x86/kernel/cpu/perf_event_intel_cqm.c
>> index 1880761..e17e37f 100644
>> --- a/arch/x86/kernel/cpu/perf_event_intel_cqm.c
>> +++ b/arch/x86/kernel/cpu/perf_event_intel_cqm.c
>> @@ -1239,12 +1239,15 @@ static inline void cqm_pick_event_reader(int cpu)
>> int phys_id = topology_physical_package_id(cpu);
>> int i;
>>
>> + mutex_lock(&cache_mutex);
>
> I already explained it to Vikas. You CANNOT take a mutex in that code
> path as it runs with interrupts disabled on a CPU which cannot
> schedule.

This patch also needs to be merged with the new package mask changes that
was added.
Will merge and send the fix.

Thanks,
Vikas

>
> Sigh.
>
> tglx
>


\
 
 \ /
  Last update: 2015-06-23 23:01    [W:0.053 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site