Skip to content

powerpc: add ticket spinlock

Kevin Hao linuxppc-dev 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3powerpc: introduce PPC_HAS_LOCK_OWNERarch/powerpc/Kconfig arch/powerpc/include/asm/spinlock.h arch/powerpc/lib/locks.c +1 more+14 -60 replies
2/3powerpc: spinlock: refactor codes wrapped by PPC_HAS_LOCK_OWNERarch/powerpc/include/asm/spinlock.h+30 -410 replies
3/3powerpc: add ticket spinlockarch/powerpc/Kconfig arch/powerpc/include/asm/spinlock.h arch/powerpc/include/asm/spinlock_types.h+97 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] powerpc: add ticket spinlock

Hi,

This patch series convert the simple spinlock to ticket-based spinlock for the platforms without shared processors. I have run the following command ten times on a t4240rdb board (12 dual-threaded cpus):

	./perf bench sched messaging -g 100

                                Before      After
    Averaged total time [sec]:  2.623       2.479 

We can see a ~5% performance enhancing. I also run the following command ten times on a p1020rdb board (2 cpus):

	./perf bench sched messaging -g 20 

                                Before      After
    Averaged total time [sec]:  3.139       3.144 

So the overhead for the 2 cpus platform is also trivial.

Kevin Hao (3):
powerpc: introduce PPC_HAS_LOCK_OWNER
powerpc: spinlock: refactor codes wrapped by PPC_HAS_LOCK_OWNER
powerpc: add ticket spinlock

 arch/powerpc/Kconfig                      |   8 ++
 arch/powerpc/include/asm/spinlock.h       | 144 ++++++++++++++++++++++--------
 arch/powerpc/include/asm/spinlock_types.h |  16 ++++
 arch/powerpc/lib/locks.c                  |   4 +-
 arch/powerpc/platforms/pseries/Kconfig    |   1 +
 5 files changed, 133 insertions(+), 40 deletions(-)
Signature · 1 line
2.1.0