Messages in this thread | | | Date | Thu, 21 May 2015 16:10:34 +0200 | From | Peter Zijlstra <> | Subject | Re: [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.
| |