From: Stephane Eranian <eranian@google.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Vince Weaver <vincent.weaver@maine.edu>,
LKML <linux-kernel@vger.kernel.org>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Ingo Molnar <mingo@redhat.com>, Paul Mackerras <paulus@samba.org>
Subject: Re: perf: odd event scheduling issue
Date: Thu, 21 May 2015 05:05:26 -0700 [thread overview]
Message-ID: <CABPqkBTijzeMSAf5MmynVxS+-Q=Ni_WkygB82OAuR1QSwXyw6g@mail.gmail.com> (raw)
In-Reply-To: <20150520162510.GA16635@krava.redhat.com>
On Wed, May 20, 2015 at 9:25 AM, Jiri Olsa <jolsa@redhat.com> wrote:
> On Wed, May 20, 2015 at 03:52:09PM +0200, Peter Zijlstra wrote:
>> On Wed, May 20, 2015 at 11:28:42AM +0200, Peter Zijlstra wrote:
>>
>> > ---
>> >
>> > c02cdbf60b51b8d98a49185535f5d527a2965142 is the first bad commit
>> > commit c02cdbf60b51b8d98a49185535f5d527a2965142
>> > Author: Stephane Eranian <eranian@google.com>
>> > Date: Mon Nov 17 20:07:02 2014 +0100
>> >
>> > perf/x86/intel: Limit to half counters when the HT workaround is enabled, to avoid exclusive mode starvation
>> >
>> > This patch limits the number of counters available to each CPU when
>> > the HT bug workaround is enabled.
>> >
>> > This is necessary to avoid situation of counter starvation. Such can
>> > arise from configuration where one HT thread, HT0, is using all 4 counters
>> > with corrupting events which require exclusion the the sibling HT, HT1.
>> >
>> > In such case, HT1 would not be able to schedule any event until HT0
>> > is done. To mitigate this problem, this patch artificially limits
>> > the number of counters to 2.
>> >
>> > That way, we can gurantee that at least 2 counters are not in exclusive
>> > mode and therefore allow the sibling thread to schedule events of the
>> > same type (system vs. per-thread). The 2 counters are not determined
>> > in advance. We simply set the limit to two events per HT.
>> >
>> > This helps mitigate starvation in case of events with specific counter
>> > constraints such a PREC_DIST.
>> >
>> > Note that this does not elimintate the starvation is all cases. But
>> > it is better than not having it.
>> >
>> > (Solution suggested by Peter Zjilstra.)
>> >
>> > Signed-off-by: Stephane Eranian <eranian@google.com>
>> > Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
>> > Cc: bp@alien8.de
>> > Cc: jolsa@redhat.com
>> > Cc: kan.liang@intel.com
>> > Cc: maria.n.dimakopoulou@gmail.com
>> > Link: http://lkml.kernel.org/r/1416251225-17721-11-git-send-email-eranian@google.com
>> > Signed-off-by: Ingo Molnar <mingo@kernel.org>
>>
>> OK, so if you have the watchdog enabled, that's 1 event, and having a
>> max of 2 GP events, adding another 2 events is fail.
>>
>> Jiri, did you SNB have the watchdog disabled?
>
> watchdog was enabled
>
But maybe HT was disabled on your snb machine.
> jirka
prev parent reply other threads:[~2015-05-21 12:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-20 3:07 perf: odd event scheduling issue Vince Weaver
2015-05-20 7:00 ` Peter Zijlstra
2015-05-20 7:11 ` Jiri Olsa
2015-05-20 9:28 ` Peter Zijlstra
2015-05-20 13:52 ` Peter Zijlstra
2015-05-20 15:25 ` Peter Zijlstra
2015-05-20 16:08 ` Peter Zijlstra
2015-05-20 16:28 ` Peter Zijlstra
2015-05-20 23:10 ` Andi Kleen
2015-05-21 12:04 ` Stephane Eranian
2015-05-20 16:25 ` Jiri Olsa
2015-05-21 12:05 ` Stephane Eranian [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CABPqkBTijzeMSAf5MmynVxS+-Q=Ni_WkygB82OAuR1QSwXyw6g@mail.gmail.com' \
--to=eranian@google.com \
--cc=acme@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=vincent.weaver@maine.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).