Re: [PATCH v2 02/11] perf/x86: Improve HT workaround GP counter constraint

From: Stephane Eranian
Date: Wed May 27 2015 - 07:39:11 EST


On Wed, May 27, 2015 at 3:11 AM, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> On Wed, May 27, 2015 at 02:01:04AM -0700, Stephane Eranian wrote:
>> But are you removing the incremental calls from the upper layer via
>> x86_pmu.add()?
>> If not, then you are saying the dynamic constraint you got for
>> offcore_response, LBR
>> or the HT workaround is still the best avail now.
>
> sigh, see I knew I was missing something :/
>
> So then for c->flag & DYNAMIC we should put and get again, right?

I think it would still work. The constraint, even dynamic, you got on first
call is "locked" to you. So if you call x86_schedule_events multiple times
to add events like for E1, E2, E3 which causes at most 3 calls to
x86_schedule_events9). Then you'd get the same constraint but
it would still be valid. Just need to make sure you release it if scheduling
fails at event N and it has the dynamic constraint.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/