Re: [PATCH] powerpc: Feature nop out reservation clear when stcx checks address

2010-08-11 Thread Anton Blanchard
ugh schedule() > without doing any atomics, bitops or spinlocks are pretty remote, but > nevertheless it might be as well to make sure. Good point. How does this look? It also swaps uses a larx in the exception exit path if we can, it's a clear win too. Anton -- [PATCH] powerpc: Feat

Re: [PATCH] powerpc: Feature nop out reservation clear when stcx checks address

2010-08-11 Thread Benjamin Herrenschmidt
On Wed, 2010-08-11 at 16:41 +1000, Paul Mackerras wrote: > On Wed, Aug 11, 2010 at 03:20:05PM +1000, Anton Blanchard wrote: > > > All recent POWER CPUs check the address before letting the stcx succeed > > so we can create a CPU feature and nop it out. As Ben suggested, we can > > only do this in

Re: [PATCH] powerpc: Feature nop out reservation clear when stcx checks address

2010-08-10 Thread Paul Mackerras
On Wed, Aug 11, 2010 at 03:20:05PM +1000, Anton Blanchard wrote: > All recent POWER CPUs check the address before letting the stcx succeed > so we can create a CPU feature and nop it out. As Ben suggested, we can > only do this in our syscall path because there is a remote possibility > some kerne

[PATCH] powerpc: Feature nop out reservation clear when stcx checks address

2010-08-10 Thread Anton Blanchard
The POWER architecture does not require stcx to check that it is operating on the same address as the larx. This means it is possible for an an exception handler to execute a larx, get a reservation, decide not to do the stcx and then return back with an active reservation. If the interrupted code