[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 6 Jun 2016 17:59:07 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: xinhui <xinhui.pan@...ux.vnet.ibm.com>,
linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
virtualization@...ts.linux-foundation.org, paulus@...ba.org,
mpe@...erman.id.au, mingo@...hat.com, paulmck@...ux.vnet.ibm.com,
waiman.long@....com
Subject: Re: [PATCH v5 1/6] qspinlock: powerpc support qspinlock
On Fri, Jun 03, 2016 at 02:33:47PM +1000, Benjamin Herrenschmidt wrote:
> - For the above, can you show (or describe) where the qspinlock
> improves things compared to our current locks.
So currently PPC has a fairly straight forward test-and-set spinlock
IIRC. You have this because LPAR/virt muck and lock holder preemption
issues etc..
qspinlock is 1) a fair lock (like ticket locks) and 2) provides
out-of-word spinning, reducing cacheline pressure.
Esp. on multi-socket x86 we saw the out-of-word spinning being a big win
over our ticket locks.
And fairness, brought to us by the ticket locks a long time ago,
eliminated starvation issues we had, where a spinner local to the holder
would 'always' win from a spinner further away. So under heavy enough
local contention, the spinners on 'remote' CPUs would 'never' get to own
the lock.
pv-qspinlock tries to preserve the fairness while allowing limited lock
stealing and explicitly managing which vcpus to wake.
> While there's
> theory and to some extent practice on x86, it would be nice to
> validate the effects on POWER.
Right; so that will have to be from benchmarks which I cannot help you
with ;-)
Powered by blists - more mailing lists