mbox series

[RFC,00/14] add our own qspinlock implementation

Message ID 20220711030453.150644-1-npiggin@gmail.com (mailing list archive)
Headers show
Series add our own qspinlock implementation | expand

Message

Nicholas Piggin July 11, 2022, 3:04 a.m. UTC
The qspinlock conversion resulted in some latency regressions
particularly in the paravirt (SPLPAR) case. I haven't been able to
improve them much so for now I rewrite with a different paravirt
algorithm (as s390 does). This isn't the same as s390 but they have
some of the same concerns by the looks, so possibly if we can't
unify with generic code we could unify with them at some point.

Thanks,
Nick

Nicholas Piggin (14):
  powerpc/qspinlock: powerpc qspinlock implementation
  powerpc/qspinlock: add mcs queueing for contended waiters
  powerpc/qspinlock: use a half-word store to unlock to avoid larx/stcx.
  powerpc/qspinlock: convert atomic operations to assembly
  powerpc/qspinlock: allow new waiters to steal the lock before queueing
  powerpc/qspinlock: theft prevention to control latency
  powerpc/qspinlock: store owner CPU in lock word
  powerpc/qspinlock: paravirt yield to lock owner
  powerpc/qspinlock: implement option to yield to previous node
  powerpc/qspinlock: allow stealing when head of queue yields
  powerpc/qspinlock: allow propagation of yield CPU down the queue
  powerpc/qspinlock: add ability to prod new queue head CPU
  powerpc/qspinlock: trylock and initial lock attempt may steal
  powerpc/qspinlock: use spin_begin/end API

 arch/powerpc/Kconfig                       |   1 -
 arch/powerpc/include/asm/qspinlock.h       | 130 ++--
 arch/powerpc/include/asm/qspinlock_types.h |  65 ++
 arch/powerpc/include/asm/spinlock_types.h  |   2 +-
 arch/powerpc/lib/Makefile                  |   4 +-
 arch/powerpc/lib/qspinlock.c               | 671 +++++++++++++++++++++
 6 files changed, 829 insertions(+), 44 deletions(-)
 create mode 100644 arch/powerpc/include/asm/qspinlock_types.h
 create mode 100644 arch/powerpc/lib/qspinlock.c