From: Peter Zijlstra <peterz@infradead.org>
To: Stephane Eranian <eranian@google.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
"mingo@elte.hu" <mingo@elte.hu>, Andi Kleen <andi@firstfloor.org>,
Lin Ming <ming.m.lin@intel.com>
Subject: Re: [PATCH 0/3] perf_events: update extra shared registers management (v2)
Date: Mon, 23 May 2011 17:15:00 +0200 [thread overview]
Message-ID: <1306163700.18455.16.camel@twins> (raw)
In-Reply-To: <BANLkTik5v7WGygmZqjbh6_iwJ35S9upReg@mail.gmail.com>
On Mon, 2011-05-23 at 14:00 +0200, Stephane Eranian wrote:
> On Mon, May 23, 2011 at 1:10 PM, Peter Zijlstra <peterz@infradead.org> wrote:
> > On Mon, 2011-05-23 at 12:58 +0200, Stephane Eranian wrote:
> >> There is a major issue as it stands, though. You can
> >> get into an infinite loop bouncing between RSP_0 and RSP_1
> >> in case there is no solution in the group, i.e., you have 3 values
> >> for the extra MSR. I think you need to count the number of times
> >> you've called intel_try_alt_er() with success or maintain some sort
> >> of bitmask of possible alternate choices and when you exhaust that,
> >> you simply fail.
> >
> > That should be sorted by the compare with the initial idx value, no?
> > Once its back where it started out it'll bail.
> >
> Nope.
>
> Take:
> - ev1=rsp_0:0x1001
> - ev2=rsp_0:0x1002
> - ev3=rsp_1:0x1008
>
> ev1-> rsp_0
> ev2-> rsp_0, conflict, then try yields rsp_1 -> ok
> ev3 -> rsp_1, conflict, then rsp_0, but fails, try again -> rsp_1,
> fails, and so on
>
> The issue is that the intel_try() function does not know the
> history of the swaps between rsp_0, rsp1.
But it does, we pass the initial reg->idx in, and return false when that
matches the new idx, so in your example, ev3 will do:
rsp_1 -> conflict,
try rsp_0 -> conflict,
try rsp_1 -> bail, return emptyconstraint
next prev parent reply other threads:[~2011-05-23 15:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-20 14:37 [PATCH 0/3] perf_events: update extra shared registers management (v2) Stephane Eranian
2011-05-23 9:11 ` Peter Zijlstra
2011-05-23 9:32 ` Peter Zijlstra
2011-05-23 9:36 ` Stephane Eranian
2011-05-23 10:58 ` Stephane Eranian
2011-05-23 11:10 ` Peter Zijlstra
2011-05-23 12:00 ` Stephane Eranian
2011-05-23 15:15 ` Peter Zijlstra [this message]
2011-05-23 15:27 ` Stephane Eranian
2011-05-23 15:30 ` Peter Zijlstra
2011-05-23 11:11 ` Peter Zijlstra
2011-05-23 11:56 ` Stephane Eranian
2011-05-23 15:15 ` Peter Zijlstra
2011-07-01 15:23 ` [tip:perf/core] perf, intel: Try alternative OFFCORE encodings tip-bot for Peter Zijlstra
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=1306163700.18455.16.camel@twins \
--to=peterz@infradead.org \
--cc=andi@firstfloor.org \
--cc=eranian@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.m.lin@intel.com \
--cc=mingo@elte.hu \
/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