[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <52F3E255.5050906@gmail.com>
Date: Thu, 06 Feb 2014 13:28:21 -0600
From: Tom Musta <tommusta@...il.com>
To: Peter Zijlstra <peterz@...radead.org>, Torsten Duwe <duwe@....de>
CC: linux-kernel@...r.kernel.org, Paul Mackerras <paulus@...ba.org>,
Anton Blanchard <anton@...ba.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
linuxppc-dev@...ts.ozlabs.org, Ingo Molnar <mingo@...nel.org>
Subject: Re: [PATCH] Convert powerpc simple spinlocks into ticket locks
On 2/6/2014 12:08 PM, Peter Zijlstra wrote:
>>> Can you pair lwarx with sthcx ? I couldn't immediately find the answer
>>> > > in the PowerISA doc. If so I think you can do better by being able to
>>> > > atomically load both tickets but only storing the head without affecting
>>> > > the tail.
>> >
>> > V2.06b, Book II, Chapter 3, "sthcx" says:
>> > | If a reservation exists and the length associated [...] is not 2 bytes,
>> > | it is undefined whether (RS)_48:63 are stored [...]
>> >
>> > That doesn't make me feel comfortable :(
> That's on page 692, right? The way I read that is of the lharx/sthcx
> don't have the exact same address, storage is undefined. But I can't
> find mention of non-matching load and store size, although I can imagine
> it being the same undefined.
My read is consistent with Torsten's ... this looks like a bad idea.
Look at the RTL for sthcx. on page 692 (Power ISA V2.06) and you will see this:
if RESERVE then
if RESERVE_LENGTH = 2 then
...
else
undefined_case <- 1
else
...
A legal implementation might never perform the store.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists