Messages in this thread | | | Date | Tue, 5 Jun 2012 12:21:21 +0200 | Subject | Re: [PATCH] perf: Fix intel shared extra msr allocation | From | Stephane Eranian <> |
| |
On Tue, Jun 5, 2012 at 12:14 PM, Peter Zijlstra <a.p.zijlstra@chello.nl> wrote: > On Fri, 2012-06-01 at 22:11 +0800, Yan, Zheng wrote: >> >> The real problem is from __intel_shared_reg_put_constraints(). it set >> reg->alloc to 0 > > ok > >> and decreases fake_cpuc->shared_regs->regs[reg->idx]'s >> reference count. > > So? That's fake state, who cares what its left in? > Right, that's what I am trying to elucidate. Who cares about it beyond validate_group()? The fake_cpuc is reallocated for each validate group. And this includes the fake shared_regs.
>> Later when deleting the event, put_constraints() will find >> reg->alloc is 0 and it won't decrease the shared msr's reference count. > > OK, so the only problem is us setting reg->alloc to 0?
I agree with the first part of the patch in intel_try_alt_er(), we should not touch the actual event struct. But I am still unclear about the reg->alloc part. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |