[PATCH 0/3] powerpc: add ticket spinlock
Kevin Hao
haokexin at gmail.com
Mon Mar 16 22:33:14 AEDT 2015
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(-)
--
2.1.0
More information about the Linuxppc-dev
mailing list