[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1392000853.3996.13.camel@pasglop>
Date: Mon, 10 Feb 2014 13:54:13 +1100
From: Benjamin Herrenschmidt <benh@...nel.crashing.org>
To: Tom Musta <tommusta@...il.com>
Cc: Peter Zijlstra <peterz@...radead.org>, Torsten Duwe <duwe@....de>,
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 Thu, 2014-02-06 at 13:28 -0600, Tom Musta wrote:
> 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.
This is an area where we definitely want to check with the implementors
and if the implementations happen to do what we want (they likely do),
get the architecture changed for future chips and use it anyway.
There's a a *significant* benefit in avoiding an atomic operation in the
unlock case .
The reservation mechanism being based on a granule that is generally a
cache line, I doubt implementations will ever check the actual access
size, but we need to double check.
Cheers,
Ben.
--
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