On Thu, May 21, 2015 at 06:31:25AM -0700, Stephane Eranian wrote: > On Thu, May 21, 2015 at 4:17 AM, Peter Zijlstra <[email protected]> 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

