lkml.org 
[lkml]   [2015]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 03/10] perf/x86: Correct local vs remote sibling state
On Thu, May 21, 2015 at 06:31:25AM -0700, Stephane Eranian wrote:
> On Thu, May 21, 2015 at 4:17 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> > For some obscure reason the current code accounts the current SMT
> > thread's state on the remote thread and reads the remote's state on
> > the local SMT thread.
> >
> > While internally consistent, and 'correct' its pointless confusion we
> > can do without.
> >
> > Flip them the right way around.
> >
> So you are changing the logic here from:
>
> * EXCLUSIVE: sibling counter measuring exclusive event
> * SHARED : sibling counter measuring non-exclusive event
> * UNUSED : sibling counter unused
>
> to:
>
> * EXCLUSIVE: current thread is using an exclusive event
> * SHARED: current thread is using a non-exclusive event
> * UNUSED: current thread is not using this counter
>
> I am okay with this just need to make sure there were no
> assumptions made about that. I will look.

Right; and when we construct the constraint mask we look at the other
one too. So both on the update and the read side I flipped things
around.

And that is really the only thing that matters, that you look at the
other sibling's thread state when constructing that mask. And that's
kept invariant.


\
 
 \ /
  Last update: 2015-05-21 16:21    [W:0.068 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site