From mboxrd@z Thu Jan 1 00:00:00 1970 From: pbonzini@redhat.com (Paolo Bonzini) Date: Wed, 21 Sep 2011 09:20:08 +0200 Subject: [ltt-dev] [URCU PATCH] cmm: provide lightweight rmb/wmb on PPC In-Reply-To: <20110920165115.GA2955@Krystal> References: <1316502769-576-1-git-send-email-pbonzini@redhat.com> <20110920163125.GA31802@Krystal> <4E78C1C5.2080001@redhat.com> <20110920165115.GA2955@Krystal> Message-ID: <4E799028.1010707@redhat.com> 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. Paolo