Re: [PATCH 6/6] powerpc: Use lwsync for acquire barrier if CPU supports it

2010-02-17 Thread Benjamin Herrenschmidt
> Yes I suppose the branch can be executed "non speculatively" before the > lwsync is completed. Wheras the larx/stcwx will have to complete before > the branch outcome can be known. I suppose probably not worthwhile > avoiding the full IO sync by adding yet more crap to make this work. > > Than

Re: [PATCH 6/6] powerpc: Use lwsync for acquire barrier if CPU supports it

2010-02-17 Thread Nick Piggin
On Wed, Feb 17, 2010 at 08:43:14PM +1100, Anton Blanchard wrote: > > Hi Nick, > > > Ah, good to see this one come back. I also tested tbench over localhost > > btw which actually did show some speedup on the G5. > > > > BTW. this was the last thing left: > > http://www.mail-archive.com/linuxpp

Re: [PATCH 6/6] powerpc: Use lwsync for acquire barrier if CPU supports it

2010-02-17 Thread Anton Blanchard
Hi Nick, > Ah, good to see this one come back. I also tested tbench over localhost > btw which actually did show some speedup on the G5. > > BTW. this was the last thing left: > http://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg29738.html > > Don't know if you took a look at that a

Re: [PATCH 6/6] powerpc: Use lwsync for acquire barrier if CPU supports it

2010-02-15 Thread Olof Johansson
On Tue, Feb 16, 2010 at 03:19:03PM +1100, Benjamin Herrenschmidt wrote: > On Mon, 2010-02-15 at 22:22 -0600, Olof Johansson wrote: > > > > Turns out this one hurts PA6T performance quite a bit, lwsync seems to be > > significantly more expensive there. I see a 25% drop in the microbenchmark > > do

Re: [PATCH 6/6] powerpc: Use lwsync for acquire barrier if CPU supports it

2010-02-15 Thread Benjamin Herrenschmidt
On Mon, 2010-02-15 at 22:22 -0600, Olof Johansson wrote: > > Turns out this one hurts PA6T performance quite a bit, lwsync seems to be > significantly more expensive there. I see a 25% drop in the microbenchmark > doing pthread_lock/unlock loops on two cpus. > > Taking out the CPU_FTR_LWSYNC will

Re: [PATCH 6/6] powerpc: Use lwsync for acquire barrier if CPU supports it

2010-02-15 Thread Olof Johansson
On Wed, Feb 10, 2010 at 10:10:25PM +1100, Anton Blanchard wrote: > > Nick Piggin discovered that lwsync barriers around locks were faster than > isync > on 970. That was a long time ago and I completely dropped the ball in testing > his patches across other ppc64 processors. > > Turns out the id

Re: [PATCH 6/6] powerpc: Use lwsync for acquire barrier if CPU supports it

2010-02-10 Thread Nick Piggin
On Wed, Feb 10, 2010 at 10:10:25PM +1100, Anton Blanchard wrote: > > Nick Piggin discovered that lwsync barriers around locks were faster than > isync > on 970. That was a long time ago and I completely dropped the ball in testing > his patches across other ppc64 processors. > > Turns out the id

[PATCH 6/6] powerpc: Use lwsync for acquire barrier if CPU supports it

2010-02-10 Thread Anton Blanchard
Nick Piggin discovered that lwsync barriers around locks were faster than isync on 970. That was a long time ago and I completely dropped the ball in testing his patches across other ppc64 processors. Turns out the idea helps on other chips. Using a microbenchmark that uses a lot of threads to co