linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Hao <haokexin@gmail.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Paul Mackerras <paulus@samba.org>
Subject: [PATCH 0/3] powerpc: add ticket spinlock
Date: Mon, 16 Mar 2015 19:33:14 +0800	[thread overview]
Message-ID: <1426505597-1042-1-git-send-email-haokexin@gmail.com> (raw)

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

             reply	other threads:[~2015-03-16 11:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-16 11:33 Kevin Hao [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1426505597-1042-1-git-send-email-haokexin@gmail.com \
    --to=haokexin@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).