linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] powerpc: add ticket spinlock
@ 2015-03-16 11:33 Kevin Hao
  2015-03-16 11:33 ` [PATCH 1/3] powerpc: introduce PPC_HAS_LOCK_OWNER Kevin Hao
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Kevin Hao @ 2015-03-16 11:33 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Paul Mackerras

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-16 11:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-16 11:33 [PATCH 0/3] powerpc: add ticket spinlock Kevin Hao
2015-03-16 11:33 ` [PATCH 1/3] powerpc: introduce PPC_HAS_LOCK_OWNER Kevin Hao
2015-03-16 11:33 ` [PATCH 2/3] powerpc: spinlock: refactor codes wrapped by PPC_HAS_LOCK_OWNER Kevin Hao
2015-03-16 11:33 ` [PATCH 3/3] powerpc: add ticket spinlock Kevin Hao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).