Messages in this thread | | | Date | Wed, 06 Jun 2012 09:00:17 +0800 | From | "Yan, Zheng" <> | Subject | Re: [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
| |