lkml.org 
[lkml]   [2012]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf, x86: Fix Intel shared extra MSR allocation
On 06/05/2012 09:56 PM, Peter Zijlstra wrote:
>> @@ -1157,14 +1163,14 @@ __intel_shared_reg_get_constraints(struct cpu_hw_events *cpuc,
>> > struct event_constraint *c = &emptyconstraint;
>> > struct er_account *era;
>> > unsigned long flags;
>> > - int orig_idx = reg->idx;
>> > + int idx = reg->idx;
>> >
>> > /* already allocated shared msr */
>> > if (reg->alloc)
>> > return NULL; /* call x86_get_event_constraint() */
> I'm afraid that needs to be:
>
> /*
> * reg->alloc can be set due to existing state, so for fake cpuc
> * we need to ignore this, otherwise we might fail to allocate
> * proper fake state for this extra reg constraint. Also see
> * the comment below.
> */
> if (reg->alloc && !cpuc->is_fake)
> return NULL; /* call x86_get_event_constraints() */
>
Agree

Regards
Yan, Zheng





\
 
 \ /
  Last update: 2012-06-06 03:21    [W:0.952 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site