On Thu, Mar 12, 2015 at 10:13:27PM +1100, Benjamin Herrenschmidt wrote: > On Thu, 2015-03-12 at 18:55 +0800, Kevin Hao wrote: > > I know Torsten Duwe has tried to add the ticket spinlock for powerpc > > one year ago [1]. But it make no progress due to the conflict between
OMG, time flies. > > PPC_SPLPAR and lockref. We still don't find a better way to handle > > this. But instead of waiting forever for a perfect solution, can't we > > just use the ticket spinlock for the !CONFIG_PPC_SPLPAR? I was actually thinking about squeezing it all (incl. lockref) into 64 bits, or making it a bit larger, keeping the holder outside the cache line, or ... Then priorities shifted. > I would do the ifdef'ing differently, something like > > CONFIG_PPC_HAS_LOCK_OWNER > > CONFIG_PPC_TICKET_LOCKS depends on !PPC_HAS_LOCK_OWNER > > and use these two in the code... with SPLPAR select'ing HAS_LOCK_OWNER Or avoid ifdef'ing and give pseries its own, platform-specific lock implementation? It's more work in the build framework but clearer in the C source. Just a though. But generally, which platforms would benefit most from this change? I must admit my access to hardware variety is somewhat limited ;-) Torsten _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev