On Fri, May 22, 2015 at 06:40:49AM -0700, Stephane Eranian wrote: > On Fri, May 22, 2015 at 6:36 AM, Peter Zijlstra <[email protected]> wrote: > > On Fri, May 22, 2015 at 06:29:47AM -0700, Stephane Eranian wrote: > >> On Fri, May 22, 2015 at 6:25 AM, Peter Zijlstra <[email protected]> > >> wrote: > >> > On Fri, May 22, 2015 at 06:07:00AM -0700, Stephane Eranian wrote: > >> >> > >> >> One other thing I noticed is that the --n_excl needs to be protected by > >> >> the > >> >> excl_cntrs->lock in put_excl_constraints(). > >> > > >> > Nah, its strictly per cpu. > >> > >> No. the excl_cntrs struct is pointed to by cpuc but it is shared between > >> the > >> sibling HT. Otherwise this would not work! > > > > n_excl is per cpuc, see the trickery with has_exclusive vs > > exclusive_present on how I avoid the lock. > > Yes, but I believe you create a store forward penalty with this. > You store 16bits and you load 32 bits on the same cache line.
The store and load are fairly well spaced -- the entire scheduling fast path is in between. And such a penalty is still cheap compared to locking, no? -- 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/

