[ltt-dev] [URCU PATCH] cmm: provide lightweight rmb/wmb on PPC

Paul E. McKenney paulmck at linux.vnet.ibm.com
Wed Sep 21 19:43:25 EDT 2011


On Wed, Sep 21, 2011 at 09:20:08AM +0200, Paolo Bonzini wrote:
> On 09/20/2011 06:51 PM, Mathieu Desnoyers wrote:
> >>>  I think you're right. "eieio;lwsync" is good for rmb, lwsync is good for
> >>>  wmb/smp_rmb/smp_wmb.
> >I'm not convinced that the "eieio; lwsync" combo would provide the
> >ordering we're looking for for cmm_rmb(). AFAIK, eieio orders,
> >separately, a) cacheable stores and b) loads and stores to non-cacheable
> >memory. AFAIK, lwsync orders cacheable memory ops, but not loads with
> >respect to previous stores. So basically, this combo lacks ordering of
> >non-cacheable memory accesses with respect to cachable memory accesses.
> 
> Yeah, better safe than sorry.
> 
> >Why would lwsync be good for cmm_wmb ? Does it order non-cacheable
> >writes ?
> 
> The manuals say non-cacheable writes are always ordered.

But at best only against other non-cacheable writes.  Again, they can
slip out of lock-based critical sections.

							Thanx, Paul




More information about the lttng-dev mailing list