From mboxrd@z Thu Jan 1 00:00:00 1970 From: compudj@krystal.dyndns.org (Mathieu Desnoyers) Date: Thu, 22 Sep 2011 05:13:12 -0400 Subject: [ltt-dev] [URCU PATCH] atomic: provide seq_cst semantics on powerpc In-Reply-To: <4E7AE96A.8060307@redhat.com> References: <1316502769-576-2-git-send-email-pbonzini@redhat.com> <20110920163518.GB31802@Krystal> <20110921235623.GI2394@linux.vnet.ibm.com> <20110922002712.GA8516@Krystal> <4E7AE96A.8060307@redhat.com> Message-ID: <20110922091312.GB19151@Krystal> * Paolo Bonzini (pbonzini at redhat.com) wrote: > On 09/22/2011 02:27 AM, Mathieu Desnoyers wrote: >> Paolo: if you are interested in optimising powerpc uatomic ops further, >> add, sub, inc, dec, "or", "and", basically anything that is not >> xchg/add_return/cmpxchg could use versions of the cmpxchg that does not >> have the lwsync/sync barriers. > > Or they could just be rewritten in assembly with a manual ll/sc loop. Sure, although I suspect the output assembly would be pretty much the same if we share a common barrier-less permeable cmpxchg for all those primitives on powerpc on modern compilers vs hand-coding each primitive. I might be wrong though. Thanks, Mathieu > > Paolo > -- Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com